Correcting some issues with the floating boundary condition

This commit is contained in:
Jorge Gonzalez 2026-05-08 19:50:52 +02:00
commit cf75e5fb2b
3 changed files with 9 additions and 1 deletions

View file

@ -1344,6 +1344,13 @@ MODULE moduleInput
! Specific assignments per type
select type(bound)
type is(boundaryEMFloating)
if (associated(physicalSurfaces(ps)%EM, bound)) then
bound%edges = [bound%edges, physicalSurfaces(ps)%edges]
bound%nEdges = size(bound%edges)
end if
type is(boundaryEMFreeCurrent)
if (associated(physicalSurfaces(ps)%EM, bound)) then
bound%edges = [bound%edges, physicalSurfaces(ps)%edges]

View file

@ -1089,6 +1089,7 @@ MODULE moduleMesh
real(8):: invC ! Inverse of the capacitance of the surface
real(8):: charge ! Charge accumulated on surface
type(meshEdgePointer), allocatable:: edges(:) !Array with edges
integer:: nEdges
contains
! boundaryEMGeneric DEFERRED PROCEDURES
procedure, pass:: apply => applyFloating

View file

@ -252,7 +252,7 @@ submodule(moduleMesh) boundaryEM
select type(self)
type is(boundaryEMFloating)
do e = 1, size(self%edges)
do e = 1, self%nEdges
edge => self%edges(e)%obj
chargeTau = 0.0d0