Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

ElmTensorProd Class Reference

definition of tensor product finite elements (hypercubes). More...

#include <ElmDefs.h>

Inheritance diagram for ElmTensorProd::

ElmDef HandleId ElmB27n3D ElmB2n1D ElmB3n1D ElmB4n2D ElmB8n3D ElmB9n2D ElmTensorProd1 ElmTensorProd2 List of all members.

Public Methods

 ElmTensorProd (int nsd, int order)
virtual NumItgDomain getSideShape (int) const
virtual void geomtFunc (Vec(real) &N, const Ptv(real) &loc_pt) const
virtual void basisFunc (Vec(real) &N, const Ptv(real) &loc_pt) const
virtual void dLocGeomtFunc (Mat(real) &dNloc, const Ptv(real) &loc_pt) const
virtual void dLocBasisFunc (Mat(real) &dNloc, const Ptv(real) &loc_pt) const
virtual void d2LocBasisFunc (ArrayGen(real) &d2Nloc, const Ptv(real) &loc_pt) const
virtual bool findLocPt (const Ptv(real) &globpt, Ptv(real) &locpt, int &niter, real &error, const Mat(real) &coor)
virtual void drawElement (const Mat(real) &coor, GraphBasics &plotter, int resolution=1) const
virtual void drawSide (int side, const Mat(real) &coor, GraphBasics &plotter, int resolution=1) const
virtual void drawEdge (int side1, int side2, const Mat(real) &coor, GraphBasics &plotter, int resolution=1) const
virtual void calcMidSideNodes (Mat(real) &coor)
virtual int getNoNodesOnEdge () const

Static Public Methods

void setUpNodesOnSides (int n1D, int nsd, MatSimple(int) &side_nodes)
void setUpNodeCoor (int n1D, int nsd, MatSimple(real) &loc_coor)
void basis1D (Vec(real) &Ni_1D, int n1D, real ksi)
void Dbasis1D (Vec(real) &dNi_1D, int n1D, real ksi)
void D2basis1D (Vec(real) &d2Ni_1D, int n1D, real ksi)

Protected Methods

 ~ElmTensorProd ()

Protected Attributes

int n1D

Detailed Description

definition of tensor product finite elements (hypercubes).

NAME: ElmTensorProd - definition of tensor product finite elements (hypercubes)

DESCRIPTION:

The class is derived from class "ElmDef" and defines tensor product elements in their local element coordinate system. Elements in an arbitrary number of space dimensions are provided. In the present implementation elements of first and second order are included, but extensions are possible. That is, this class is suited for linear (1D), quadratic (1D), bilinear (2D), biquadratic (2D), trilinear (3D) and triquadratic (3D) elements and their corresponding higher dimensional (nD) generalizations.

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.

In the "ElmDef" hierarchy there are specializations of "ElmTensorProd" with more direct names such as "ElmB9n2D." In the present implementation all these specializations inherit their functionality from class "ElmTensorProd" such that from a computational point of view all these classes are equivalent. However, some users will prefer to work with distinct names, such as "ElmB4n2D", that reflects both the element shape, the number of nodes and the space dimension. Implementations such as "ElmB4n2D" are specialized for this element and the evaluation of the geometry and basis functions is more efficient than for "ElmTensorProd1".


Constructor & Destructor Documentation

ElmTensorProd::~ElmTensorProd ( ) [protected]
 

ElmTensorProd::ElmTensorProd ( int nsd,
int order )
 

The only constructor performs all the initialization, provided input on the number of spatial dimensions and the element order.


Member Function Documentation

static void ElmTensorProd::D2basis1D ( Vec(real) & d2Ni_1D,
int n1D,
real ksi ) [static]
 

similar to "basis1D", this function implements the second derivative of the 1D basis functions. This functionality is not available for orders larger than 2.

static void ElmTensorProd::Dbasis1D ( Vec(real) & dNi_1D,
int n1D,
real ksi ) [static]
 

similar to "basis1D", this function implements the first derivative of the 1D basis functions.

static void ElmTensorProd::basis1D ( Vec(real) & Ni_1D,
int n1D,
real ksi ) [static]
 

implements the 1D basis functions to be used in 1D computations or as a building block for the basis functions of higher-dimensional elements.

void ElmTensorProd::basisFunc ( Vec(real) & N,
const Ptv(real) & loc_pt ) const [inline, virtual]
 

calculates the basis (trial) functions over the element. In other words, the routine computes the interpolation functions for functions defined over the element. Functions entering differential equations etc should be interpolated according to these basis functions. The return array "N" can be empty (not ok) at input, the "basisFunc" will redimension the array properly. The length of "N" equals the number of basis function nodes in the element. For isoparametric elements "basisFunc" and "geomtFunc" are identical. However, for mixed finite elements, one may have a bilinear geometry function (four nodes) and, e.g., a constant basis function. The basis function has then only one node (for example in the centroid of the element) and the length of "N" will be 1. Confer subclasses and the FAQ for information on conventions regarding basis function nodes and the ordering. It should be mentioned that class "BasisFuncGrid" is used to assign basis nodes to a grid (class "GridFE" is meant to contain the geometry of the grid, including geometry nodes).

Reimplemented from ElmDef.

Reimplemented in ElmBH2n1D, ElmB2gn1bn1D, ElmB9gn4bn2D, ElmB4gn1bn2D, ElmB4gn2bn2Du, ElmB4gn2bn2Dv, ElmB8gn1bn3D, ElmB27gn8bn3D, and ElmB27gn1bn3D.

void ElmTensorProd::calcMidSideNodes ( Mat(real) & coor ) [virtual]
 

if mid-side nodes are missing, calculate their coordinates by an interpolation scheme that is suited for the element.

Reimplemented from ElmDef.

Reimplemented in ElmB9n2D, and ElmB27n3D.

void ElmTensorProd::d2LocBasisFunc ( ArrayGen(real) & d2Nloc,
const Ptv(real) & loc_pt ) const [virtual]
 

the second order derivatives in the local element coordinates of the functions defined by "basisFunc".

Reimplemented from ElmDef.

Reimplemented in ElmB2n1D, ElmBH2n1D, ElmB4n2D, ElmB8n3D, ElmB2gn1bn1D, ElmB9gn4bn2D, ElmB4gn1bn2D, ElmB4gn2bn2Du, ElmB4gn2bn2Dv, ElmB8gn1bn3D, and ElmB27gn1bn3D.

void ElmTensorProd::dLocBasisFunc ( Mat(real) & dNloc,
const Ptv(real) & loc_pt ) const [inline, virtual]
 

the derivatives in the local element coordinates of the functions defined by "basisFunc." As for the "geomtFunc" and "basisFunc" functions the return array can be empty or have wrong dimension at input. The function will redimension the array properly.

Reimplemented from ElmDef.

Reimplemented in ElmBH2n1D, ElmB2gn1bn1D, ElmB9gn4bn2D, ElmB4gn1bn2D, ElmB4gn2bn2Du, ElmB4gn2bn2Dv, ElmB8gn1bn3D, ElmB27gn8bn3D, and ElmB27gn1bn3D.

void ElmTensorProd::dLocGeomtFunc ( Mat(real) & dNloc,
const Ptv(real) & loc_pt ) const [virtual]
 

the derivatives in the local element coordinates of the functions defined by "geomtFunc." As for the "geomtFunc" and "basisFunc" functions the return array can be empty or have wrong dimension at input. The function will redimension the array properly.

Reimplemented from ElmDef.

Reimplemented in ElmB2n1D, ElmB4n2D, and ElmB8n3D.

void ElmTensorProd::drawEdge ( int side1,
int side2,
const Mat(real) & coor,
GraphBasics & plotter,
int resolution = 1 ) const [inline, virtual]
 

function for drawing the intersection of two specified sides of an element in the global, physical coordinate system. See "drawElement" for comments.

Reimplemented from ElmDef.

void ElmTensorProd::drawElement ( const Mat(real) & coor,
GraphBasics & plotter,
int resolution = 1 ) const [inline, virtual]
 

function for drawing an element in the global, physical coordinate system. The drawing consists of geometric primitives (line segments) in the "GraphBasics" format. Note that this function does not flush or close the "GraphBasics" file so the physical file may be incomplete after a call to this function. An explicit call to "GraphBasics close" will complete the file and make it ready for reading. The function is used in drawing routines in class "DrawFE".

Reimplemented from ElmDef.

Reimplemented in ElmB4n2D, and ElmB8n3D.

void ElmTensorProd::drawSide ( int side,
const Mat(real) & coor,
GraphBasics & plotter,
int resolution = 1 ) const [inline, virtual]
 

function for drawing a specified side of an element in the global, physical coordinate system. See "drawElement" for comments.

Reimplemented from ElmDef.

bool ElmTensorProd::findLocPt ( const Ptv(real) & globpt,
Ptv(real) & locpt,
int & niter,
real & error,
const Mat(real) & coor ) [inline, virtual]
 

given a global point, the function solves the inverse mapping equations to find the corresponding local coordinates. Newton-Raphson iteration is used for the solution. The function is mainly used in the "findElmAndLocPt" functions in class "GridFE".

Reimplemented from ElmDef.

Reimplemented in ElmB4n2D.

void ElmTensorProd::geomtFunc ( Vec(real) & N,
const Ptv(real) & loc_pt ) const [virtual]
 

calculates the geometry functions on the element (see the description above). These functions are used for the isoparametric mapping associated with the element (these functions determine the geometric shape of the element in the global, physical coordinate system). Recall that the geometry functions are defined with respect to the local element coordinate system and the local node numbering of the element. The return array "N" can be empty (not ok) at input; the "geomtFunc" will redimension the array properly. The "N" array contains the values of the geometry functions at the evaluation point. The length of the "N" array equals the number of (geometry) nodes in the element, and the ordering of the entries in "N" follow the ordering of the local nodes

Reimplemented from ElmDef.

Reimplemented in ElmB2n1D, ElmB4n2D, and ElmB8n3D.

int ElmTensorProd::getNoNodesOnEdge ( ) const [inline, virtual]
 

returns the number of nodes on an edge (an edge is the intersection between two adjacent sides in a 3D element). The function has no meaning for 1D and 2D elements.

Reimplemented from ElmDef.

NumItgDomain ElmTensorProd::getSideShape ( int side ) const [inline, virtual]
 

returns the shape of the sides of the element. This is the counterpart to "getDomainShape" for example for numerical integration over the sides.

Reimplemented from ElmDef.

static void ElmTensorProd::setUpNodeCoor ( int n1D,
int nsd,
MatSimple(real) & loc_coor ) [static]
 

load the "MatSimple" object with coordinate values for each node in the element. The row index refers to local node numbering, and the column index refers to the spatial direction. The number of nodes in the element is "n1D" to the power of "nsd".

static void ElmTensorProd::setUpNodesOnSides ( int n1D,
int nsd,
MatSimple(int) & side_nodes ) [static]
 

similar to the "setUpNodeCoor", this function fills a "MatSimple" object with node numbers for each side. The row index refers to side numbers, and the column index refers to local node numbers.


Member Data Documentation

int ElmTensorProd::n1D [protected]
 


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.