Sundance::AlgebraSpecifier Class Reference

Inheritance diagram for Sundance::AlgebraSpecifier:

Sundance::EnumTypeField< AlgebraType >

List of all members.

Public Member Functions

 AlgebraSpecifier ()
 AlgebraSpecifier (int direction)
 AlgebraSpecifier (const AlgebraType &vct)
bool isScalar () const
bool isNormal () const
bool isVector () const
bool isCoordinateComponent () const
int direction () const
std::string toString () const
bool operator< (const AlgebraSpecifier &other) const

Private Attributes

int direction_

Related Functions

(Note that these are not member functions.)

AlgebraSpecifier vectorAlgebraSpec ()
AlgebraSpecifier scalarAlgebraSpec ()
AlgebraSpecifier normalAlgebraSpec ()
AlgebraSpecifier coordAlgebraSpec (int dir)


Detailed Description

AlgebraSpecifier is used to indicate whether a given object represents a vector, scalar, component of a vector, etc.

Definition at line 46 of file SundanceAlgebraSpecifier.hpp.


Constructor & Destructor Documentation

AlgebraSpecifier::AlgebraSpecifier (  ) 

Definition at line 42 of file SundanceAlgebraSpecifier.cpp.

AlgebraSpecifier::AlgebraSpecifier ( int  direction  ) 

Definition at line 47 of file SundanceAlgebraSpecifier.cpp.

AlgebraSpecifier::AlgebraSpecifier ( const AlgebraType vct  ) 


Member Function Documentation

int AlgebraSpecifier::direction (  )  const

Return coordinate direction if I am a coordinate component, otherwise, throw an exception.

Definition at line 59 of file SundanceAlgebraSpecifier.cpp.

References Sundance::EnumTypeField< AlgebraType >::assertType(), Sundance::CoordCompAT, and direction_.

Referenced by Sundance::FunctionIdentifier::componentIndex(), operator<(), and std::operator<<().

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

bool Sundance::AlgebraSpecifier::isNormal (  )  const [inline]

Return true iff I am a normal component of a vector

Definition at line 62 of file SundanceAlgebraSpecifier.hpp.

References Sundance::EnumTypeField< AlgebraType >::isType(), and Sundance::NormalAT.

Referenced by Sundance::FunctionIdentifier::isNormalComponent().

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

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

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

Comparison operator for use in sorted containers

Definition at line 65 of file SundanceAlgebraSpecifier.cpp.

References direction(), isCoordinateComponent(), Sundance::EnumTypeField< T >::type(), and Sundance::EnumTypeField< AlgebraType >::type().

string AlgebraSpecifier::toString (  )  const

Write a std::string representation

Definition at line 75 of file SundanceAlgebraSpecifier.cpp.


Friends And Related Function Documentation

AlgebraSpecifier coordAlgebraSpec ( int  dir  )  [related]

Definition at line 140 of file SundanceAlgebraSpecifier.cpp.

AlgebraSpecifier normalAlgebraSpec (  )  [related]

Definition at line 134 of file SundanceAlgebraSpecifier.cpp.

AlgebraSpecifier scalarAlgebraSpec (  )  [related]

Definition at line 128 of file SundanceAlgebraSpecifier.cpp.

AlgebraSpecifier vectorAlgebraSpec (  )  [related]

Definition at line 122 of file SundanceAlgebraSpecifier.cpp.

References Sundance::VectorAT.


Member Data Documentation

Definition at line 81 of file SundanceAlgebraSpecifier.hpp.

Referenced by direction().

Site Contact