Functionality added

Now we have a new boundary condition that can change the value of the
potential in a surface based on a file.
This commit is contained in:
Jorge Gonzalez 2024-07-13 12:06:41 +02:00
commit 2d4b405fb1
2 changed files with 21 additions and 11 deletions

View file

@ -109,6 +109,7 @@ MODULE moduleEM
! Point boundary to nodes
nNodes = SIZE(nodes)
ALLOCATE(self%nodes(nNodes))
self%nNodes = nNodes
DO n = 1, nNodes
self%nodes(n)%obj => mesh%nodes(nodes(n))%obj
@ -190,10 +191,13 @@ MODULE moduleEM
CLASS(boundaryEMDirichletTime), INTENT(in):: self
REAL(8), INTENT(inout):: vectorF(:)
REAL(8):: timeFactor
INTEGER:: n, ni
timeFactor = self%temporalProfile%get(DBLE(timeStep)*tauMin)
DO n = 1, self%nNodes
self%nodes(n)%obj%emData%phi = self%potential !TODO: Correct for time
self%nodes(n)%obj%emData%phi = self%potential * timeFactor
vectorF(self%nodes(n)%obj%n) = self%nodes(n)%obj%emData%phi
END DO
@ -274,7 +278,6 @@ MODULE moduleEM
ALLOCATE(tempF(1:mesh%numNodes))
!$OMP END SINGLE
!TODO: Is this done every time step??? Then things are gonna be really simple.
CALL assembleSourceVector(tempF)
!$OMP SINGLE