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:
Jorge Gonzalez 2025-07-18 16:31:52 +02:00
commit a2f9957f32
2 changed files with 13 additions and 21 deletions

View file

@ -22,7 +22,6 @@ MODULE moduleOutput
!Type for EM data in node !Type for EM data in node
TYPE emNode TYPE emNode
CHARACTER(:), ALLOCATABLE:: type
REAL(8):: phi REAL(8):: phi
REAL(8):: B(1:3) REAL(8):: B(1:3)

View file

@ -11,7 +11,6 @@ MODULE moduleEM
CONTAINS CONTAINS
PROCEDURE(applyEM_interface), DEFERRED, PASS:: apply 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 END TYPE boundaryEMGeneric
@ -211,11 +210,11 @@ MODULE moduleEM
INTEGER:: e, i, ni, b INTEGER:: e, i, ni, b
CLASS(meshNode), POINTER:: node CLASS(meshNode), POINTER:: node
! !$OMP SINGLE !$OMP SINGLE
vectorF = 0.D0 vectorF = 0.D0
! !$OMP END SINGLE !$OMP END SINGLE
! !$OMP DO REDUCTION(+:vectorF) !$OMP DO REDUCTION(+:vectorF)
DO e = 1, mesh%numCells DO e = 1, mesh%numCells
nNodes = mesh%cells(e)%obj%nNodes nNodes = mesh%cells(e)%obj%nNodes
nodes = mesh%cells(e)%obj%getNodes(nNodes) nodes = mesh%cells(e)%obj%getNodes(nNodes)
@ -247,21 +246,15 @@ MODULE moduleEM
DEALLOCATE(nodes, rho) DEALLOCATE(nodes, rho)
END DO END DO
! !$OMP END DO !$OMP END DO
!Apply boundary conditions !Apply boundary conditions
! !$OMP DO !$OMP SINGLE
DO i = 1, mesh%numNodes do b = 1, nBoundaryEM
node => mesh%nodes(i)%obj call boundaryEM(b)%obj%apply(vectorF)
SELECT CASE(node%emData%type) end do
CASE ("dirichlet") !$OMP END SINGLE
vectorF(i) = node%emData%phi
END SELECT
END DO
! !$OMP END DO
END SUBROUTINE assembleSourceVector END SUBROUTINE assembleSourceVector