About - Overview

Functionality of Intrepid is organized by directory as follows:

  • Cell: tools for managing cells (elements) in mesh-based numerical methods for PDEs. This includes methods to query cell topologies of standard cells, construction of custom (usr-defined) cell topologies, mappings from reference to physical coordinates for select cell topologies, inclusion tests, and methods to compute edge tangents and face normals in reference and physical coordinates.
  • Discretization: tools for building discretizations of PDEs. This includes definition of Basis functions on select cell topologies; definition of Integration rules for one, two and three-dimensional reference cells, and a set of FunctionSpaceTools for computation of integrals, and transformation (pullback) of basis functions from reference to physical frame.
  • Shared: tools for operations on generic multi-dimensional arrays (ArayTools), implementation of Intrepid's own version of multidimensional array (FieldContainer), collection of methods for vectors and matrices in Euclidean spaces (RealSpaceTools); methods to define various point lattices used by finite element basis functions (PointTools); Intrepid's version of Polylib library. Also included in Shared are definitions of types, enumerations and global constants (Types) used by Intrepid; and various utilities (Utils).

An overview of the basic requirements and features of Intrepid follows. For more details, please consult the documentation!


Mutli-dimensional arrays

The expert version of Intrepid is essentially a collection of mathematical methods operating on user-supplied data. To promote interoperability and easy porting to existing user codes, most of Intrepid classes are templated on generic multi-dimensional arrays. Users can implement their own arrays, use Intrepid's FieldContainer, or use multi-dimensional arrays from Shards. In either case, a multi-dimensional array class used with Intrepid is expected to support the following minimal interface:

Required multi-dimensional array interface
int rank() returns number of dimensions
int dimension(int k) returns th k-th dimension
int size() returns size, i.e., number of scalar values that can be stored (capacity)
const Scalar& operator(i,j,...,k) const accessor using multi-index
Scalar& operator(i,j,...,k) non-const accessor using multi-index
const Scalar& operator[i] const accessor using the ordinal of the array element
Scalar& operator[i] non-const accessor using the ordinal of the array element

Intrepid documentation uses the following notation for indices and dimensions of multi-dimensional arrays:

Dimension and index notation used in Intrepid
Index Index Type Dimension Description
p point P number of points
v or n vertex or node V number of vertices or nodes
f,l,r field F,L,R number of Fields, Left field and Right fields (in integration)
c cell C number of cells
i field coordinate D space dimension
k derivative ordinal K cardinality of the set of all kth order derivatives

Here are some examples of typical multi-dimensional array formats that are ubiquitous in PDE codes:

Typical multi-dimensional arrays in PDE codes
Rank Dimensions Multi-index Description
1 (P) (p) Scalar (rank 0) field evaluated at P points
2 (P,D) (p,i) Vector (rank 1) field evaluated at P points
3 (P,D,D) (p,i,j) Tensor (rank 2) field evaluated at P points
2 (F,P) (f,p) F scalar fields evaluated at P points
3 (F,P,D) (f,p,i) F vector fields evaluated at P points
4 (F,P,D,D) (f,p,i,j) F tensor fields evaluated at P points
3 (F,P,K) (f,p,k) kth derivatives of F scalar fields evaluated at P points
4 (F,P,D,K) (f,p,i,k) kth derivatives of F vector fields evaluated at P points
5 (F,P,D,D,K) (f,p,i,j,k) kth deriv. of F tensor fields evaluated at P points
3 (C,V,D) (c,v,i) Vertex coords. of C cells having V vertices each
3 (C,P,D) (c,p,i) Coordinates of C*P points in C cells, P points per cell

 


Basis definitions

Naming of basis classes and filesfollows a convention that allows to quickly determine the type of basis implemented in a particular class. Each name consists of 4 fields. The following table shows the currently admissible values for each field:

Naming of basis classes
Field Admissible field values
function space HGRAD, HCURL, HDIV, HVOL
cell topology LINE, QUAD, TRI, HEX, TET, WEDGE
discrete space type C (Complete), I (Incomplete), B (Broken)
basis order 0,...,10
basis type FEM (default basis implementation), FEM_JACOBI, FEM_ORTH

For example, Basis_HGRAD_TET_C2_FEM stands for the default implementation of quadratic Lagrangian basis on Tetrahedron cells, and Basis_HCURL_HEX_I1_FEM is the default implementation of the lowest-order Nedelec edge element on Hexahedron.

Basis classes have very simple interface. The input arguments are a multi-dimensional array with the evaluation points and the desired operator type (VALUE, GRAD, CURL, DIV, etc) and the output is a multi-dimensional array with the basis function values. Rank and dimensions of the output array depend on the field rank of the basis functions, which can be 0 (scalar fields), 1 (vector fields), or 2 (tensor fields), the space dimension, and the operator type. The following table summarizes all admissible combinations:

Rank and dimensions of the output multi-dimensional array in getValues methods
operator/field rank rank 0 (scalars) rank1 (vectors) rank 2 (tensors)
spatial dimension 2D 3D 2D 3D 2D 3D
VALUE (F,P) (F,P,D) (F,P,D,D)
GRAD, D1 (F,P,D) (F,P,D,D) (F,P,D,D)
CURL (F,P,D) undefined (F,P) (F,P,D) (F,P,D) (F,P,D,D)
DIV undefined (F,P) (F,P,D)
D1,D2,...,D10 (F,P,K) (F,P,D,K) (F,P,D,D,K)