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

@ -860,8 +860,13 @@ MODULE moduleInput
SUBROUTINE readGeometry(config)
USE moduleMesh
USE moduleMeshInputGmsh2, ONLY: initGmsh2
USE moduleMeshInputVTU, ONLY: initVTU, readVTU !TEMPORARY TO TEST VTU OUTPUT
USE moduleMeshInputVTU, ONLY: initVTU
USE moduleMeshInput0D, ONLY: init0D
USE moduleMesh3DCart
USE moduleMesh2DCyl
USE moduleMesh2DCart
USE moduleMesh1DRad
USE moduleMesh1DCart
USE moduleErrors
USE moduleOutput
USE moduleRefParam
@ -959,7 +964,34 @@ MODULE moduleInput
END SELECT
!Get the type of mesh
!Link the procedure to connect meshes
SELECT CASE(mesh%dimen)
CASE(3)
mesh%connectMesh => connectMesh3DCart
CASE(2)
SELECT CASE(mesh%geometry)
CASE("Cyl")
mesh%connectMesh => connectMesh2DCyl
CASE("Cart")
mesh%connectMesh => connectMesh2DCart
END SELECT
CASE(1)
SELECT CASE(mesh%geometry)
CASE("Rad")
mesh%connectMesh => connectMesh1DRad
CASE("Cart")
mesh%connectMesh => connectMesh1DCart
END SELECT
END SELECT
!Get the format of mesh
CALL config%get(object // '.meshType', meshFormat, found)
SELECT CASE(meshFormat)
CASE ("gmsh2")
@ -969,14 +1001,22 @@ MODULE moduleInput
END IF
CASE ("vtu")
CALL initVTU(mesh)
IF (doubleMesh) THEN
CALL initVTU(meshColl)
END IF
CASE DEFAULT
CALL criticalError('Mesh format ' // meshFormat // ' not defined.', 'readGeometry')
END SELECT
!Reads the mesh file
CALL config%get(object // '.meshFile', meshFile, found)
pathMeshParticle = path // meshFile
CALL mesh%readMesh(pathMeshParticle)
meshFileVTU = '/home/jorge/fpakc/runs/cylFlow/mesh.vtu' !TEMPORARY TO TEST VTU OUTPUT
CALL readVTU(mesh, meshFileVTU) !TEMPORARY TO TEST VTU OUTPUT
DEALLOCATE(meshFile)
IF (doubleMesh) THEN
!Reads the mesh file for collisions