FENICS_TO_TXYZ
Write FENICS Mesh and Solution Data Files


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

The file fenics_to_txyz.py writes two files:

Licensing:

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_TXYZ solves an equation, and writes out two files: the the element node connectivity, and the node coordinates, with the solution value added as a "Z" coordinate.


Last revised on 28 November 2018.