Sundance::FunctionIdentifier Class Reference

List of all members.

Public Member Functions

 FunctionIdentifier ()
 FunctionIdentifier (const AlgebraSpecifier &algSpec)
 FunctionIdentifier (const FunctionIdentifier *parent, const AlgebraSpecifier &componentAlgSpec)
std::string toString () const
int dofID () const
int componentIndex () const
const AlgebraSpecifieralgSpec () const
FunctionIdentifier createComponent (int index) const
FunctionIdentifier createNormal () const
bool operator< (const FunctionIdentifier &other) const
bool operator== (const FunctionIdentifier &other) const
bool operator!= (const FunctionIdentifier &other) const
bool isVector () const
bool isCoordinateComponent () const
bool isNormalComponent () const
bool isScalar () const

Static Private Member Functions

static int nextID ()

Private Attributes

int dofID_
AlgebraSpecifier algSpec_

Related Functions

(Note that these are not member functions.)

FunctionIdentifier makeFuncID (int tensorOrder)


Detailed Description

FunctionIdentifier provides a means for distinguishing between different functions and different vector components of the same function. Functions discretized with vector bases will shared a common dofID, because their vector components are not independent. Functions discretized componentwise will have different IDs for each component.

Definition at line 46 of file SundanceFunctionIdentifier.hpp.


Constructor & Destructor Documentation

FunctionIdentifier::FunctionIdentifier (  ) 

Definition at line 37 of file SundanceFunctionIdentifier.cpp.

Referenced by createComponent(), and createNormal().

FunctionIdentifier::FunctionIdentifier ( const AlgebraSpecifier algSpec  ) 

ctor

Definition at line 41 of file SundanceFunctionIdentifier.cpp.

FunctionIdentifier::FunctionIdentifier ( const FunctionIdentifier parent,
const AlgebraSpecifier componentAlgSpec 
)


Member Function Documentation

const AlgebraSpecifier& Sundance::FunctionIdentifier::algSpec (  )  const [inline]

Return a specification of the type of object represented, i.e., a component in a coord direction, a normal component, or a whole vector.

Definition at line 71 of file SundanceFunctionIdentifier.hpp.

References algSpec_.

Referenced by Sundance::Deriv::Deriv(), Sundance::Deriv::funcAlgSpec(), isCoordinateComponent(), isNormalComponent(), isScalar(), isVector(), and std::operator<<().

int FunctionIdentifier::componentIndex (  )  const

If this FID corresponds to a vector component, return the index of the coordinate direction

Definition at line 66 of file SundanceFunctionIdentifier.cpp.

References algSpec_, Sundance::AlgebraSpecifier::direction(), Sundance::AlgebraSpecifier::isCoordinateComponent(), and Sundance::AlgebraSpecifier::isScalar().

FunctionIdentifier FunctionIdentifier::createComponent ( int  index  )  const

FunctionIdentifier FunctionIdentifier::createNormal (  )  const

Create a new FID representing the normal component of "this" vector function.

Definition at line 82 of file SundanceFunctionIdentifier.cpp.

References FunctionIdentifier(), isVector(), and Sundance::normalAlgebraSpec().

int Sundance::FunctionIdentifier::dofID (  )  const [inline]

bool Sundance::FunctionIdentifier::isCoordinateComponent (  )  const [inline]

Return true if I am a coordinate component

Definition at line 96 of file SundanceFunctionIdentifier.hpp.

References algSpec(), and Sundance::AlgebraSpecifier::isCoordinateComponent().

bool Sundance::FunctionIdentifier::isNormalComponent (  )  const [inline]

Return true if I am a normal component

Definition at line 99 of file SundanceFunctionIdentifier.hpp.

References algSpec(), and Sundance::AlgebraSpecifier::isNormal().

bool Sundance::FunctionIdentifier::isScalar (  )  const [inline]

Return true if I am a scalar

Definition at line 102 of file SundanceFunctionIdentifier.hpp.

References algSpec(), and Sundance::AlgebraSpecifier::isScalar().

bool Sundance::FunctionIdentifier::isVector (  )  const [inline]

static int Sundance::FunctionIdentifier::nextID (  )  [inline, static, private]

Generate a unique ID

Definition at line 107 of file SundanceFunctionIdentifier.hpp.

bool Sundance::FunctionIdentifier::operator!= ( const FunctionIdentifier other  )  const [inline]

Inequality test

Definition at line 89 of file SundanceFunctionIdentifier.hpp.

bool FunctionIdentifier::operator< ( const FunctionIdentifier other  )  const

Comparison operator for storage in sets and maps

Definition at line 90 of file SundanceFunctionIdentifier.cpp.

References algSpec_, and dofID_.

bool Sundance::FunctionIdentifier::operator== ( const FunctionIdentifier other  )  const [inline]

Equality test

Definition at line 85 of file SundanceFunctionIdentifier.hpp.

string FunctionIdentifier::toString (  )  const


Friends And Related Function Documentation

FunctionIdentifier makeFuncID ( int  tensorOrder  )  [related]

Definition at line 108 of file SundanceFunctionIdentifier.cpp.


Member Data Documentation

Definition at line 109 of file SundanceFunctionIdentifier.hpp.

Referenced by dofID(), FunctionIdentifier(), and operator<().

Site Contact