From bd67bd6606a50a805fb34c1d312b7625f41c7813 Mon Sep 17 00:00:00 2001 From: JGonzalez Date: Thu, 16 Apr 2026 09:26:35 +0200 Subject: [PATCH] Skeleton of new free current BC --- src/modules/mesh/moduleMesh.f90 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/modules/mesh/moduleMesh.f90 b/src/modules/mesh/moduleMesh.f90 index 5fc6f2e..685a1ba 100644 --- a/src/modules/mesh/moduleMesh.f90 +++ b/src/modules/mesh/moduleMesh.f90 @@ -1113,6 +1113,31 @@ MODULE moduleMesh end interface + ! Calculates the electric field normal to the surface based on Ampere's law (without magnetic field) + type, extends(boundaryEMGeneric):: boundaryEMFreeCurrent + type(meshEdgePointer), allocatable:: electricField(:) ! Electric field in each edge + contains + procedure, pass:: apply => applyFreeCurrent + + end type boundaryEMFreeCurrent + + interface + module subroutine initFreeCurrent(self, config, object) + use json_module + + class(boundaryEMGeneric), allocatable, intent(inout):: self + type(json_file), intent(inout):: config + character(:), allocatable, intent(in):: object + + end subroutine initFreeCurrent + + module subroutine applyFreeCurrent(self, vectorF) + class(boundaryEMFreeCurrent), intent(in):: self + real(8), intent(inout):: vectorF(:) + + end subroutine applyFreeCurrent + + end interface ! Container for boundary conditions TYPE:: boundaryEMCont CLASS(boundaryEMGeneric), ALLOCATABLE:: obj