Impliementation of a collision mesh which is independent for the mesh
used to scatter particles and compute the EM field.
This commit is contained in:
parent
16b86542d4
commit
a2631f6b78
19 changed files with 636 additions and 368 deletions
|
|
@ -283,20 +283,21 @@ MODULE moduleMesh2DCart
|
|||
!VOLUME FUNCTIONS
|
||||
!QUAD FUNCTIONS
|
||||
!Inits quadrilateral element
|
||||
SUBROUTINE initVolQuad2DCart(self, n, p)
|
||||
SUBROUTINE initVolQuad2DCart(self, n, p, nodes)
|
||||
USE moduleRefParam
|
||||
IMPLICIT NONE
|
||||
|
||||
CLASS(meshVol2DCartQuad), INTENT(out):: self
|
||||
INTEGER, INTENT(in):: n
|
||||
INTEGER, INTENT(in):: p(:)
|
||||
TYPE(meshNodeCont), INTENT(in), TARGET:: nodes(:)
|
||||
REAL(8), DIMENSION(1:3):: r1, r2, r3, r4
|
||||
|
||||
self%n = n
|
||||
self%n1 => mesh%nodes(p(1))%obj
|
||||
self%n2 => mesh%nodes(p(2))%obj
|
||||
self%n3 => mesh%nodes(p(3))%obj
|
||||
self%n4 => mesh%nodes(p(4))%obj
|
||||
self%n1 => nodes(p(1))%obj
|
||||
self%n2 => nodes(p(2))%obj
|
||||
self%n3 => nodes(p(3))%obj
|
||||
self%n4 => nodes(p(4))%obj
|
||||
!Get element coordinates
|
||||
r1 = self%n1%getCoordinates()
|
||||
r2 = self%n2%getCoordinates()
|
||||
|
|
@ -631,22 +632,23 @@ MODULE moduleMesh2DCart
|
|||
|
||||
!TRIA ELEMENT
|
||||
!Init tria element
|
||||
SUBROUTINE initVolTria2DCart(self, n, p)
|
||||
SUBROUTINE initVolTria2DCart(self, n, p, nodes)
|
||||
USE moduleRefParam
|
||||
IMPLICIT NONE
|
||||
|
||||
CLASS(meshVol2DCartTria), INTENT(out):: self
|
||||
INTEGER, INTENT(in):: n
|
||||
INTEGER, INTENT(in):: p(:)
|
||||
TYPE(meshNodeCont), INTENT(in), TARGET:: nodes(:)
|
||||
REAL(8), DIMENSION(1:3):: r1, r2, r3
|
||||
|
||||
!Assign node index
|
||||
self%n = n
|
||||
|
||||
!Assign nodes to element
|
||||
self%n1 => mesh%nodes(p(1))%obj
|
||||
self%n2 => mesh%nodes(p(2))%obj
|
||||
self%n3 => mesh%nodes(p(3))%obj
|
||||
self%n1 => nodes(p(1))%obj
|
||||
self%n2 => nodes(p(2))%obj
|
||||
self%n3 => nodes(p(3))%obj
|
||||
!Get element coordinates
|
||||
r1 = self%n1%getCoordinates()
|
||||
r2 = self%n2%getCoordinates()
|
||||
|
|
@ -1022,7 +1024,7 @@ MODULE moduleMesh2DCart
|
|||
SUBROUTINE connectMesh2DCart(self)
|
||||
IMPLICIT NONE
|
||||
|
||||
CLASS(meshParticle), INTENT(inout):: self
|
||||
CLASS(meshGeneric), INTENT(inout):: self
|
||||
INTEGER:: e, et
|
||||
|
||||
DO e = 1, self%numVols
|
||||
|
|
@ -1035,11 +1037,15 @@ MODULE moduleMesh2DCart
|
|||
|
||||
END DO
|
||||
|
||||
!Connect Vol-Edge
|
||||
DO et = 1, self%numEdges
|
||||
CALL connectVolEdge(self%vols(e)%obj, self%edges(et)%obj)
|
||||
SELECT TYPE(self)
|
||||
TYPE IS(meshParticles)
|
||||
!Connect Vol-Edge
|
||||
DO et = 1, self%numEdges
|
||||
CALL connectVolEdge(self%vols(e)%obj, self%edges(et)%obj)
|
||||
|
||||
END DO
|
||||
END DO
|
||||
|
||||
END SELECT
|
||||
|
||||
END DO
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue