Boundaries (EM and particles) can now be updated at every iteration
This commit is contained in:
parent
b1dc2bf300
commit
ecb1364d6a
5 changed files with 115 additions and 34 deletions
|
|
@ -89,6 +89,8 @@ submodule(moduleMesh) boundaryEM
|
|||
|
||||
call self%temporalProfile%convert(1.D0/ti_ref, 1.D0)
|
||||
|
||||
self%update => updateDirichletTime
|
||||
|
||||
end select
|
||||
|
||||
END SUBROUTINE initDirichletTime
|
||||
|
|
@ -118,17 +120,42 @@ submodule(moduleMesh) boundaryEM
|
|||
|
||||
CLASS(boundaryEMDirichletTime), INTENT(in):: self
|
||||
REAL(8), INTENT(inout):: vectorF(:)
|
||||
REAL(8):: timeFactor
|
||||
integer:: n
|
||||
|
||||
timeFactor = self%temporalProfile%get(DBLE(timeStep)*tauMin)
|
||||
|
||||
DO n = 1, self%nNodes
|
||||
self%nodes(n)%obj%emData%phi = self%potential * timeFactor
|
||||
self%nodes(n)%obj%emData%phi = self%potential * self%timeFactor
|
||||
vectorF(self%nodes(n)%obj%n) = self%nodes(n)%obj%emData%phi
|
||||
|
||||
END DO
|
||||
|
||||
END SUBROUTINE applyDirichletTime
|
||||
|
||||
module subroutine updateDirichletTime(self)
|
||||
implicit none
|
||||
|
||||
class(boundaryEMGeneric), intent(inout):: self
|
||||
|
||||
select type(self)
|
||||
type is(boundaryEMDirichletTime)
|
||||
self%timeFactor = self%temporalProfile%get(DBLE(timeStep)*tauMin)
|
||||
|
||||
end select
|
||||
|
||||
end subroutine updateDirichletTime
|
||||
|
||||
module subroutine boundariesEM_update()
|
||||
implicit none
|
||||
|
||||
integer:: b
|
||||
|
||||
do b = 1, nBoundariesEM
|
||||
if (associated(boundariesEM(b)%obj%update)) then
|
||||
call boundariesEM(b)%obj%update
|
||||
|
||||
end if
|
||||
|
||||
end do
|
||||
|
||||
end subroutine boundariesEM_update
|
||||
|
||||
end submodule boundaryEM
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue