Sundance::SparsitySuperset Class Reference

Inheritance diagram for Sundance::SparsitySuperset:

Sundance::ObjectWithClassVerbosity< SparsitySuperset > Playa::ObjectWithVerbosity

List of all members.

Public Member Functions

 SparsitySuperset (const Set< MultipleDeriv > &C, const Set< MultipleDeriv > &V)
 Create a sparsity set.
void print (std::ostream &os) const
void print (std::ostream &os, const Array< RCP< EvalVector > > &vecResults, const Array< double > &constantResults) const
std::string toString () const
DerivSet derivSet () const
Access to information about individual derivatives
bool containsDeriv (const MultipleDeriv &d) const
 Detect whether a given derivative exists in this set.
int getIndex (const MultipleDeriv &d) const
 Find the index at which the results for the given functional derivative are stored in the results array.
const MultipleDerivderiv (int i) const
 Return the results stored at index i.
const DerivStatestate (int i) const
 Return the constancy state of deriv i.
int numDerivs () const
int numConstantDerivs () const
int numVectorDerivs () const
int maxOrder () const
bool isConstant (int i) const
 Indicate whether the specified derivative is spatially constant at this node.
bool isSpatialDeriv (int i) const
 Indicate whether the specified multiple derivative contains at least one order of spatial differentiation.
const MultiIndexmultiIndex (int i) const
 Return the spatial multi index for the i-th derivative.

Private Member Functions

void addDeriv (const MultipleDeriv &d, const DerivState &state)
 Add a derivative to the set.
void addDeriv (const Deriv &d, const DerivState &state)
 Add a derivative to the set.

Private Attributes

int maxOrder_
Sundance::Map< MultipleDeriv, int > derivToIndexMap_
 Map from deriv to position of the derivative's value in the results array.
Array< MultipleDerivderivs_
 The list of functional derivatives whose values are stored in this results set.
Array< DerivStatestates_
 The state of each derivative at this node in the expression.
Array< MultiIndexmultiIndex_
 Multiindices.
int numConstantDerivs_
int numVectorDerivs_


Detailed Description

Definition at line 68 of file SundanceSparsitySuperset.hpp.


Constructor & Destructor Documentation

SparsitySuperset::SparsitySuperset ( const Set< MultipleDeriv > &  C,
const Set< MultipleDeriv > &  V 
)


Member Function Documentation

void SparsitySuperset::addDeriv ( const Deriv d,
const DerivState state 
) [private]

Add a derivative to the set.

Called by the subset's addDeriv() method.

Definition at line 112 of file SundanceSparsitySuperset.cpp.

References addDeriv(), and Sundance::MultiSet< Key >::put().

void SparsitySuperset::addDeriv ( const MultipleDeriv d,
const DerivState state 
) [private]

bool SparsitySuperset::containsDeriv ( const MultipleDeriv d  )  const

Detect whether a given derivative exists in this set.

Definition at line 122 of file SundanceSparsitySuperset.cpp.

References Sundance::Map< Key, Value, Compare >::containsKey(), and derivToIndexMap_.

Referenced by addDeriv(), and getIndex().

const MultipleDeriv& Sundance::SparsitySuperset::deriv ( int  i  )  const [inline]

DerivSet SparsitySuperset::derivSet (  )  const

int SparsitySuperset::getIndex ( const MultipleDeriv d  )  const

Find the index at which the results for the given functional derivative are stored in the results array.

Definition at line 127 of file SundanceSparsitySuperset.cpp.

References containsDeriv(), derivToIndexMap_, and Sundance::Map< Key, Value, Compare >::get().

Referenced by addDeriv().

bool Sundance::SparsitySuperset::isConstant ( int  i  )  const [inline]

Indicate whether the specified derivative is spatially constant at this node.

Definition at line 111 of file SundanceSparsitySuperset.hpp.

References Sundance::ConstantDeriv, and states_.

bool Sundance::SparsitySuperset::isSpatialDeriv ( int  i  )  const [inline]

Indicate whether the specified multiple derivative contains at least one order of spatial differentiation.

Definition at line 115 of file SundanceSparsitySuperset.hpp.

References multiIndex_.

int Sundance::SparsitySuperset::maxOrder (  )  const [inline]

Definition at line 106 of file SundanceSparsitySuperset.hpp.

References maxOrder_.

const MultiIndex& Sundance::SparsitySuperset::multiIndex ( int  i  )  const [inline]

Return the spatial multi index for the i-th derivative.

Definition at line 121 of file SundanceSparsitySuperset.hpp.

References multiIndex_.

int Sundance::SparsitySuperset::numConstantDerivs (  )  const [inline]

Definition at line 98 of file SundanceSparsitySuperset.hpp.

References numConstantDerivs_.

int Sundance::SparsitySuperset::numDerivs (  )  const [inline]

int Sundance::SparsitySuperset::numVectorDerivs (  )  const [inline]

Definition at line 101 of file SundanceSparsitySuperset.hpp.

References numVectorDerivs_.

void SparsitySuperset::print ( std::ostream &  os,
const Array< RCP< EvalVector > > &  vecResults,
const Array< double > &  constantResults 
) const

void SparsitySuperset::print ( std::ostream &  os  )  const

const DerivState& Sundance::SparsitySuperset::state ( int  i  )  const [inline]

Return the constancy state of deriv i.

Definition at line 91 of file SundanceSparsitySuperset.hpp.

References states_.

Referenced by derivSet(), Sundance::UserDefOpCommonEvaluator::UserDefOpCommonEvaluator(), and Sundance::UserDefOpEvaluator::UserDefOpEvaluator().

string SparsitySuperset::toString (  )  const

Definition at line 222 of file SundanceSparsitySuperset.cpp.

References print().


Member Data Documentation

The list of functional derivatives whose values are stored in this results set.

Definition at line 159 of file SundanceSparsitySuperset.hpp.

Referenced by addDeriv(), deriv(), numDerivs(), and print().

Map from deriv to position of the derivative's value in the results array.

Definition at line 155 of file SundanceSparsitySuperset.hpp.

Referenced by addDeriv(), containsDeriv(), and getIndex().

Definition at line 151 of file SundanceSparsitySuperset.hpp.

Referenced by addDeriv(), and maxOrder().

Multiindices.

Definition at line 165 of file SundanceSparsitySuperset.hpp.

Referenced by addDeriv(), isSpatialDeriv(), and multiIndex().

Definition at line 168 of file SundanceSparsitySuperset.hpp.

Referenced by addDeriv(), and numConstantDerivs().

Definition at line 171 of file SundanceSparsitySuperset.hpp.

Referenced by addDeriv(), and numVectorDerivs().

The state of each derivative at this node in the expression.

Definition at line 162 of file SundanceSparsitySuperset.hpp.

Referenced by addDeriv(), isConstant(), print(), and state().

Site Contact