FEI Package Browser (Single Doxygen Collection)
Version of the Day
|
#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 | |
FieldMask & | operator= (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_ |
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.
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().
|
virtual |
Destructor
Definition at line 52 of file fei_FieldMask.cpp.
|
inline |
Return the mask-id for this object.
Definition at line 46 of file fei_FieldMask.hpp.
References maskID_.
Referenced by snl_fei::RecordCollection::initRecords(), snl_fei::RecordMsgHandler::mergeMaskIDs(), snl_fei::RecordMsgHandler::packMaskIDs(), and test_misc_FieldMask().
|
static |
Return the mask-id that corresponds to the specified data.
Definition at line 126 of file fei_FieldMask.cpp.
|
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().
|
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().
|
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().
|
inline |
Return the number of global indices corresponding to the set of fields
represented by this mask. This is sum(fieldSizes[i]).
Definition at line 74 of file fei_FieldMask.hpp.
References numIndices_.
Referenced by fei::Lookup_Impl::buildDatabases(), snl_fei::RecordMsgHandler::eqnNumbersMsgLength(), fei::Lookup_Impl::getAssociatedFieldID(), fei::VectorSpace::getNumDegreesOfFreedom(), fei::RecordAttributeCounter::operator()(), fei::BlkIndexAccessor::operator()(), snl_fei::RecordMsgHandler::packEqnNumbersMsg(), fei::VectorSpace::setLocalEqnNumbers(), and test_misc_FieldMask().
|
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().
|
inline |
Return an array of the fields in this field-mask.
Definition at line 82 of file fei_FieldMask.hpp.
References fieldIDs_.
Referenced by fei::Lookup_Impl::getAssociatedFieldID(), fei::VectorSpace::getFields(), snl_fei::RecordMsgHandler::mergeMaskIDs(), fei::ReverseMapper::ReverseMapper(), and test_misc_FieldMask().
|
inline |
Return an array of the fields in this field-mask.
Definition at line 85 of file fei_FieldMask.hpp.
References fieldIDs_.
|
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().
|
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 |
Given a field-id, return the offset of the corresponding equation- number in a record's list of equation-numbers. Return 0 if successful, -1 if the fieldID is not found.
Definition at line 56 of file fei_FieldMask.cpp.
Referenced by fei::Vector_core::copyOutFieldData(), fei::MatrixGraph_Impl2::createSlaveMatrices(), fei::MatrixGraph_Impl2::getConnectivityIndices_multiField(), fei::MatrixGraph_Impl2::getConnectivityIndices_singleField(), fei::Lookup_Impl::getEqnNumber(), snl_fei::RecordCollection::getGlobalIndex(), snl_fei::RecordCollection::getGlobalIndexLocalID(), fei::VectorSpace::getGlobalIndices(), fei::VectorSpace::getGlobalIndicesL(), fei::ReverseMapper::ReverseMapper(), and test_misc_FieldMask().
|
inline |
|
inline |
Test inequality of field-masks.
Definition at line 104 of file fei_FieldMask.hpp.
References maskID_.
|
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().
|
private |
Definition at line 121 of file fei_FieldMask.cpp.
Referenced by snl_fei::RecordMsgHandler::addFieldMasks(), snl_fei::RecordCollection::initRecords(), and test_misc_FieldMask().
|
private |
Definition at line 124 of file fei_FieldMask.hpp.
Referenced by calculateMaskID(), getMaskID(), operator!=(), and operator==().
|
private |
Definition at line 126 of file fei_FieldMask.hpp.
Referenced by FieldMask(), getFieldIDs(), getNumFields(), hasFieldID(), and isSubSetOf().
|
private |
Definition at line 127 of file fei_FieldMask.hpp.
Referenced by getFieldSizes().
|
private |
Definition at line 128 of file fei_FieldMask.hpp.
|
private |
Definition at line 130 of file fei_FieldMask.hpp.
Referenced by calculateMaskID(), and FieldMask().
|
private |
Definition at line 131 of file fei_FieldMask.hpp.
Referenced by FieldMask(), getNumIndices(), and setNumIndices().