Minor improvement in mesh structure to allow different imput formats.

Organization of meshes per geometry type.
This commit is contained in:
Jorge Gonzalez 2020-12-08 18:28:24 +01:00
commit 3b125d0952
14 changed files with 158 additions and 100 deletions

View file

@ -369,7 +369,7 @@ MODULE moduleInput
TYPE(json_file), INTENT(inout):: config
LOGICAL:: found
CHARACTER(:), ALLOCATABLE:: geometryType, meshType, meshFile
CHARACTER(:), ALLOCATABLE:: geometryType, meshFormat, meshFile
CHARACTER(:), ALLOCATABLE:: fullPath
!Selects the type of geometry.
@ -389,18 +389,10 @@ MODULE moduleInput
END SELECT
!Gets the type of mesh
CALL config%get('geometry.meshType', meshType, found)
SELECT CASE(meshType)
CASE ("gmsh")
!Gets the gmsh file
CALL config%get('geometry.meshFile', meshFile, found)
CASE DEFAULT
CALL criticalError("Mesh type " // meshType // " not supported.", "readGeometry")
END SELECT
CALL config%get('geometry.meshType', meshFormat, found)
CALL mesh%init(meshFormat)
!Reads the mesh
CALL config%get('geometry.meshFile', meshFile, found)
fullpath = path // meshFile
CALL mesh%readMesh(fullPath)