FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
fei::FieldMask Class Reference

#include <fei_FieldMask.hpp>

Public Member Functions

 FieldMask ()
 
 FieldMask (const FieldMask &fm)
 
 FieldMask (int numFields, const int *fieldIDs, const int *fieldSizes)
 
virtual ~FieldMask ()
 
int getMaskID ()
 
void addField (int fieldID, int fieldSize)
 
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
 
int getFieldEqnOffset (int fieldID, int &offset) 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)
 
static int calculateMaskID (const FieldMask &fm, int fieldID)
 

Private Member Functions

FieldMaskoperator= (const FieldMask &src)
 
int calculateMaskID ()
 

Private Attributes

int maskID_
 
std::vector< int > fieldIDs_
 
std::vector< int > fieldSizes_
 
std::vector< int > fieldEqnOffsets_
 
int numFields_
 
int numIndices_
 

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 29 of file fei_FieldMask.cpp.

References fieldIDs_, numFields_, and numIndices_.

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

Construct with initial fields

Definition at line 39 of file fei_FieldMask.cpp.

References addField().

fei::FieldMask::~FieldMask ( )
virtual

Destructor

Definition at line 52 of file fei_FieldMask.cpp.

Member Function Documentation

int fei::FieldMask::getMaskID ( )
inline
int fei::FieldMask::calculateMaskID ( int  numFields,
const int *  fieldIDs 
)
static

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

Definition at line 126 of file fei_FieldMask.cpp.

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

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

Definition at line 136 of file fei_FieldMask.cpp.

References maskID_, and numFields_.

void fei::FieldMask::addField ( int  fieldID,
int  fieldSize 
)

Add a field-id to this object.

Definition at line 87 of file fei_FieldMask.cpp.

References fei::binarySearch().

Referenced by FieldMask(), snl_fei::RecordCollection::initRecords(), and test_misc_FieldMask().

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

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

Definition at line 61 of file fei_FieldMask.hpp.

References fieldIDs_.

Referenced by snl_fei::RecordCollection::initRecords(), and isSubSetOf().

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

Return the number of fields in this field-mask.

Definition at line 69 of file fei_FieldMask.hpp.

References fieldIDs_.

Referenced by fei::VectorSpace::getNumFields(), snl_fei::RecordMsgHandler::mergeMaskIDs(), and test_misc_FieldMask().

int fei::FieldMask::getNumIndices ( ) const
inline
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 79 of file fei_FieldMask.hpp.

References numIndices_.

Referenced by snl_fei::RecordMsgHandler::addFieldMasks().

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

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

Definition at line 85 of file fei_FieldMask.hpp.

References fieldIDs_.

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

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

Definition at line 88 of file fei_FieldMask.hpp.

References fieldSizes_.

Referenced by fei::Lookup_Impl::getAssociatedFieldID(), snl_fei::RecordMsgHandler::mergeMaskIDs(), fei::ReverseMapper::ReverseMapper(), and test_misc_FieldMask().

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

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

Definition at line 91 of file fei_FieldMask.hpp.

References fieldSizes_.

int fei::FieldMask::getFieldEqnOffset ( int  fieldID,
int &  offset 
) const
bool fei::FieldMask::operator== ( const FieldMask fm) const
inline

Test equality of field-masks.

Definition at line 100 of file fei_FieldMask.hpp.

References maskID_.

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

Test inequality of field-masks.

Definition at line 104 of file fei_FieldMask.hpp.

References maskID_.

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 111 of file fei_FieldMask.hpp.

References fieldIDs_, and hasFieldID().

FieldMask& fei::FieldMask::operator= ( const FieldMask src)
private
int fei::FieldMask::calculateMaskID ( )
private

Member Data Documentation

int fei::FieldMask::maskID_
private

Definition at line 124 of file fei_FieldMask.hpp.

Referenced by calculateMaskID(), getMaskID(), operator!=(), and operator==().

std::vector<int> fei::FieldMask::fieldIDs_
private

Definition at line 126 of file fei_FieldMask.hpp.

Referenced by FieldMask(), getFieldIDs(), getNumFields(), hasFieldID(), and isSubSetOf().

std::vector<int> fei::FieldMask::fieldSizes_
private

Definition at line 127 of file fei_FieldMask.hpp.

Referenced by getFieldSizes().

std::vector<int> fei::FieldMask::fieldEqnOffsets_
private

Definition at line 128 of file fei_FieldMask.hpp.

int fei::FieldMask::numFields_
private

Definition at line 130 of file fei_FieldMask.hpp.

Referenced by calculateMaskID(), and FieldMask().

int fei::FieldMask::numIndices_
private

Definition at line 131 of file fei_FieldMask.hpp.

Referenced by FieldMask(), getNumIndices(), and setNumIndices().


The documentation for this class was generated from the following files: