Creating of nodes and edges in .vtu format

Moving forward making vtu an independent format.

Now fpakc can generate nodes and edges from vtu input.
Next step is cells.

Some minor corrections in gmsh2 format to unify statements.
The reading of meshes needs a good overhaul.

Testing all geometries with vtu is gonna be fun...
This commit is contained in:
Jorge Gonzalez 2023-02-05 19:35:49 +01:00
commit 43a7421795
4 changed files with 220 additions and 43 deletions

View file

@ -71,30 +71,26 @@ MODULE moduleMeshInputGmsh2
SELECT CASE(self%dimen)
CASE(3)
ALLOCATE(meshNode3Dcart::self%nodes(n)%obj)
self%connectMesh => connectMesh3DCart
CASE(2)
SELECT CASE(self%geometry)
CASE("Cyl")
ALLOCATE(meshNode2DCyl:: self%nodes(n)%obj)
self%connectMesh => connectMesh2DCyl
CASE("Cart")
ALLOCATE(meshNode2DCart:: self%nodes(n)%obj)
self%connectMesh => connectMesh2DCart
END SELECT
r(3) = 0.D0
CASE(1)
SELECT CASE(self%geometry)
CASE("Rad")
ALLOCATE(meshNode1DRad:: self%nodes(n)%obj)
self%connectMesh => connectMesh1DRad
CASE("Cart")
ALLOCATE(meshNode1DCart:: self%nodes(n)%obj)
self%connectMesh => connectMesh1DCart
END SELECT
r(2:3) = 0.D0
@ -111,7 +107,7 @@ MODULE moduleMeshInputGmsh2
!Reads total number of elements (no nodes)
READ(10, *) totalNumElem
!conts edges and volume elements
!Count edges and volume elements
SELECT TYPE(self)
TYPE IS(meshParticles)
self%numEdges = 0
@ -151,7 +147,7 @@ MODULE moduleMeshInputGmsh2
END SELECT
!Allocates arrays
!Allocates array of cells
ALLOCATE(self%cells(1:self%numCells))
SELECT TYPE(self)
@ -179,45 +175,30 @@ MODULE moduleMeshInputGmsh2
END SELECT
CASE (2)
ALLOCATE(p(1:2))
READ(10,*) n, elemType, eTemp, boundaryType, eTemp, p(1:2)
!Associate boundary condition procedure.
bt = getBoundaryId(boundaryType)
SELECT CASE(self%geometry)
CASE("Cyl")
ALLOCATE(p(1:2))
READ(10,*) n, elemType, eTemp, boundaryType, eTemp, p(1:2)
!Associate boundary condition procedure.
bt = getBoundaryId(boundaryType)
ALLOCATE(meshEdge2DCyl:: self%edges(e)%obj)
CASE("Cart")
ALLOCATE(p(1:2))
READ(10,*) n, elemType, eTemp, boundaryType, eTemp, p(1:2)
!Associate boundary condition procedure.
bt = getBoundaryId(boundaryType)
ALLOCATE(meshEdge2DCart:: self%edges(e)%obj)
END SELECT
CASE(1)
ALLOCATE(p(1:1))
READ(10, *) n, elemType, eTemp, boundaryType, eTemp, p(1)
!Associate boundary condition
bt = getBoundaryId(boundaryType)
SELECT CASE(self%geometry)
CASE("Rad")
ALLOCATE(p(1:1))
READ(10, *) n, elemType, eTemp, boundaryType, eTemp, p(1)
!Associate boundary condition
bt = getBoundaryId(boundaryType)
ALLOCATE(meshEdge1DRad:: self%edges(e)%obj)
CASE("Cart")
ALLOCATE(p(1:1))
READ(10, *) n, elemType, eTemp, boundaryType, eTemp, p(1)
!Associate boundary condition
bt = getBoundaryId(boundaryType)
ALLOCATE(meshEdge1DCart:: self%edges(e)%obj)
END SELECT
@ -231,9 +212,9 @@ MODULE moduleMeshInputGmsh2
END SELECT
!Read and initialize volumes
!Read and initialize cells
DO e = 1, self%numCells
!Reads the volume according to the geometry
!Read the cell according to the geometry
SELECT CASE(self%dimen)
CASE(3)
READ(10, *) n, elemType