FEM_TO_TRIANGLE
Convert a Mesh from FEM to Triangle Format {#fem_to_triangle-convert-a-mesh-from-fem-to-triangle-format align="center"}
FEM_TO_TRIANGLE is a C program which reads FEM files of node coordinates and element connectivity, which define a mesh of a 2D region, divided into triangular elements, and creates a corresponding pair of Triangle files.
These files can be used as input to Triangle for viewing, or mesh refinement.
fem_to_triangle prefix
where prefix is the common filename prefix:
- 'prefix'_nodes.txt contains the node coordinates,
- 'prefix'_elements.txt contains the element definitions.
- 'prefix'.node will be the Triangle node file.
- 'prefix'.ele will be the Triangle element file.
The computer code and data files made available on this web page are distributed under the GNU LGPL license.
FEM_TO_TRIANGLE is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version.
FEM_IO, a C library which reads or writes node, element and data files defining a model associated with the finite element method (FEM).
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_XML, a C program which reads FEM files defining a 1D, 2D or 3D mesh, namely a file of node coordinates and a file of elements defined by node indices, and creates a corresponding XML file for input to DOLFIN or FENICS.
FEM2D, a data directory which contains examples of 2D FEM files, text files that describe a 2D geometry and node values associated with the finite element method (FEM);
TRIANGLE_FILES, a data directory which contains examples of files used by the triangle() and showme() programs.
TRIANGLE_IO, a C library which can read or write some of the files created by Jonathan Shewchuk's triangle() program.
- fem_to_triangle.c, the source code.
ELL is an L-shaped region with 65 nodes and 96 elements.
- ell_nodes.txt, the node coordinates in FEM format.
- ell_elements.txt, the elements in FEM format.
- ell.node, the node coordinates in TRIANGLE format.
- ell.ele, the elements in TRIANGLE format.
- MAIN is the main program for FEM_TO_TRIANGLE.
- CH_CAP capitalizes a single character.
- CH_EQI is a case insensitive comparison of two characters for equality.
- CH_TO_DIGIT returns the value of a base 10 digit.
- FILE_COLUMN_COUNT counts the number of columns in the first line of a file.
- FILE_ROW_COUNT counts the number of row records in a file.
- GET_UNIT returns a free FORTRAN unit number.
- I4MAT_DATA_READ reads data from an I4MAT file.
- I4MAT_HEADER_READ reads the header from an I4MAT.
- I4MAT_TRANSPOSE_PRINT prints an I4MAT, transposed.
- I4MAT_TRANSPOSE_PRINT_SOME prints some of the transpose of an I4MAT.
- MESH_BASE_ZERO ensures that the element definition is zero-based.
- R8MAT_DATA_READ reads 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_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.
- TRIANGLE_ELEMENT_WRITE writes a TRIANGLE ".ele" file.
- TRIANGLE_NODE_WRITE writes a TRIANGLE ".node" file.
You can go up one level to the C source codes.
Last revised on 14 October 2014.