Reduction in pushing
Reduction in 10-20% of time spend in pushing in 2DCyl thanks to rewriting fPsi and dPsi.
This commit is contained in:
parent
0db76083ec
commit
2486ef6316
18 changed files with 1289 additions and 1280 deletions
|
|
@ -46,40 +46,6 @@ MODULE moduleEM
|
|||
|
||||
END SUBROUTINE
|
||||
|
||||
PURE FUNCTION gatherElecField(part) RESULT(elField)
|
||||
USE moduleSpecies
|
||||
USE moduleMesh
|
||||
IMPLICIT NONE
|
||||
|
||||
TYPE(particle), INTENT(in):: part
|
||||
REAl(8):: xi(1:3) !Logical coordinates of particle in element
|
||||
REAL(8):: elField(1:3)
|
||||
|
||||
elField = 0.D0
|
||||
|
||||
xi = part%xi
|
||||
|
||||
elField = mesh%vols(part%vol)%obj%gatherEF(xi)
|
||||
|
||||
END FUNCTION gatherElecField
|
||||
|
||||
PURE FUNCTION gatherMagnField(part) RESULT(BField)
|
||||
USE moduleSpecies
|
||||
USE moduleMesh
|
||||
IMPLICIT NONE
|
||||
|
||||
TYPE(particle), INTENT(in):: part
|
||||
REAl(8):: xi(1:3) !Logical coordinates of particle in element
|
||||
REAL(8):: BField(1:3)
|
||||
|
||||
BField = 0.D0
|
||||
|
||||
xi = part%xi
|
||||
|
||||
BField = mesh%vols(part%vol)%obj%gatherMF(xi)
|
||||
|
||||
END FUNCTION gatherMagnField
|
||||
|
||||
!Assemble the source vector based on the charge density to solve Poisson's equation
|
||||
SUBROUTINE assembleSourceVector(vectorF)
|
||||
USE moduleMesh
|
||||
|
|
@ -99,8 +65,8 @@ MODULE moduleEM
|
|||
!$OMP END SINGLE
|
||||
|
||||
!$OMP DO REDUCTION(+:vectorF)
|
||||
DO e = 1, mesh%numVols
|
||||
nodes = mesh%vols(e)%obj%getNodes()
|
||||
DO e = 1, mesh%numCells
|
||||
nodes = mesh%cells(e)%obj%getNodes()
|
||||
nNodes = SIZE(nodes)
|
||||
!Calculates charge density (rho) in element nodes
|
||||
ALLOCATE(rho(1:nNodes))
|
||||
|
|
@ -113,7 +79,7 @@ MODULE moduleEM
|
|||
END DO
|
||||
|
||||
!Calculates local F vector
|
||||
localF = mesh%vols(e)%obj%elemF(rho)
|
||||
localF = mesh%cells(e)%obj%elemF(rho)
|
||||
|
||||
!Assign local F to global F
|
||||
DO i = 1, nNodes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue