TET_MESH_TO_XML
Convert Tet Mesh Files to DOLFIN XML Mesh Format
TET_MESH_TO_XML
is a C++ program which
reads a file of node coordinates and a file of elements defined by
node indices, which define a tetrahedral mesh of a 3D region
in terms of 4, 10, or 20-node tetrahedrons,
and creates a corresponding DOLFIN XML mesh file.
DOLFIN is the C++ interface to FENICS.
Usage:
tet_mesh_to_xml prefix
where
-
'prefix'_nodes.txt contains the node definitions;
-
'prefix'_elements.txt contains the element definitions;
-
'prefix'.xml will be the DOLFIN XML mesh file created by the program.
Licensing:
The computer code and data files made available on this web page
are distributed under
the GNU LGPL license.
Languages:
TET_MESH_TO_XML is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version.
Related Programs:
DOLFIN-CONVERT,
a Python program which
can convert mesh file from Gmsh, MEDIT, METIS or SCOTCH format to an
XML format suitable for use by DOLFIN or FENICS,
by Anders Logg.
TET_MESH,
a C++ library which
includes a variety of routines for working
with tetrahedral meshes.
TET_MESH_L2Q,
a C++ program which
takes a 4-node tet mesh and makes
a 10-node tet mesh.
TET_MESH_ORDER4,
a dataset directory which
contains a description and
examples of a tet mesh using order 4 elements.
TET_MESH_ORDER10,
a dataset directory which
contains a description and
examples of a tet mesh using order 10 elements.
TET_MESH_ORDER20,
a dataset directory which
contains examples of order 20 tetrahedral meshes.
TET_MESH_Q2L,
a C++ program which
takes a 10-node tet mesh and makes
a 4-node tet mesh.
TRIANGULATION_TO_XML,
a C++ program which
reads information defining a trinagulation, namely
a file of node coordinates and a file of elements defined by
node indices, and creates a corresponding DOLFIN XML mesh file.
XML,
a data directory which
contains examples of XML files,
a standard, general datafile format.
Reference:
-
Anders Logg, Kent-Andre Mardal, Garth Wells,
Automated Solution of Differential Equations by the Finite Element
Method: The FEniCS Book,
Lecture Notes in Computational Science and Engineering,
Springer, 2011,
ISBN13: 978-3642230981,
LC:
Source Code:
Examples and Tests:
List of Routines:
-
MAIN is the main program for TET_MESH_TO_XML.
-
CH_CAP capitalizes a single character.
-
CH_EQI is true if two characters are equal, disregarding case.
-
CH_TO_DIGIT returns the value of a base 10 digit.
-
FILE_COLUMN_COUNT counts the columns in the first line of a file.
-
FILE_ROW_COUNT counts the number of row records in a file.
-
I4_MAX returns the maximum of two I4's.
-
I4_MIN returns the minimum of two I4's.
-
I4MAT_DATA_READ reads data from an I4MAT file.
-
I4MAT_HEADER_READ reads the header from an I4MAT file.
-
I4MAT_TRANSPOSE_PRINT_SOME prints some of an I4MAT, transposed.
-
R8MAT_DATA_READ reads the data from an R8MAT file.
-
R8MAT_HEADER_READ reads the header from an R8MAT file.
-
R8MAT_TRANSPOSE_PRINT_SOME prints some of an R8MAT, transposed.
-
S_LEN_TRIM returns the length of a string to the last nonblank.
-
S_TO_I4 reads an I4 from a string.
-
S_TO_I4VEC reads an I4VEC from a string.
-
S_TO_R8 reads an R8 from a string.
-
S_TO_R8VEC reads an R8VEC from a string.
-
S_WORD_COUNT counts the number of "words" in a string.
-
TET_MESH_BASE_ZERO ensures that the element definition is 0-based.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
-
XML_WRITE writes the triangulation data as a DOLFIN XML mesh file.
You can go up one level to
the C++ source codes.
Last revised on 04 June 2013.