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_ |
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.
LocalMatrixContainer::LocalMatrixContainer | ( | const Array< int > & | isTwoForm, | |
const Array< Array< int > > & | testID, | |||
const Array< Array< int > > & | unkID, | |||
const Array< Array< double > > & | coeffs | |||
) |
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().
Array<Array<double> > Sundance::LocalMatrixContainer::coeffs_ [private] |
Array<int> Sundance::LocalMatrixContainer::isTwoForm_ [private] |
Array<Array<int> > Sundance::LocalMatrixContainer::testID_ [private] |
Array<Array<int> > Sundance::LocalMatrixContainer::unkID_ [private] |