Multi-dimensional array (MD array) template arguments

Introduction

This page describes basic requirements for multi-dimensional array (MD array) template arguments in Intrepid. MD array is a fundamental concept for managing a wide range of numerical data arising in PDE-based simulations. An MD array is a collection of members of a given scalar data type that are identified through a multi-index. Therefore, allowing for an MD array template argument provides a convenient mechanism to share numerical data between Intrepid and user applications.

The scalar data type members of a multi-dimensional array are stored in a contiguous block of memory. Contiguous memory storage is not necessary to the concept of an array; however, in order to achieve the best performance from cache-based computer memory systems contiguity of member storage has proven to be essential.

Definitions

The following rules and definitions apply to all MD arrays used as template arguments in Intrepid.

Enumeration of all MD arrays passed as template arguments to Intrepid must follow the natural lexicographical order: the leftmost index i0 changes last and the rightmost index iN changes first. In summary, an MD array pased to Intrepid should comply with the following rules:

MD Array interface

An MD array type passed as a template argument to Intrepid is expected to implement the following minimal interface:

MD Array notation and examples

In addition to the generic index and dimension notation ik and dim_k it is convenient to introduce data-specific notation for indices and dimensions of MD arrays that recur in PDE-based simulation codes.

 |-------------------------------------------------------------------------------------------------|
 |   Index type              | Dimension |  Description                                            |
 |---------------------------|-----------|---------------------------------------------------------|
 |   point                   |     P     |  number of points stored in an MD array                 |
 |   vertex                  |     V     |  number of nodes stored in an MD aray                |
 |   field                   |     F     |  number of fields stored in an MD array                 |
 |   basis field             |     B     |  number of basis fields stored in an MD array           |
 |   cell                    |     C     |  number of cells stored in an MD array                  |
 |   field coordinate        |     D     |  space dimension                                        |
 |   derivative ordinal      |     K     |  cardinality of the set of kth derivatives              |
 |-------------------------------------------------------------------------------------------------|
 
Remarks:
  • The totality of all derivatives whose order equals k (OPERATOR_Dk in Intrepid) forms a multiset; see http://mathworld.wolfram.com/Multiset.html . In Intrepid this multiset is enumerated using the lexicographical order of the partial derivatives; see getDkEnumeration() for details.
This notation is used throughout Intrepid's documentation as a means to add further clarity to the specifications of MD array passed to and returned from Intrepid methods. The following is a list of typical MD arrays that arise in PDE-based simulation codes:
 |-------------------------------------------------------------------------------------------------|
 | Rank | Multi-dimension | Multi-index    | Description                                           |
 |-------------------------------------------------------------------------------------------------|
 |  1   | (P)             | (p)            | Scalar (rank 0) field evaluated at P points           |
 |  2   | (P,D)           | (p,d)          | Vector (rank 1) field evaluated at P points           |
 |  3   | (P,D,D)         | (p,d,d)        | Tensor (rank 2) field evaluated at P points           |           
 |-------------------------------------------------------------------------------------------------|
 |  2   | (P,F)           | (p,f)          | F scalar fields evaluated at P points                 |
 |  3   | (P,F,D)         | (p,f,d)        | F vector fields evaluated at P points                 |
 |  4   | (P,F,D,D)       | (p,f,d,d)      | F tensor fields evaluated at P points                 |
 |-------------------------------------------------------------------------------------------------|
 |  3   | (P,F,K)         | (p,f,k)        | kth deriv. of F scalar fields evaluated at P points   |       
 |  4   | (P,F,D,K)       | (p,f,d,k)      | kth deriv. of F vector fields evaluated at P points   |       
 |  5   | (P,F,D,D,K)     | (p,f,d,d,k)    | kth deriv. of F tensor fields evaluated at P points   |           
 |-------------------------------------------------------------------------------------------------|
 |  3   | (C,V,D)         | (c,v,d )       | Vertex coords. of C cells having V vertices each      |
 |  3   | (C,P,D)         | (c,p,d )       | Coords. of C*P points in C cells, P per cell          |
 |-------------------------------------------------------------------------------------------------| 
 

MD Array implementaion in Intrepid

The FieldContainer class provides an implementation of an MD array type that is used throughout Intrepid. A FieldContainer object is templated on a Scalar type. Its rank and dimensions are runtime parameters, i.e., a FieldContainer is not strongly typed on rank and dimension.

Generated on Wed Mar 31 15:02:14 2010 for Intrepid by  doxygen 1.6.3