FEM_TO_XML
Convert Mesh Data from FEM to DOLFIN XML Format {#fem_to_xml-convert-mesh-data-from-fem-to-dolfin-xml-format align="center"}
FEM_TO_XML is a C++ program which reads FEM files of node coordinates and element connectivity, which define a mesh of a 1D, 2D, or 3D region and creates a corresponding DOLFIN XML file.
These mesh files can be used as input to DOLFIN or FENICS.
fem_to_xml prefix
where prefix is the common filename prefix:
- 'prefix'_nodes.txt contains the node coordinates,
- 'prefix'_elements.txt contains the element definitions.
- 'prefix'.xml will contain the DOLFIN XML mesh file.
The computer code and data files made available on this web page are distributed under the GNU LGPL license.
FEM_TO_XML is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version and a Python version.
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.
FEM_TO_GMSH, a C++ program which reads FEM files definining a 1D, 2D or 3D mesh, namely a file of node coordinates and a file of elements defined by node indices, and creates a Gmsh mesh file.
FEM_TO_MEDIT, a C++ program which reads a pair of FEM files defining node coordinates and elements, and creates a corresponding MEDIT mesh file.
FEM_TO_TRIANGLE, a C++ program which reads FEM files defining a 2D mesh of triangles, namely a file of node coordinates and a file of elements defined by node indices, and creates a corresponding pair of node and element files for use by Jonathan Shewchuk's triangle program.
FENICS, programs which illustrate the use of a collection of free software with an extensive list of features for automated, efficient solution of differential equations.
MITCHELL_FENICS, examples which illustrate the implementation of the Mitchell 2D elliptic partial differential equation (PDE) test problems using FENICS.
TET_MESH, a C++ library which carries out various operations on tetrahedral meshes.
TRIANGULATION, a C++ library which performs various operations on order 3 (linear) or order 6 (quadratic) triangulations.
XML, a data directory which contains examples of XML files, a standard, general datafile format.
XML_TO_FEM, a Python program which reads an XML file created by FENICS or DOLFIN, describing a mesh in 1D, 2D, or 3D, and creates corresponding FEM files, namely, a file of node coordinates, and a file of element connectivities.
- 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:
- fem_to_xml.cpp, the source code.
BATTERY is a rectangular region which was subdivided into 7 faces which were meshed together by MESHFACES.
- battery_nodes.txt, the node coordinates.
- battery_elements.txt, the elements.
- battery.png, a PNG image of the triangulation.
- battery.xml, the corresponding DOLFIN XML mesh file.
CHANNEL/b> is a 3D region, [0,3]x[0,1]x[0,1] [-1,+1], containing 63 nodes and 144 elements.
- channel_nodes.txt, the node coordinates.
- channel_elements.txt, the elements.
- channel.xml, the corresponding DOLFIN XML mesh file.
CHEBY9 is a 1D interval, [-1,+1], containing 9 nodes and 8 elements.
- cheby9_nodes.txt, the node coordinates.
- cheby9_elements.txt, the elements.
- cheby9.xml, the corresponding DOLFIN XML mesh file.
CIRCLE is a 2D circular region which was meshed by MESH2D.
- circle_nodes.txt, the node coordinates.
- circle_elements.txt, the elements.
- circle.png, a PNG image of the triangulation.
- circle.xml, the corresponding DOLFIN XML mesh file.
RECTANGLE is a rectangular region which has been divided into 3 rows and 4 columns of squares, each then split into two 3-node triangles.
- rectangle_nodes.txt, the node coordinates.
- rectangle_elements.txt, the elements.
- rectangle.png, a PNG image of the triangulation, created by TRIANGULATION_PLOT.
- rectangle.xml, the corresponding DOLFIN XML mesh file.
- MAIN is the main program for FEM_TO_XML.
- CH_CAP capitalizes a single character.
- CH_EQI is true if two characters are equal, disregarding case.
- CH_TO_DIGIT returns the integer 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 prints an I4MAT, transposed.
- I4MAT_TRANSPOSE_PRINT_SOME prints some of an I4MAT, transposed.
- MESH_BASE_ZERO ensures that the element definition is zero-based.
- R8MAT_DATA_READ reads the data from an R8MAT file.
- R8MAT_HEADER_READ reads the header from an R8MAT file.
- R8MAT_TRANSPOSE_PRINT prints an R8MAT, transposed.
- 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.
- 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 06 October 2014.