FieldElement Class Reference

#include <FieldElement.h>

Inheritance diagram for FieldElement:
Inheritance graph
[legend]
Collaboration diagram for FieldElement:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FieldElement (Id parent, Id kid, const Cinfo *c, const string &name, const FieldElementFinfoBase *fef)
 ~FieldElement ()
ElementcopyElement (Id newParent, Id newId, unsigned int n, bool toGlobal) const
unsigned int numData () const
unsigned int numLocalData () const
 Virtual: Returns number of data entries on current node.
unsigned int localDataStart () const
 Virtual: Returns index of first data entry on this node.
unsigned int numField (unsigned int rawIndex) const
 Virtual: Returns number of field entries for specified data.
unsigned int totNumLocalField () const
 Virtual: Returns number of field entries on current node.
unsigned int getNode (unsigned int dataId) const
 Virtual: Returns location of specified dataId.
unsigned int startDataIndex (unsigned int node) const
 Virtual: Returns start DataIndex on specified node.
unsigned int rawIndex (unsigned int dataId) const
 Virtual: Returns converted dataId to index on current node.
bool hasFields () const
bool isGlobal () const
 Virtual. Returns true if global, ie, if its parent is global.
unsigned int getNumOnNode (unsigned int node) const
 Inherited virtual.
char * data (unsigned int rawIndex, unsigned int fieldIndex=0) const
void resize (unsigned int newNumData)
void resizeField (unsigned int rawIndex, unsigned int newNumField)
void zombieSwap (const Cinfo *zCinfo)

Detailed Description

Specialization of Element class, used to look up array fields within objects when those fields each need to have independent Element capabilies such as messaging and subfield lookup. Made automatically by Elements which have such fields.


Constructor & Destructor Documentation

FieldElement::FieldElement ( Id  parent,
Id  kid,
const Cinfo c,
const string &  name,
const FieldElementFinfoBase fef 
)

Referenced by copyElement().

FieldElement::~FieldElement (  ) 

Virtual func: leave the clearing of the messages to ElementBase, the data is cleared by the parent Element of this field.


Member Function Documentation

Element * FieldElement::copyElement ( Id  newParent,
Id  newId,
unsigned int  n,
bool  toGlobal 
) const [virtual]

Virtual copier. Makes a copy of self.

Implements Element.

References Element::cinfo(), FieldElement(), and Element::getName().

Here is the call graph for this function:

char * FieldElement::data ( unsigned int  rawIndex,
unsigned int  fieldIndex = 0 
) const [virtual]

virtual. Looks up specified field field entry. First it finds the appropriate data entry from the rawIndex. Then it looks up the field using the lookupField. Returns the data entry specified by the rawIndex, fieldIndex.

Note that the index is NOT a DataIndex: it is instead the raw index of the data on the current node. Index is also NOT the character offset, but the index to the data array in whatever type the data may be.

The DataIndex has to be filtered through the nodeMap to find a) if the entry is here, and b) what its raw index is.

Returns 0 if either index is out of range.

Implements Element.

References Element::data(), Id::element(), and FieldElementFinfoBase::lookupField().

Referenced by numField(), and resizeField().

Here is the call graph for this function:

unsigned int FieldElement::getNode ( unsigned int  dataId  )  const [virtual]

Virtual: Returns location of specified dataId.

Implements Element.

References Id::element(), and Element::getNode().

Here is the call graph for this function:

unsigned int FieldElement::getNumOnNode ( unsigned int  node  )  const [virtual]

Inherited virtual.

Implements Element.

References Id::element(), Element::isGlobal(), Shell::myNode(), and totNumLocalField().

Here is the call graph for this function:

bool FieldElement::hasFields (  )  const [inline, virtual]

Virtual: True if this is a FieldElement having an array of fields on each data entry. So true in this case.

Implements Element.

bool FieldElement::isGlobal (  )  const [virtual]

Virtual. Returns true if global, ie, if its parent is global.

Implements Element.

References Id::element(), and Element::isGlobal().

Here is the call graph for this function:

unsigned int FieldElement::localDataStart (  )  const [virtual]

Virtual: Returns index of first data entry on this node.

Implements Element.

References Id::element(), and Element::localDataStart().

Here is the call graph for this function:

unsigned int FieldElement::numData (  )  const [virtual]

Virtual: Returns number of data entries

Implements Element.

References Id::element(), and Element::numData().

Here is the call graph for this function:

unsigned int FieldElement::numField ( unsigned int  rawIndex  )  const [virtual]

Virtual: Returns number of field entries for specified data.

Implements Element.

References Element::data(), data(), Id::element(), and FieldElementFinfoBase::getNumField().

Referenced by totNumLocalField().

Here is the call graph for this function:

unsigned int FieldElement::numLocalData (  )  const [virtual]

Virtual: Returns number of data entries on current node.

Implements Element.

References Id::element(), and Element::numLocalData().

Referenced by totNumLocalField().

Here is the call graph for this function:

unsigned int FieldElement::rawIndex ( unsigned int  dataId  )  const [virtual]

Virtual: Returns converted dataId to index on current node.

Implements Element.

References Id::element(), and Element::rawIndex().

Here is the call graph for this function:

void FieldElement::resize ( unsigned int  newNumData  )  [virtual]

virtual Changes the number of entries in the data. Not permitted for FieldElements since they are just fields on the data.

Implements Element.

void FieldElement::resizeField ( unsigned int  rawIndex,
unsigned int  newNumField 
) [virtual]

virtual. Changes the number of fields on the specified data entry.

Implements Element.

References Element::data(), data(), Id::element(), and FieldElementFinfoBase::setNumField().

Here is the call graph for this function:

unsigned int FieldElement::startDataIndex ( unsigned int  node  )  const [virtual]

Virtual: Returns start DataIndex on specified node.

Implements Element.

References Id::element(), and Element::startDataIndex().

Here is the call graph for this function:

unsigned int FieldElement::totNumLocalField (  )  const [virtual]

Virtual: Returns number of field entries on current node.

Implements Element.

References numField(), and numLocalData().

Referenced by getNumOnNode().

Here is the call graph for this function:

void FieldElement::zombieSwap ( const Cinfo zCinfo  )  [virtual]

Virtual: after replacing Cinfo of parent, we need to replace Cinfo and fef here. The zCinfo is the new Cinfo for this FieldElement.

Reimplemented from Element.

References Cinfo::findFinfo(), Element::getName(), and Element::replaceCinfo().

Here is the call graph for this function:


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

Generated on 1 Jul 2015 for MOOSE by  doxygen 1.6.1