fpakc/src/modules/mesh/inout/moduleMeshInoutCommon.f90
Jorge Gonzalez 2c55913501 First version of vtu file format
After some testing and making things a bit better and more general, I am
quite happy with the implementation of vtu and it seems that it is
working (at least as good as Gmsh2).

There are some procedures that might be useful for other XML-like
formats that might be moved in the future to the common module (I am
    thinking right now in the implementation of a general format like
    XDMF3).
2023-02-07 16:02:36 +01:00

27 lines
703 B
Fortran

MODULE moduleMeshInoutCommon
CHARACTER(LEN=4):: prefix = 'Step'
CONTAINS
PURE FUNCTION formatFileName(prefix, suffix, extension, t) RESULT(fileName)
USE moduleOutput
IMPLICIT NONE
CHARACTER(*), INTENT(in):: prefix, suffix, extension
INTEGER, INTENT(in), OPTIONAL:: t
CHARACTER (LEN=iterationDigits):: tString
CHARACTER(:), ALLOCATABLE:: fileName
IF (PRESENT(t)) THEN
WRITE(tString, iterationFormat) t
fileName = prefix // '_' // tString // '_' // suffix // '.' // extension
ELSE
fileName = prefix // '_' // suffix // '.' // extension
END IF
END FUNCTION formatFileName
END MODULE moduleMeshInoutCommon