Sundance::RefIntegral Class Reference

Inheritance diagram for Sundance::RefIntegral:

Sundance::ElementIntegral

List of all members.

Public Member Functions

 RefIntegral (int spatialDim, const CellType &maxCellType, int dim, const CellType &cellType, const QuadratureFamily &quad_in, bool isInternalBdry, const ParametrizedCurve &globalCurve, const Mesh &mesh, int verb)
 RefIntegral (int spatialDim, const CellType &maxCellType, int dim, const CellType &cellType, const BasisFamily &testBasis, int alpha, int testDerivOrder, const QuadratureFamily &quad_in, bool isInternalBdry, const ParametrizedCurve &globalCurve, const Mesh &mesh, int verb)
 RefIntegral (int spatialDim, const CellType &maxCellType, int dim, const CellType &cellType, const BasisFamily &testBasis, int alpha, int testDerivOrder, const BasisFamily &unkBasis, int beta, int unkDerivOrder, const QuadratureFamily &quad_in, bool isInternalBdry, const ParametrizedCurve &globalCurve, const Mesh &mesh, int verb)
virtual ~RefIntegral ()
void print (std::ostream &os) const
void transform (const CellJacobianBatch &JTrans, const CellJacobianBatch &JVol, const Array< int > &isLocalFlag, const Array< int > &facetNum, const RCP< Array< int > > &cellLIDs, const double &coeff, RCP< Array< double > > &A) const
void transformTwoForm (const CellJacobianBatch &JTrans, const CellJacobianBatch &JVol, const Array< int > &facetNum, const RCP< Array< int > > &cellLIDs, const double &coeff, RCP< Array< double > > &A) const
void transformOneForm (const CellJacobianBatch &JTrans, const CellJacobianBatch &JVol, const Array< int > &facetNum, const RCP< Array< int > > &cellLIDs, const double &coeff, RCP< Array< double > > &A) const
void transformZeroForm (const CellJacobianBatch &JVol, const Array< int > &isLocalFlag, const RCP< Array< int > > &cellLIDs, const double &coeff, RCP< Array< double > > &A) const
double & value (int facetCase, int testDerivDir, int testNode, int unkDerivDir, int unkNode)
const double & value (int facetCase, int testDerivDir, int testNode, int unkDerivDir, int unkNode) const
double & value (int facetCase, int testDerivDir, int testNode)
const double & value (int facetCase, int testDerivDir, int testNode) const

Static Public Member Functions

static double & totalFlops ()

Static Protected Member Functions

static void addFlops (const double &flops)

Private Attributes

Array< Array< double > > W_
Array< Array< Array< Array
< double > > > > 
W_ACI_F1_
Array< Array< Array< Array
< Array< Array< double > > > > > > 
W_ACI_F2_
QuadratureFamily quad_
Array< PointquadPts_
Array< double > quadWeights_


Detailed Description

RefIntegral represents the integrals of a product of basis functions (or their derivatives) over a reference cell. This object can be created once and for all up front, and then reused to produce the integrals of constant-coefficient weak forms over simplicial cells by means of a linear transformation.

An instance of this object can represent either a one form,

\[ W_{i\gamma} = \int_{T_R} D_\gamma \psi_i \]

or a two form,

\[ W_{(ij)(\gamma\delta)} = \int_{T_R} D_\gamma \psi_i D_\delta \phi_j. \]

In the notation for the two form, we have grouped together the index pairs $(ij)$ and $(\gamma\delta)$ to indicate that we will think of this 4-tensor as a 2D array, with $(ij)$ combinations running down rows and $(\gamma\delta)$ running across columns. We will consider the node number combination $(ij)$ to be a single index $k$, and $(\gamma\delta)$ to be a single index $\epsilon$. Thus, the storage and use of one-forms and two-forms is essentially identical.

This object's job in life is to be multiplied with a transformation matrix $T_{\epsilon c}$to produce an array of local element matrices $A_{kc}$,

\[ A_{kc} = W_{k\epsilon} T_{\epsilon c} \]

The index $c$ is over cells (cells are processed in batches).

Physical storage is as a 1D vector stored in colum-major order.

Definition at line 77 of file SundanceRefIntegral.hpp.


Constructor & Destructor Documentation

RefIntegral::RefIntegral ( int  spatialDim,
const CellType maxCellType,
int  dim,
const CellType cellType,
const QuadratureFamily quad_in,
bool  isInternalBdry,
const ParametrizedCurve &  globalCurve,
const Mesh mesh,
int  verb 
)

RefIntegral::RefIntegral ( int  spatialDim,
const CellType maxCellType,
int  dim,
const CellType cellType,
const BasisFamily testBasis,
int  alpha,
int  testDerivOrder,
const QuadratureFamily quad_in,
bool  isInternalBdry,
const ParametrizedCurve &  globalCurve,
const Mesh mesh,
int  verb 
)

RefIntegral::RefIntegral ( int  spatialDim,
const CellType maxCellType,
int  dim,
const CellType cellType,
const BasisFamily testBasis,
int  alpha,
int  testDerivOrder,
const BasisFamily unkBasis,
int  beta,
int  unkDerivOrder,
const QuadratureFamily quad_in,
bool  isInternalBdry,
const ParametrizedCurve &  globalCurve,
const Mesh mesh,
int  verb 
)

virtual Sundance::RefIntegral::~RefIntegral (  )  [inline, virtual]

virtual dtor

Definition at line 123 of file SundanceRefIntegral.hpp.


Member Function Documentation

static void Sundance::RefIntegral::addFlops ( const double &  flops  )  [inline, static, protected]

Reimplemented from Sundance::ElementIntegral.

Definition at line 195 of file SundanceRefIntegral.hpp.

References totalFlops().

Referenced by RefIntegral(), transformOneForm(), transformTwoForm(), and transformZeroForm().

void Sundance::RefIntegral::print ( std::ostream &  os  )  const

static double& Sundance::RefIntegral::totalFlops (  )  [inline, static]

Reimplemented from Sundance::ElementIntegral.

Definition at line 191 of file SundanceRefIntegral.hpp.

Referenced by addFlops().

void Sundance::RefIntegral::transform ( const CellJacobianBatch JTrans,
const CellJacobianBatch JVol,
const Array< int > &  isLocalFlag,
const Array< int > &  facetNum,
const RCP< Array< int > > &  cellLIDs,
const double &  coeff,
RCP< Array< double > > &  A 
) const [inline]

void RefIntegral::transformOneForm ( const CellJacobianBatch JTrans,
const CellJacobianBatch JVol,
const Array< int > &  facetNum,
const RCP< Array< int > > &  cellLIDs,
const double &  coeff,
RCP< Array< double > > &  A 
) const

void RefIntegral::transformTwoForm ( const CellJacobianBatch JTrans,
const CellJacobianBatch JVol,
const Array< int > &  facetNum,
const RCP< Array< int > > &  cellLIDs,
const double &  coeff,
RCP< Array< double > > &  A 
) const

void RefIntegral::transformZeroForm ( const CellJacobianBatch JVol,
const Array< int > &  isLocalFlag,
const RCP< Array< int > > &  cellLIDs,
const double &  coeff,
RCP< Array< double > > &  A 
) const

const double& Sundance::RefIntegral::value ( int  facetCase,
int  testDerivDir,
int  testNode 
) const [inline]

Definition at line 187 of file SundanceRefIntegral.hpp.

References Sundance::ElementIntegral::nNodesTest(), and W_.

double& Sundance::RefIntegral::value ( int  facetCase,
int  testDerivDir,
int  testNode 
) [inline]

Definition at line 183 of file SundanceRefIntegral.hpp.

References Sundance::ElementIntegral::nNodesTest(), and W_.

const double& Sundance::RefIntegral::value ( int  facetCase,
int  testDerivDir,
int  testNode,
int  unkDerivDir,
int  unkNode 
) const [inline]

double& Sundance::RefIntegral::value ( int  facetCase,
int  testDerivDir,
int  testNode,
int  unkDerivDir,
int  unkNode 
) [inline]


Member Data Documentation

The quadrature family needed for special integration

Definition at line 210 of file SundanceRefIntegral.hpp.

Referenced by RefIntegral(), transformOneForm(), transformTwoForm(), and transformZeroForm().

The quadrature points

Definition at line 213 of file SundanceRefIntegral.hpp.

Referenced by RefIntegral(), transformOneForm(), transformTwoForm(), and transformZeroForm().

Array<double> Sundance::RefIntegral::quadWeights_ [private]

The standard weights (in case of ACI these might change)

Definition at line 216 of file SundanceRefIntegral.hpp.

Referenced by RefIntegral(), transformOneForm(), transformTwoForm(), and transformZeroForm().

Array<Array<double> > Sundance::RefIntegral::W_ [private]

Array<Array<Array<Array<double> > > > Sundance::RefIntegral::W_ACI_F1_ [private]

For ACI (ACI = Adaptive Cell Integration), store the reference integral values for one form The indexes facet, quadPoints, nRefDerivTest , nNodesTest

Definition at line 203 of file SundanceRefIntegral.hpp.

Referenced by RefIntegral(), and transformOneForm().

Array<Array<Array<Array<Array<Array<double> > > > > > Sundance::RefIntegral::W_ACI_F2_ [private]

For ACI (ACI = Adaptive Cell Integration), store the reference integral values for two form The indexes facet, quadPoints, nRefDerivTest , nNodesTest , nRefDerivUnk , nNodesUnk

Definition at line 207 of file SundanceRefIntegral.hpp.

Referenced by RefIntegral(), and transformTwoForm().

Site Contact