FENICS_TO_TXYV
Write FENICS Mesh and Solution Data Files


FENICS_TO_TXYV a FENICS script which illustrates how a mesh or scalar function computed by the FENICS program can be written to files, which can then be used to create images, or as input to meshing programs or other analysis tools.

The file fenics_to_txyv.py writes three files:

The node and element files can be used, for example, with the MATLAB program fem2d_mesh_display or the C++ program fem2d_mesh_display_opengl in order to display the mesh. The node, element, and value files can be used to display a surface plot of U(X,Y), using the MATLAB program fem2d_scalar_display.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Related Data and Programs:

DOLFIN-CONVERT, a Python program which can convert a mesh file from a given format to an XML format suitable for use by DOLFIN or FENICS, by Anders Logg.

DOLFIN_XML, a data directory which contains examples of XML files that describe 3D finite element meshes as used by DOLFIN and FENICS.

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_MESH_DISPLAY, a MATLAB program which reads the FEM model of a 2D mesh, consisting of polygonal elements of any uniform order, and displays an image of the elements and nodes, with optional numbering.

FEM2D_MESH_DISPLAY_OPENGL, a C++ program which reads the FEM model of a 2D mesh, consisting of polygonal elements of any uniform order, and displays an image of the elements and nodes using OpenGL.

FEM2D_SCALAR_DISPLAY, a MATLAB program which reads information about nodes, elements and nodal values for a 2D finite element method (FEM) and creates a surface plot of U(X,Y), using the MATLAB graphics system.

FEM2D_SCALAR_DISPLAY_BRIEF, a MATLAB program which reads information about nodes, elements and nodal values for a 2D finite element method (FEM) and creates a surface plot of U(X,Y), using the MATLAB graphics system, in 5 lines of code.

FEM2D_SCALAR_DISPLAY_GPL, a MATLAB program which reads information about nodes, elements and nodal values for a 2D finite element method (FEM) and creates a GPL file describing a surface plot of U(X,Y), which can be displayed by gnuplot.

GMSH, examples which illustrate the use of the gmsh program, a 3D mesh generator for the finite element method (FEM).

PARAVIEW, examples which illustrate the use of the paraview interactive visualization program.

VISIT, examples which illustrate the use of the visit interactive graphics program.

VTK, a data directory which contains examples of legacy VTK files, a file format used by the Visualization Toolkit, and which can be displayed by programs such as paraview and visit;

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.

Examples and Tests:

FENICS_TO_TXYV solves an equation, and writes out three files, namely, the element node connectivity, the node coordinates, and the solution values.


Last revised on 28 November 2018.