fei::FieldMask Class Reference

#include <fei_FieldMask.hpp>

List of all members.

Public Member Functions

 FieldMask ()
 FieldMask (const FieldMask &fm)
 FieldMask (int numFields, const int *fieldIDs, const int *fieldSizes, const int *numInstancesOfThisFieldPerID)
virtual ~FieldMask ()
int getMaskID ()
void addField (int fieldID, int fieldSize, int numInstances=1)
bool hasFieldID (int fieldID) const
size_t getNumFields () const
int getNumIndices () const
void setNumIndices (int numInd)
std::vector< int > & getFieldIDs ()
const std::vector< int > & getFieldIDs () const
std::vector< int > & getFieldSizes ()
const std::vector< int > & getFieldSizes () const
std::vector< int > & getFieldInstances ()
void getFieldEqnOffset (int fieldID, int &offset, int &numInstancesPerID) const
bool operator== (const FieldMask &fm) const
bool operator!= (const FieldMask &fm) const
bool isSubSetOf (const FieldMask &fm) const

Static Public Member Functions

static int calculateMaskID (int numFields, const int *fieldIDs, const int *numInstancesPerID)
static int calculateMaskID (const FieldMask &fm, int fieldID, int numInstances)

Detailed Description

Internal implementation class. A FieldMask describes the layout of the fields associated with an identifier. Each identifier Record should have a pointer to a FieldMask. Each FieldMask will generally be shared by a large number of identifier records. (i.e., the number of field-mask objects in memory will be small -- it will be the number of distinct fields-per-node combinations in the mesh. Example: If a problem has two fields (say temperature and displacement) and some nodes have 1 field, some have the other, and some have both, then there would be a total of 3 field-masks.

Definition at line 29 of file fei_FieldMask.hpp.


Constructor & Destructor Documentation

fei::FieldMask::FieldMask (  ) 

Default Constructor

Definition at line 19 of file fei_FieldMask.cpp.

fei::FieldMask::FieldMask ( const FieldMask fm  ) 

Copy Constructor

Definition at line 30 of file fei_FieldMask.cpp.

fei::FieldMask::FieldMask ( int  numFields,
const int *  fieldIDs,
const int *  fieldSizes,
const int *  numInstancesOfThisFieldPerID 
)

Construct with initial fields

Definition at line 41 of file fei_FieldMask.cpp.

fei::FieldMask::~FieldMask (  )  [virtual]

Destructor

Definition at line 57 of file fei_FieldMask.cpp.


Member Function Documentation

int fei::FieldMask::getMaskID (  )  [inline]

Return the mask-id for this object.

Definition at line 47 of file fei_FieldMask.hpp.

int fei::FieldMask::calculateMaskID ( int  numFields,
const int *  fieldIDs,
const int *  numInstancesPerID 
) [static]

Return the mask-id that corresponds to the specified data.

Definition at line 140 of file fei_FieldMask.cpp.

int fei::FieldMask::calculateMaskID ( const FieldMask fm,
int  fieldID,
int  numInstances 
) [static]

Return the mask-id that corresponds to the specified data.

Definition at line 151 of file fei_FieldMask.cpp.

void fei::FieldMask::addField ( int  fieldID,
int  fieldSize,
int  numInstances = 1 
)

Add a field-id to this object.

Definition at line 97 of file fei_FieldMask.cpp.

bool fei::FieldMask::hasFieldID ( int  fieldID  )  const

Query whether the specified field is contained in this field-mask.

Definition at line 61 of file fei_FieldMask.cpp.

size_t fei::FieldMask::getNumFields (  )  const [inline]

Return the number of fields in this field-mask.

Definition at line 68 of file fei_FieldMask.hpp.

int fei::FieldMask::getNumIndices (  )  const [inline]

Return the number of global indices corresponding to the set of fields represented by this mask. This is sum(fieldSizes[i]*fieldInstances[i]).

Definition at line 73 of file fei_FieldMask.hpp.

void fei::FieldMask::setNumIndices ( int  numInd  )  [inline]

Set the number of global indices corresponding to the set of fields represented by this mask.

Definition at line 78 of file fei_FieldMask.hpp.

std::vector<int>& fei::FieldMask::getFieldIDs (  )  [inline]

Return an array of the fields in this field-mask.

Definition at line 81 of file fei_FieldMask.hpp.

const std::vector<int>& fei::FieldMask::getFieldIDs (  )  const [inline]

Return an array of the fields in this field-mask.

Definition at line 84 of file fei_FieldMask.hpp.

std::vector<int>& fei::FieldMask::getFieldSizes (  )  [inline]

Return an array of the fieldSizes in this field-mask.

Definition at line 87 of file fei_FieldMask.hpp.

const std::vector<int>& fei::FieldMask::getFieldSizes (  )  const [inline]

Return an array of the fieldSizes in this field-mask.

Definition at line 90 of file fei_FieldMask.hpp.

std::vector<int>& fei::FieldMask::getFieldInstances (  )  [inline]

Return an array of the number-of-field-instances for the fields in this field-mask.

Definition at line 94 of file fei_FieldMask.hpp.

void fei::FieldMask::getFieldEqnOffset ( int  fieldID,
int &  offset,
int &  numInstancesPerID 
) const

Given a field-id, return the offset of the corresponding equation- number in a record's list of equation-numbers.

Definition at line 71 of file fei_FieldMask.cpp.

bool fei::FieldMask::operator== ( const FieldMask fm  )  const [inline]

Test equality of field-masks.

Definition at line 102 of file fei_FieldMask.hpp.

bool fei::FieldMask::operator!= ( const FieldMask fm  )  const [inline]

Test inequality of field-masks.

Definition at line 106 of file fei_FieldMask.hpp.

bool fei::FieldMask::isSubSetOf ( const FieldMask fm  )  const [inline]

Query whether 'this' is a subset of the input argument. i.e., query whether all of the fields in 'this' field-mask occur in the input field-mask.

Definition at line 113 of file fei_FieldMask.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends
Generated on Wed Apr 13 10:08:35 2011 for FEI by  doxygen 1.6.3