AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::mint::Lagrange< CELLTYPE > Class Template Reference

Defines the Lagrange family of Finite Elements. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/mint/fem/shape_functions/Lagrange.hpp>

Inheritance diagram for axom::mint::Lagrange< CELLTYPE >:

Static Public Member Functions

static CellType getCellType ()
 Returns the cell type of this instance. More...
 
static int getType ()
 Returns the Basis function type. More...
 
static int getNumDofs ()
 Returns the number of degrees of freedom on this Finite Element. More...
 
static int getMaxNewtonIters ()
 Returns the max number of newton iterations for this Finite Element. More...
 
static int getDimension ()
 Returns the dimension of the reference element. More...
 
static int getMin ()
 Returns the min coordinate of the element's reference space. More...
 
static int getMax ()
 Returns the max coordinate of the element's reference space. More...
 
static void getCenter (double *AXOM_UNUSED_PARAM(center))
 Returns the centroid of the reference element. More...
 
static void getCoords (double *AXOM_UNUSED_PARAM(coords))
 Returns the coordinates of the reference element. More...
 
static void computeShape (const double *AXOM_UNUSED_PARAM(nc), double *AXOM_UNUSED_PARAM(phi))
 Computes the shape functions of the Finite Element at the given natural coordinates, \( \xi \). More...
 
static void computeDerivatives (const double *AXOM_UNUSED_PARAM(nc), double *AXOM_UNUSED_PARAM(phidot))
 Computes the shape function first derivatives for the Finite Element at the given natural coordinates, \( \xi \). More...
 
Generic ShapeFunction API
static CellType cellType ()
 Returns the underlying cell type, e.g., MINT_QUAD, etc. More...
 
static int type ()
 Returns the Finite Element basis family type. More...
 
static int numDofs ()
 Returns the number of degrees of freedom. More...
 
static int maxNewtonIters ()
 Returns the maximum number of iterations for the Newton-Raphson. More...
 
static int dimension ()
 Returns the dimension of the reference element. More...
 
static double min ()
 Returns the min coordinate of the reference element. More...
 
static double max ()
 Returns the max coordinate of the reference element. More...
 
static void center (double *center)
 Returns the center of the reference element. More...
 
static void coords (double *coords)
 Returns the coordinates of the reference element. More...
 
static void evaluate (const double *nc, double *phi)
 Evaluates the ShapeFunction at the given natural coordinates. More...
 
static void derivatives (const double *nc, double *phidot)
 Evaluates the first derivatives of the shape function at the given natural coordinates. More...
 

Detailed Description

template<CellType CELLTYPE>
class axom::mint::Lagrange< CELLTYPE >

Defines the Lagrange family of Finite Elements.

Template Parameters
CELLTYPEthe cell type of the element, e.g., mint::QUAD, etc.
Note
This is the default implementation. Only stubs are defined at this level.This class is specialized according to cell type.

Member Function Documentation

◆ getCellType()

template<CellType CELLTYPE>
static CellType axom::mint::Lagrange< CELLTYPE >::getCellType ( )
inlinestatic

Returns the cell type of this instance.

Returns
c the cell type, e.g., MINT_QUAD etc.
See also
CellTypes.hpp
Note
This method is implemented in specialized instances.

References AXOM_STATIC_ASSERT, axom::mint::cellTypeToInt(), and axom::mint::NUM_CELL_TYPES.

◆ getType()

template<CellType CELLTYPE>
static int axom::mint::Lagrange< CELLTYPE >::getType ( )
inlinestatic

Returns the Basis function type.

Returns
b the basis thpe, e.g., MINT_LAGRANGE_BASIS
See also
FEBasisTypes.hpp
Note
This method is implemented in specialized instances.

References AXOM_STATIC_ASSERT, axom::mint::cellTypeToInt(), MINT_UNDEFINED_BASIS, and axom::mint::NUM_CELL_TYPES.

◆ getNumDofs()

template<CellType CELLTYPE>
static int axom::mint::Lagrange< CELLTYPE >::getNumDofs ( )
inlinestatic

Returns the number of degrees of freedom on this Finite Element.

Returns
nodfs the number of degrees of freedom.
Note
This method is implemented in specialized instances.

References AXOM_STATIC_ASSERT, axom::mint::cellTypeToInt(), and axom::mint::NUM_CELL_TYPES.

◆ getMaxNewtonIters()

template<CellType CELLTYPE>
static int axom::mint::Lagrange< CELLTYPE >::getMaxNewtonIters ( )
inlinestatic

Returns the max number of newton iterations for this Finite Element.

Returns
N the max number of newton iterations
Postcondition
N >= 1
Note
This method is implemented in specialized instances.

References AXOM_STATIC_ASSERT, axom::mint::cellTypeToInt(), and axom::mint::NUM_CELL_TYPES.

◆ getDimension()

template<CellType CELLTYPE>
static int axom::mint::Lagrange< CELLTYPE >::getDimension ( )
inlinestatic

Returns the dimension of the reference element.

Returns
dim the dimension of the reference element
Postcondition
dim >= 1 && dim <= 3
Note
This method is implemented in specialized instances.

References AXOM_STATIC_ASSERT, axom::mint::cellTypeToInt(), and axom::mint::NUM_CELL_TYPES.

◆ getMin()

template<CellType CELLTYPE>
static int axom::mint::Lagrange< CELLTYPE >::getMin ( )
inlinestatic

Returns the min coordinate of the element's reference space.

Returns
min the min coordinate of the element's reference space, e.g., 0
Note
This method is implemented in specialized instances.

References AXOM_STATIC_ASSERT, axom::mint::cellTypeToInt(), and axom::mint::NUM_CELL_TYPES.

◆ getMax()

template<CellType CELLTYPE>
static int axom::mint::Lagrange< CELLTYPE >::getMax ( )
inlinestatic

Returns the max coordinate of the element's reference space.

Returns
max the max coordinate of the element's reference space, e.g., 1
Note
This method is implemented in specialized instances.

References AXOM_STATIC_ASSERT, axom::mint::cellTypeToInt(), and axom::mint::NUM_CELL_TYPES.

◆ getCenter()

template<CellType CELLTYPE>
static void axom::mint::Lagrange< CELLTYPE >::getCenter ( double *  AXOM_UNUSED_PARAMcenter)
inlinestatic

Returns the centroid of the reference element.

Parameters
[out]centerndims long buffer to store the centroid
Precondition
center != nullptr
Note
This method is implemented in specialized instances.

References AXOM_STATIC_ASSERT, axom::mint::cellTypeToInt(), and axom::mint::NUM_CELL_TYPES.

◆ getCoords()

template<CellType CELLTYPE>
static void axom::mint::Lagrange< CELLTYPE >::getCoords ( double *  AXOM_UNUSED_PARAMcoords)
inlinestatic

Returns the coordinates of the reference element.

Parameters
[out]coordsndims*ndofs long buffer to store the coordinates
Precondition
coords != nullptr
Note
The coordinates are arranged in column-major flat array layout.
This method is implemented in specialized instances.

References AXOM_STATIC_ASSERT, axom::mint::cellTypeToInt(), and axom::mint::NUM_CELL_TYPES.

◆ computeShape()

template<CellType CELLTYPE>
static void axom::mint::Lagrange< CELLTYPE >::computeShape ( const double *  AXOM_UNUSED_PARAMnc,
double *  AXOM_UNUSED_PARAMphi 
)
inlinestatic

Computes the shape functions of the Finite Element at the given natural coordinates, \( \xi \).

Parameters
[in]ncnatural coordinates at which to compute the shape functions
[out]phibuffer (ndofs long) to store the shape functions
Precondition
nc != nullptr
phi != nullptr
Note
This method is implemented in specialized instances.

References AXOM_STATIC_ASSERT, axom::mint::cellTypeToInt(), and axom::mint::NUM_CELL_TYPES.

◆ computeDerivatives()

template<CellType CELLTYPE>
static void axom::mint::Lagrange< CELLTYPE >::computeDerivatives ( const double *  AXOM_UNUSED_PARAMnc,
double *  AXOM_UNUSED_PARAMphidot 
)
inlinestatic

Computes the shape function first derivatives for the Finite Element at the given natural coordinates, \( \xi \).

Parameters
[in]ncnatural coordinates at which to compute the derivatives
[out]phidotbuffer (ndofs*ndims long) for the derivatives
Precondition
nc != nullptr
phidot != nullptr
Note
This method is implemented in specialized instances.

References AXOM_STATIC_ASSERT, axom::mint::cellTypeToInt(), and axom::mint::NUM_CELL_TYPES.

◆ cellType()

static CellType axom::mint::ShapeFunction< Lagrange< CELLTYPE > >::cellType ( )
inlinestaticinherited

Returns the underlying cell type, e.g., MINT_QUAD, etc.

Returns
cellType the cell type
See also
CellType.hpp

◆ type()

static int axom::mint::ShapeFunction< Lagrange< CELLTYPE > >::type ( )
inlinestaticinherited

Returns the Finite Element basis family type.

Returns
type the basis function type, e.g., MINT_LAGRANGE_BASIS
See also
FEBasisTypes.hpp

◆ numDofs()

static int axom::mint::ShapeFunction< Lagrange< CELLTYPE > >::numDofs ( )
inlinestaticinherited

Returns the number of degrees of freedom.

Returns
ndofs the number of degrees of freedom
Postcondition
ndofs >= 1

◆ maxNewtonIters()

static int axom::mint::ShapeFunction< Lagrange< CELLTYPE > >::maxNewtonIters ( )
inlinestaticinherited

Returns the maximum number of iterations for the Newton-Raphson.

Returns
N the maximum number of Newton-Raphson iterations

◆ dimension()

static int axom::mint::ShapeFunction< Lagrange< CELLTYPE > >::dimension ( )
inlinestaticinherited

Returns the dimension of the reference element.

Returns
ndims the dimension of the reference element
Postcondition
ndims >= 1

◆ min()

static double axom::mint::ShapeFunction< Lagrange< CELLTYPE > >::min ( )
inlinestaticinherited

Returns the min coordinate of the reference element.

Returns
min the min coordinate of the reference element

◆ max()

static double axom::mint::ShapeFunction< Lagrange< CELLTYPE > >::max ( )
inlinestaticinherited

Returns the max coordinate of the reference element.

Returns
max the max coordinate of the reference element

◆ center()

static void axom::mint::ShapeFunction< Lagrange< CELLTYPE > >::center ( double *  center)
inlinestaticinherited

Returns the center of the reference element.

Parameters
[out]centerbuffer (ndims long) to store the centroid
Precondition
center != nullptr

◆ coords()

static void axom::mint::ShapeFunction< Lagrange< CELLTYPE > >::coords ( double *  coords)
inlinestaticinherited

Returns the coordinates of the reference element.

Parameters
[out]coordsbuffer (ndims*ndofs long) to store the coordinates
Precondition
coords != nullptr
Note
THe coordinates are arranged in column-major flat array layout

◆ evaluate()

static void axom::mint::ShapeFunction< Lagrange< CELLTYPE > >::evaluate ( const double *  nc,
double *  phi 
)
inlinestaticinherited

Evaluates the ShapeFunction at the given natural coordinates.

Parameters
[in]ncnatural coordinates at which to compute the shape functions
[out]phibuffer (ndofs long) to store the shape function.
Precondition
nc != nullptr
phi != nullptr

◆ derivatives()

static void axom::mint::ShapeFunction< Lagrange< CELLTYPE > >::derivatives ( const double *  nc,
double *  phidot 
)
inlinestaticinherited

Evaluates the first derivatives of the shape function at the given natural coordinates.

Parameters
[in]ncnatural coordinates at which to compute the derivatives
[out]phidotbuffer (ndofs*ndims long) to store the derivatives
Precondition
nc != nullptr
phidot != nullptr

The documentation for this class was generated from the following file: