I am dumb
The Poisson equation was not working because I didn't finish implementing the new type of BCs. Dirichlet is probably untested. I should stop doing shitty developments and no testing.
This commit is contained in:
parent
d28dd16c2e
commit
a2f9957f32
2 changed files with 13 additions and 21 deletions
|
|
@ -22,7 +22,6 @@ MODULE moduleOutput
|
|||
|
||||
!Type for EM data in node
|
||||
TYPE emNode
|
||||
CHARACTER(:), ALLOCATABLE:: type
|
||||
REAL(8):: phi
|
||||
REAL(8):: B(1:3)
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ MODULE moduleEM
|
|||
|
||||
CONTAINS
|
||||
PROCEDURE(applyEM_interface), DEFERRED, PASS:: apply
|
||||
!PROCEDURE, PASS:: update !only for time dependent boundary conditions or maybe change apply????? That might be better.
|
||||
|
||||
END TYPE boundaryEMGeneric
|
||||
|
||||
|
|
@ -211,11 +210,11 @@ MODULE moduleEM
|
|||
INTEGER:: e, i, ni, b
|
||||
CLASS(meshNode), POINTER:: node
|
||||
|
||||
! !$OMP SINGLE
|
||||
!$OMP SINGLE
|
||||
vectorF = 0.D0
|
||||
! !$OMP END SINGLE
|
||||
!$OMP END SINGLE
|
||||
|
||||
! !$OMP DO REDUCTION(+:vectorF)
|
||||
!$OMP DO REDUCTION(+:vectorF)
|
||||
DO e = 1, mesh%numCells
|
||||
nNodes = mesh%cells(e)%obj%nNodes
|
||||
nodes = mesh%cells(e)%obj%getNodes(nNodes)
|
||||
|
|
@ -247,21 +246,15 @@ MODULE moduleEM
|
|||
DEALLOCATE(nodes, rho)
|
||||
|
||||
END DO
|
||||
! !$OMP END DO
|
||||
!$OMP END DO
|
||||
|
||||
!Apply boundary conditions
|
||||
! !$OMP DO
|
||||
DO i = 1, mesh%numNodes
|
||||
node => mesh%nodes(i)%obj
|
||||
!$OMP SINGLE
|
||||
do b = 1, nBoundaryEM
|
||||
call boundaryEM(b)%obj%apply(vectorF)
|
||||
|
||||
SELECT CASE(node%emData%type)
|
||||
CASE ("dirichlet")
|
||||
vectorF(i) = node%emData%phi
|
||||
|
||||
END SELECT
|
||||
|
||||
END DO
|
||||
! !$OMP END DO
|
||||
end do
|
||||
!$OMP END SINGLE
|
||||
|
||||
END SUBROUTINE assembleSourceVector
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue