MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GlobalDataElement.h
Go to the documentation of this file.
1 /**********************************************************************
2 ** This program is part of 'MOOSE', the
3 ** Messaging Object Oriented Simulation Environment.
4 ** Copyright (C) 2003-2013 Upinder S. Bhalla. and NCBS
5 ** It is made available under the terms of the
6 ** GNU Lesser General Public License version 2.1
7 ** See the file COPYING.LIB for the full notice.
8 **********************************************************************/
9 #ifndef _GLOBAL_DATA_ELEMENT_H
10 #define _GLOBAL_DATA_ELEMENT_H
11 
12 class SrcFinfo;
13 class FuncOrder;
14 
22 {
23  public:
35  GlobalDataElement( Id id, const Cinfo* c, const string& name,
36  unsigned int numData = 1 );
37 
42  GlobalDataElement( Id id, const Element* orig, unsigned int n );
43 
48 
52  Element* copyElement( Id newParent, Id newId, unsigned int n,
53  bool toGlobal ) const;
54 
56  // Information access fields
58 
60  unsigned int numData() const;
61 
63  unsigned int localDataStart() const {
64  return 0;
65  }
66 
68  unsigned int getNode( unsigned int dataIndex ) const;
69 
71  unsigned int startDataIndex( unsigned int node ) const
72  {
73  return 0;
74  }
75 
77  unsigned int rawIndex( unsigned int dataId ) const;
78 
79  bool isGlobal() const {
80  return true;
81  }
82 
84  unsigned int getNumOnNode( unsigned int node ) const;
85 
87  // data access stuff: All is just inherited.
89 
91 
92  private:
93  // All is inherited from DataElement.
94 
95 };
96 
97 #endif // _GLOBAL_DATA_ELEMENT_H
Element * copyElement(Id newParent, Id newId, unsigned int n, bool toGlobal) const
unsigned int localDataStart() const
Inherited virtual. Returns index of first entry on this node.
GlobalDataElement(Id id, const Cinfo *c, const string &name, unsigned int numData=1)
unsigned int getNode(unsigned int dataIndex) const
Inherited virtual. Returns node location of specified object.
unsigned int numData() const
Inherited virtual. Returns number of data entries.
unsigned int startDataIndex(unsigned int node) const
Inherited virtual. Returns start dataIndex on specified node.
static char dataIndex[]
Definition: mfield.cpp:406
bool isGlobal() const
True if there is a copy of every dataEntry on all nodes.
unsigned int getNumOnNode(unsigned int node) const
Inherited virtual.
static char name[]
Definition: mfield.cpp:401
Definition: Id.h:17
Definition: Cinfo.h:18
unsigned int rawIndex(unsigned int dataId) const
Converts dataId to index on current node.