Sundance::LocalMatrixContainer Class Reference

List of all members.

Public Member Functions

 LocalMatrixContainer (const Array< int > &isTwoForm, const Array< Array< int > > &testID, const Array< Array< int > > &unkID, const Array< Array< double > > &coeffs)
const RCP< Array< double > > & dataVector (int i) const
bool isTwoForm (int i) const
const Array< int > & testID (int i) const
const Array< int > & unkID (int i) const
const Array< double > & coeffs (int i) const

Static Private Member Functions

static Array< RCP< Array
< double > > > & 
workspace ()

Private Attributes

Array< int > isTwoForm_
Array< Array< int > > testID_
Array< Array< int > > unkID_
Array< Array< double > > coeffs_


Detailed Description

LocalMatrixContainer is a container for local matrix and vector values. Local matrices and vectors are stored in identical ways: as 1D arrays of doubles. toi

Each integrator gets its own LocalMatrixContainer object, with information on term grouping specific to the terms handled by that integrator. To conserve memory, all LocalMatrixContainer objects share a common pool of data vectors. After insertion, the common pool can be reused in the next integration. It is the responsibility of the integrator to zero out and resize each data vector as needed.

To leave the system as flexible as possible, this class does not specify anything about the ordering of elements in the matrix. It is the responsibility of the integrator and inserter classes to use a consistent ordering. Different integrator-inserter combinations may well use different orderings.

It is often the case that several terms in a PDE will yield local matrices that have the same values, perhaps differing by a constant, but which are associated with different test and unknown functions. For this reason, each batch of local matrix values has associated with it arrays of (test, unk) pairs and coefficients.

Definition at line 63 of file SundanceLocalMatrixContainer.hpp.


Constructor & Destructor Documentation

LocalMatrixContainer::LocalMatrixContainer ( const Array< int > &  isTwoForm,
const Array< Array< int > > &  testID,
const Array< Array< int > > &  unkID,
const Array< Array< double > > &  coeffs 
)

Definition at line 41 of file SundanceLocalMatrixContainer.cpp.

References workspace().


Member Function Documentation

const Array<double>& Sundance::LocalMatrixContainer::coeffs ( int  i  )  const [inline]

Return the array of coefficients to be used with the i-th batch

Definition at line 88 of file SundanceLocalMatrixContainer.hpp.

References coeffs_.

const RCP<Array<double> >& Sundance::LocalMatrixContainer::dataVector ( int  i  )  const [inline]

Return the data vector for the i-th batch

Definition at line 73 of file SundanceLocalMatrixContainer.hpp.

References workspace().

bool Sundance::LocalMatrixContainer::isTwoForm ( int  i  )  const [inline]

Indicate whether the i-th batch is a two form

Definition at line 77 of file SundanceLocalMatrixContainer.hpp.

References isTwoForm_.

const Array<int>& Sundance::LocalMatrixContainer::testID ( int  i  )  const [inline]

Return the array of testIDs whose local matrix values are grouped int the i-th batch

Definition at line 81 of file SundanceLocalMatrixContainer.hpp.

References testID_.

const Array<int>& Sundance::LocalMatrixContainer::unkID ( int  i  )  const [inline]

Return the array of unkIDs whose local matrix values are grouped int the i-th batch

Definition at line 85 of file SundanceLocalMatrixContainer.hpp.

References unkID_.

static Array<RCP<Array<double> > >& Sundance::LocalMatrixContainer::workspace (  )  [inline, static, private]

Definition at line 93 of file SundanceLocalMatrixContainer.hpp.

Referenced by dataVector(), and LocalMatrixContainer().


Member Data Documentation

Array<Array<double> > Sundance::LocalMatrixContainer::coeffs_ [private]

Definition at line 106 of file SundanceLocalMatrixContainer.hpp.

Referenced by coeffs().

Definition at line 97 of file SundanceLocalMatrixContainer.hpp.

Referenced by isTwoForm().

Array<Array<int> > Sundance::LocalMatrixContainer::testID_ [private]

Definition at line 100 of file SundanceLocalMatrixContainer.hpp.

Referenced by testID().

Array<Array<int> > Sundance::LocalMatrixContainer::unkID_ [private]

Definition at line 103 of file SundanceLocalMatrixContainer.hpp.

Referenced by unkID().

Site Contact