NAME
ElmB4n2D - definition of 2D bilinear finite element
INCLUDE
include "ElmDefs.h"
SYNTAX
class ElmB4n2D : public ElmTensorProd
{
public:
ElmB4n2D ();
~ElmB4n2D () {}
// efficient version:
virtual void geomtFunc (Vec(real)& N, const Ptv(real)& loc_pt) const;
virtual void dLocGeomtFunc (Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
const;
static void shape (Vec(real)& N, const Ptv(real)& loc_pt);
static void dshape (Mat(real)& dNloc, const Ptv(real)& loc_pt);
static void d2shape (ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt);
virtual bool findLocPt // find local pt corresponding to global pt
(
const Ptv(real)& globpt, // global pt
Ptv(real)& locpt, // local pt (output)
int& niter, // no of Newton iterations in algorithm
real& error, // error from the Newton iteration
const Mat(real)& coor // global coordinates of the nodes
);
virtual void drawElement
(
const Mat(real)& coor, // global, nodal coordinates
GraphBasics& plotter, // graphics: data, functions, dvi-code
int resolution = 1 // no of line segments along an edge
)const;
CLASS_INFO
};
KEYWORDS
finite element, bilinear 2D element, Lagrange element family
DESCRIPTION
The class is derived from class ElmTensorProd and restricts the
interpolation to be of order one and the number of space dimen
sions to equal two. That is, this is the standard 2D bilinear
quadrilateral finite element with 4 nodes. Since the geometry
and basis functions are hardcoded for this particular element,
geomtFunc and basisFunc are more efficient than the corresponding
functions in ElmTensorProd1.
Most of the operations on this element type are defined through
virtual functions or member functions of the base class ElmDef.
See the documentation of class ElmDef for further explanation of
the interface. Some of the functions defined in base classes may
be found reimplemented in this class in order to increase effi
ciency by taking advantage of the information on the interpola
tion order and the number of space dimensions.
CONSTRUCTORS AND INITIALIZATION
The only constructor performs all the initialization.
SEE ALSO
class ElmDef, class ElmTensorProd
DEVELOPED BY
SINTEF Applied Mathematics, Oslo, Norway, and University of Oslo,
Dept. of Mathematics, Norway
AUTHOR
Hans Petter Langtangen, SINTEF/UiO, additions by Klas Samuelsson,
UiO