Common scatter subroutine
All subroutines of scattering particle properties to the nodes of a volume have been converged into one in moduleMesh.
This commit is contained in:
parent
d613f80c0d
commit
35bd61fda9
9 changed files with 39 additions and 408 deletions
|
|
@ -75,9 +75,7 @@ MODULE moduleMesh1DCart
|
|||
PROCEDURE, PASS:: partialDer => partialDerSegm
|
||||
PROCEDURE, PASS:: elemK => elemKSegm
|
||||
PROCEDURE, PASS:: elemF => elemFSegm
|
||||
PROCEDURE, NOPASS:: weight => weightSegm
|
||||
PROCEDURE, NOPASS:: inside => insideSegm
|
||||
PROCEDURE, PASS:: scatter => scatterSegm
|
||||
PROCEDURE, PASS:: gatherEF => gatherEFSegm
|
||||
PROCEDURE, PASS:: getNodes => getNodesSegm
|
||||
PROCEDURE, PASS:: phy2log => phy2logSegm
|
||||
|
|
@ -357,16 +355,6 @@ MODULE moduleMesh1DCart
|
|||
|
||||
END FUNCTION elemFSegm
|
||||
|
||||
PURE FUNCTION weightSegm(xi) RESULT(w)
|
||||
IMPLICIT NONE
|
||||
|
||||
REAL(8), INTENT(in):: xi(1:3)
|
||||
REAL(8):: w(1:2)
|
||||
|
||||
w = fPsiSegm(xi)
|
||||
|
||||
END FUNCTION weightSegm
|
||||
|
||||
PURE FUNCTION insideSegm(xi) RESULT(ins)
|
||||
IMPLICIT NONE
|
||||
|
||||
|
|
@ -378,39 +366,6 @@ MODULE moduleMesh1DCart
|
|||
|
||||
END FUNCTION insideSegm
|
||||
|
||||
SUBROUTINE scatterSegm(self, part)
|
||||
USE moduleMath
|
||||
USE moduleSpecies
|
||||
USE OMP_LIB
|
||||
IMPLICIT NONE
|
||||
|
||||
CLASS(meshVol1DCartSegm), INTENT(in):: self
|
||||
CLASS(particle), INTENT(in):: part
|
||||
REAL(8):: w_p(1:2)
|
||||
REAL(8):: tensorS(1:3,1:3)
|
||||
CLASS(meshNode), POINTER:: node
|
||||
INTEGER:: sp
|
||||
|
||||
w_p = self%weight(part%xi)
|
||||
tensorS = outerProduct(part%v, part%v)
|
||||
|
||||
sp = part%species%n
|
||||
node => self%n1
|
||||
CALL OMP_SET_LOCK(node%lock)
|
||||
node%output(sp)%den = node%output(sp)%den + part%weight*w_p(1)
|
||||
node%output(sp)%mom(:) = node%output(sp)%mom(:) + part%weight*w_p(1)*part%v(:)
|
||||
node%output(sp)%tensorS(:,:) = node%output(sp)%tensorS(:,:) + part%weight*w_p(1)*tensorS
|
||||
CALL OMP_UNSET_LOCK(node%lock)
|
||||
|
||||
node => self%n2
|
||||
CALL OMP_SET_LOCK(node%lock)
|
||||
node%output(sp)%den = node%output(sp)%den + part%weight*w_p(1)
|
||||
node%output(sp)%mom(:) = node%output(sp)%mom(:) + part%weight*w_p(1)*part%v(:)
|
||||
node%output(sp)%tensorS(:,:) = node%output(sp)%tensorS(:,:) + part%weight*w_p(1)*tensorS
|
||||
CALL OMP_UNSET_LOCK(node%lock)
|
||||
|
||||
END SUBROUTINE scatterSegm
|
||||
|
||||
!Gathers EF at position Xii
|
||||
PURE FUNCTION gatherEFSegm(self, xi) RESULT(EF)
|
||||
IMPLICIT NONE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue