FEI  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | 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)
 

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.

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

Construct with initial fields

Definition at line 39 of file fei_FieldMask.cpp.

fei::FieldMask::~FieldMask ( )
virtual

Destructor

Definition at line 52 of file fei_FieldMask.cpp.

Member Function Documentation

int fei::FieldMask::getMaskID ( )
inline

Return the mask-id for this object.

Definition at line 46 of file fei_FieldMask.hpp.

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.

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

Add a field-id to this object.

Definition at line 87 of file fei_FieldMask.cpp.

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.

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.

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]).

Definition at line 74 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 79 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 82 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 85 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 88 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 91 of file fei_FieldMask.hpp.

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.

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

Test equality of field-masks.

Definition at line 100 of file fei_FieldMask.hpp.

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

Test inequality of field-masks.

Definition at line 104 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 111 of file fei_FieldMask.hpp.


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