FEM2D_PACK
Finite Element Routines
FEM2D_PACK
is a FORTRAN77 library which
can help in implementing the finite element method.
The emphasis is on simplicity and clarity.
Primarily, the 2D planar case is handled, with a choice
of low order triangular ("T") and quadrilateral ("Q") elements.
A few routines are included for computing a "sphere grid",
that is, a finite element mesh on the surface of a sphere.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
FEM2D_PACK is available in
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
FEM2D,
a data directory which
contains examples of 2D FEM files,
three text files that describe a 2D finite element geometry;
FEM2D_HEAT,
a FORTRAN90 program which
solves the 2D time dependent heat equation on the unit square.
FEM2D_POISSON,
a FORTRAN90 program which
solves the 2D Poisson equation on a square, using the finite element method.
FEM2D_SAMPLE,
a FORTRAN77 library which
evaluates a finite element function defined on an order 3 or order 6 triangulation.
HOT_PIPE,
a MATLAB program which
uses FEM_50_HEAT to solve the heat equation for a pipe model.
HOT_POINT,
a MATLAB program which
uses FEM_50_HEAT to solve the heat equation for a 2D region with a hot point.
MESH_BANDWIDTH,
a FORTRAN90 program which
returns the geometric bandwidth associated with a mesh of
elements of any order and in a space of arbitrary dimension.
POLYGONAL_SURFACE,
a data directory which
contains a description of the data files
that can be used to describe a polygonal surface. FEM2D_PACK includes
routines for creating a polygonal surface grid of a sphere.
TRIANGULATION_ORDER3,
a data directory which
contains a description and examples of order 3 (linear) triangulations.
TRIANGULATION_ORDER6,
a data directory which
contains a description and examples of an order 6 triangulation.
TRIANGULATION_ORDER6_CONTOUR,
a MATLAB program which
makes contour plots of data defined on an order 6 triangulation.
WANDZURA,
a FORTRAN90 library which
defines Wandzura rules for quadrature on a triangle.
Reference:
-
Milton Abramowitz, Irene Stegun,
Handbook of Mathematical Functions,
National Bureau of Standards, 1964,
ISBN: 0-486-61272-4,
LC: QA47.A34.
-
Jack Dongarra, Jim Bunch, Cleve Moler, Pete Stewart,
LINPACK User's Guide,
SIAM, 1979,
ISBN13: 978-0-898711-72-1.
-
Vladimir Krylov,
Approximate Calculation of Integrals,
Dover, 2006,
ISBN: 0486445798.
-
Hans Rudolf Schwarz,
Finite Element Methods,
Academic Press, 1988,
ISBN: 0126330107,
LC: TA347.F5.S3313.
-
Gilbert Strang, George Fix,
An Analysis of the Finite Element Method,
Cambridge, 1973,
ISBN: 096140888X,
LC: TA335.S77.
-
Arthur Stroud,
Approximate Calculation of Multiple Integrals,
Prentice Hall, 1971,
ISBN: 0130438936,
LC: QA311.S85.
-
Arthur Stroud, Don Secrest,
Gaussian Quadrature Formulas,
Prentice Hall, 1966,
LC: QA299.4G3S7.
-
Olgierd Zienkiewicz,
The Finite Element Method,
Sixth Edition,
Butterworth-Heinemann, 2005,
ISBN: 0750663200,
TA640.2.Z54
-
Daniel Zwillinger, editor,
CRC Standard Mathematical Tables and Formulae,
30th Edition,
CRC Press, 1996,
ISBN: 0-8493-2479-3.
Source Code:
Examples and Tests:
-
fem2d_pack_prb.f, the calling program;
-
fem2d_pack_prb.sh,
commands to compile, link and run the calling program;
-
fem2d_pack_prb_output.txt,
the output file.
-
fem2d_pack_prb_q4.png,
a PNG image of
a Q4 mesh.
-
fem2d_pack_prb_t3.png,
a PNG image of
a T3 mesh.
-
fem2d_pack_prb_t4.png,
a PNG image of
a T4 mesh.
-
fem2d_pack_prb_t6.png,
a PNG image of
a T6 mesh.
-
sphere_q4_nodes.txt,
a node file for a Q4 mesh, which is also a
polygonal surface,
that approximates a sphere.
-
sphere_q4_elements.txt,
an element file for a Q4 mesh, which is also a
polygonal surface,
that approximates a sphere.
-
sphere_q9_nodes.txt,
a node file for a Q9 mesh
that approximates a sphere.
-
sphere_q9_elements.txt,
an element file for a Q9 mesh
that approximates a sphere.
-
sphere_q16_nodes.txt,
a node file for a Q16 mesh
that approximates a sphere.
-
sphere_q16_elements.txt,
an element file for a Q16 mesh
that approximates a sphere.
-
sphere_t3_nodes.txt,
a node file for a T3 mesh, which is also a
polygonal surface,
that approximates a sphere.
-
sphere_t3_elements.txt,
an element file for a T3 mesh, which is also a
polygonal surface,
that approximates a sphere.
-
sphere_t6_nodes.txt,
a node file for a T6 mesh
that approximates a sphere.
-
sphere_t6_elements.txt,
an element file for a T6 mesh
that approximates a sphere.
List of Routines:
-
BANDWIDTH_MESH: bandwidth of finite element mesh.
-
BANDWIDTH_VAR determines the bandwidth for finite element variables.
-
BASIS_MN_T3: all bases at N points for a T3 element.
-
BASIS_11_Q4: one basis at one point for a Q4 element.
-
BASIS_11_Q4_TEST verifies BASIS_11_Q4.
-
BASIS_MN_T6: all bases at N points for a T6 element.
-
CH_CAP capitalizes a single character.
-
DEGREES_TO_RADIANS converts an angle measure from degrees to radians.
-
DTABLE_WRITE0 writes a DTABLE file with no header.
-
ELEMENT_CODE returns the code for each element.
-
GET_UNIT returns a free FORTRAN unit number.
-
I4_MODP returns the nonnegative remainder of integer division.
-
I4_WRAP forces an I4 to lie between given limits by wrapping.
-
ITABLE_WRITE0 writes an ITABLE file with no header.
-
R8_HUGE returns a "huge" R8.
-
R8_POWER computes the P-th power of an R8.
-
R8_SWAP switches two R8's.
-
R8_UNIFORM_01 returns a unit pseudorandom R8.
-
R8MAT_PRINT prints an R8MAT.
-
R8MAT_PRINT_SOME prints some of an R8MAT.
-
REFERENCE_TO_PHYSICAL_T3 maps T3 reference points to physical points.
-
REFERENCE_TO_PHYSICAL_T6 maps T6 reference points to physical points.
-
TIMESTAMP prints out the current YMDHMS date as a timestamp.
You can go up one level to
the FORTRAN77 source codes.
Last revised on 07 August 2009.