#include <GlobalDataElement.h>
Public Member Functions | |
GlobalDataElement (Id id, const Cinfo *c, const string &name, unsigned int numData=1) | |
GlobalDataElement (Id id, const Element *orig, unsigned int n) | |
~GlobalDataElement () | |
Element * | copyElement (Id newParent, Id newId, unsigned int n, bool toGlobal) const |
unsigned int | numData () const |
Inherited virtual. Returns number of data entries. | |
unsigned int | localDataStart () const |
Inherited virtual. Returns index of first entry on this node. | |
unsigned int | getNode (unsigned int dataIndex) const |
Inherited virtual. Returns node location of specified object. | |
unsigned int | startDataIndex (unsigned int node) const |
Inherited virtual. Returns start dataIndex on specified node. | |
unsigned int | rawIndex (unsigned int dataId) const |
Converts dataId to index on current node. | |
bool | isGlobal () const |
True if there is a copy of every dataEntry on all nodes. | |
unsigned int | getNumOnNode (unsigned int node) const |
Inherited virtual. |
This is the usual class for managing the MOOSE interface. Handles the data. Elaborates on base class for how it handles destruction. Does block-wise partitioning between nodes.
GlobalDataElement::GlobalDataElement | ( | Id | id, | |
const Cinfo * | c, | |||
const string & | name, | |||
unsigned int | numData = 1 | |||
) |
This is the main constructor, used by Shell::innerCreate which makes most Elements. Also used to create base Elements to init the simulator in main.cpp. Id is the Id of the new Element Cinfo is the class name is its name numData is the number of data entries, defaults to a singleton. The isGlobal flag specifies whether the created objects should be replicated on all nodes, or partitioned without replication.
Referenced by copyElement().
This constructor copies over the original n times. It is used for doing all copies, in Shell::innerCopyElements.
GlobalDataElement::~GlobalDataElement | ( | ) |
Virtual Destructor
Element * GlobalDataElement::copyElement | ( | Id | newParent, | |
Id | newId, | |||
unsigned int | n, | |||
bool | toGlobal | |||
) | const [virtual] |
Virtual copier. Makes a copy of self.
Implements Element.
References GlobalDataElement().
unsigned int GlobalDataElement::getNode | ( | unsigned int | dataIndex | ) | const [virtual] |
Inherited virtual. Returns node location of specified object.
Implements Element.
References Shell::myNode().
unsigned int GlobalDataElement::getNumOnNode | ( | unsigned int | node | ) | const [virtual] |
Inherited virtual.
Implements Element.
References DataElement::numLocalData().
bool GlobalDataElement::isGlobal | ( | ) | const [inline, virtual] |
True if there is a copy of every dataEntry on all nodes.
Implements Element.
unsigned int GlobalDataElement::localDataStart | ( | ) | const [inline, virtual] |
Inherited virtual. Returns index of first entry on this node.
Implements Element.
unsigned int GlobalDataElement::numData | ( | ) | const [virtual] |
Inherited virtual. Returns number of data entries.
Implements Element.
References DataElement::numLocalData().
unsigned int GlobalDataElement::rawIndex | ( | unsigned int | dataId | ) | const [virtual] |
Converts dataId to index on current node.
Implements Element.
unsigned int GlobalDataElement::startDataIndex | ( | unsigned int | node | ) | const [inline, virtual] |
Inherited virtual. Returns start dataIndex on specified node.
Implements Element.