Now the initial state has the same format as the mesh file, i.e., is
easy to use a file from a previous run without processing it into a plain text file. Although the previous method presented some updates for 1D small cases, this is quite easy to do with any type of simulations and, in the future, with different mesh formats.
This commit is contained in:
parent
439a45efbf
commit
e25b567d36
10 changed files with 180 additions and 94 deletions
|
|
@ -161,6 +161,7 @@ MODULE moduleMesh
|
|||
PROCEDURE(initVol_interface), DEFERRED, PASS:: init
|
||||
PROCEDURE(getNodesVol_interface), DEFERRED, PASS:: getNodes
|
||||
PROCEDURE(randPosVol_interface), DEFERRED, PASS:: randPos
|
||||
PROCEDURE(fPsi_interface), DEFERRED, NOPASS:: fPsi
|
||||
PROCEDURE(scatter_interface), DEFERRED, PASS:: scatter
|
||||
PROCEDURE(gatherEF_interface), DEFERRED, PASS:: gatherEF
|
||||
PROCEDURE(elemK_interface), DEFERRED, PASS:: elemK
|
||||
|
|
@ -208,6 +209,12 @@ MODULE moduleMesh
|
|||
|
||||
END FUNCTION getNodesVol_interface
|
||||
|
||||
PURE FUNCTION fPsi_interface(xi) RESULT(fPsi)
|
||||
REAL(8), INTENT(in):: xi(1:3)
|
||||
REAL(8), ALLOCATABLE:: fPsi(:)
|
||||
|
||||
END FUNCTION fPsi_interface
|
||||
|
||||
PURE FUNCTION elemK_interface(self) RESULT(localK)
|
||||
IMPORT:: meshVol
|
||||
CLASS(meshVol), INTENT(in):: self
|
||||
|
|
@ -271,9 +278,10 @@ MODULE moduleMesh
|
|||
TYPE(meshNodeCont), ALLOCATABLE:: nodes(:)
|
||||
!Array of volume elements
|
||||
TYPE(meshVolCont), ALLOCATABLE:: vols(:)
|
||||
PROCEDURE(readMesh_interface), POINTER, PASS:: readMesh => NULL()
|
||||
PROCEDURE(connectMesh_interface), POINTER, PASS:: connectMesh => NULL()
|
||||
PROCEDURE(printColl_interface), POINTER, PASS:: printColl => NULL()
|
||||
PROCEDURE(readMesh_interface), POINTER, PASS:: readMesh => NULL()
|
||||
PROCEDURE(readInitial_interface), POINTER, NOPASS:: readInitial => NULL()
|
||||
PROCEDURE(connectMesh_interface), POINTER, PASS:: connectMesh => NULL()
|
||||
PROCEDURE(printColl_interface), POINTER, PASS:: printColl => NULL()
|
||||
CONTAINS
|
||||
PROCEDURE, PASS:: doCollisions
|
||||
|
||||
|
|
@ -289,6 +297,15 @@ MODULE moduleMesh
|
|||
|
||||
END SUBROUTINE readMesh_interface
|
||||
|
||||
SUBROUTINE readInitial_interface(sp, filename, density, velocity, temperature)
|
||||
INTEGER, INTENT(in):: sp
|
||||
CHARACTER(:), ALLOCATABLE, INTENT(in):: filename
|
||||
REAL(8), ALLOCATABLE, INTENT(out), DIMENSION(:):: density
|
||||
REAL(8), ALLOCATABLE, INTENT(out), DIMENSION(:,:):: velocity
|
||||
REAL(8), ALLOCATABLE, INTENT(out), DIMENSION(:):: temperature
|
||||
|
||||
END SUBROUTINE readInitial_interface
|
||||
|
||||
!Connects volume and edges to the mesh
|
||||
SUBROUTINE connectMesh_interface(self)
|
||||
IMPORT meshGeneric
|
||||
|
|
@ -655,8 +672,6 @@ MODULE moduleMesh
|
|||
END SUBROUTINE doCollisions
|
||||
|
||||
SUBROUTINE doCoulomb(self)
|
||||
IMPORT meshParticles
|
||||
|
||||
CLASS(meshParticles), INTENT(inout):: self
|
||||
|
||||
END SUBROUTINE doCoulomb
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue