Intrepid

Welcome to the Intrepid Home

Intrepid stands for INteroperable Tools for Rapid dEveloPment of compatIble Discretizations.

Intrepid is a library of interoperable tools for compatible discretizations of Partial Differential Equations (PDEs). Included with the Trilinos 10.0 release is the “expert version” of Intrepid. This version is intended primarily for application developers who want to reuse large parts of their existing code frameworks such as I/O, data structures, assembly routines, etc. while gaining access to advanced discretization capabilities provided by Intrepid. In such cases the bulk of the data is owned and managed by the user rather than by Intrepid. To avoid unnecessary and possibly expensive copying of data to and from Intrepid, the expert version of the package comprises of mostly stateless classes operating on user-owned data.Virtually all numerical data required by PDE codes can be represented as a multi-dimensional array of scalar values. For this reason, and to enahnce interoprability, Intrepid classes are templated on generic multi-dimensional arrays. The Shards package provides an implementation of a multi-dimensional array that can be used for that purpose, or users can write their own multi-dimensional arrays as long as a minimal interface is supported.

Overview

Current release of Intrepid includes the following features:

  • Default finite element basis functions for H(grad), H(curl), H(div) and L2 spaces of orders up to 2 on standard cell topologies in 1D, 2D and 3D
  • High-order (up to 10) basis functions for H(grad), H(curl), H(div) and L2 spaces on select cell topologies
  • Pullbacks (transformations) from reference coordinate frame of H(grad), H(curl), H(div) and L2 fields
  • Pullbacks of gradient, curl and divergence of H(grad), H(curl), H(div) fields
  • Cubature rules of orders up to 20 on most standard 1D, 2D and 3D cell topologies
  • Implementation of multi-diumensional arrays and algebraic operations on them
  • Examples showing solution of basic 2nd order elliptic boundary value problems (Poisson, div-curl, and curl-curl systems) using Intrepid

Development plans

The next release of Intrepid is expected to support Finite Difference and Finite Volume discretizations on standard and non-standard (polygon and polyhedron) cell topologies. A user-firendly version for rapid development of PDE codes is also under development.

Known issues

Check the Frequently Asked Questions page for information on known issues.

Supplementary materials

  • Intrepid tutorial: 2009 Fall TUG Meeting. In this tutorial you will find brief summary of the package and a step-by-step example showing assembly of a linear system corresponding to curl-conforming least-squares finite element discretization of a div-curl boundary value problem with tangential boundary conditions.

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)