#include <MLAPI_Space.h>
Public Member Functions | |
Space () | |
Default constructor, defines an empty space. | |
Space (const int NumGlobalElements, const int NumMyElements=-1) | |
Constructor with specified number of global and local elements. | |
Space (const Epetra_Map &Map) | |
Constructor with specified Epetra_Map. | |
Space (const int NumGlobalElements, const int NumMyElements, const int *MyGlobalElements) | |
Constructor for non-linear distributions. | |
Space (const Space &RHS) | |
Copy constructor. | |
~Space () | |
Destructor. | |
void | Reshape () |
Resets this object. | |
void | Reshape (const int NumGlobalElements, const int NumMyElements=-1) |
Resets the dimension of the space by specifying the local number of elements. | |
void | Reshape (const int NumGlobalElements, const int NumMyElements, const int *MyGlobalElements) |
Reset the dimension of the space by specifying the local number of elements and their global numbering (starting from 0). | |
Space & | operator= (const Space &RHS) |
Operator =. | |
bool | operator== (const Space &RHS) const |
Returns true if this Space is equivalent to RHS . | |
bool | operator!= (const Space &RHS) const |
Returns true if this Space is not equivalent to RHS . | |
Space & | operator= (const string &Label) |
Sets the Label of this object. | |
int | operator() (int i) const |
Returns the global ID of local element i . | |
int | GetNumMyElements () const |
Returns the local number of elements on the calling process. | |
int | GetNumGlobalElements () const |
Returns the global number of elements. | |
int | GetOffset () const |
Returns the global ID of the first element on the calling process (for linear distributions only). | |
bool | IsLinear () const |
Returns true if the decomposition among processors is linear. | |
const Teuchos::RefCountPtr < Epetra_IntSerialDenseVector > | GetRCPMyGlobalElements () const |
Returns a pointer to the list of global nodes. | |
std::ostream & | Print (std::ostream &os, const bool verbose=true) const |
Prints on ostream basic information about this object. | |
Private Attributes | |
int | NumMyElements_ |
Number of elements assigned to the calling processor. | |
int | NumGlobalElements_ |
Total number of elements. | |
bool | IsLinear_ |
If true , the decomposition among processors is linear. | |
int | Offset_ |
GID of the first local element (for linear decompositions only). | |
Teuchos::RefCountPtr < Epetra_IntSerialDenseVector > | RCPMyGlobalElements_ |
Container of global numbering of local elements. |
MLAPI::Space::Space | ( | ) | [inline] |
MLAPI::Space::Space | ( | const int | NumGlobalElements, | |
const int | NumMyElements = -1 | |||
) | [inline] |
Constructs a space with linear distribution.
NumGlobalElements | - (In) number of global elements. | |
NumMyElements | - (In) number of local elements. If different from -1, then eithere NumGlobalElements == -1, or the sum across of processors of NumMyElements equals NumGlobalElements |
MLAPI::Space::Space | ( | const Epetra_Map & | Map | ) | [inline] |
MLAPI::Space::Space | ( | const int | NumGlobalElements, | |
const int | NumMyElements, | |||
const int * | MyGlobalElements | |||
) | [inline] |
NumGlobalElements | - (In) number of global elements. Set to -1 to compute it automatically. | |
NumMyElements | - (In) number of local elements. Cannot be set to -1. | |
MyGlobalElements | - (In) contains the global ID of each local node. |
MLAPI::Space::Space | ( | const Space & | RHS | ) | [inline] |
MLAPI::Space::~Space | ( | ) | [inline] |
int MLAPI::Space::GetNumGlobalElements | ( | ) | const [inline] |
int MLAPI::Space::GetNumMyElements | ( | ) | const [inline] |
int MLAPI::Space::GetOffset | ( | ) | const [inline] |
const Teuchos::RefCountPtr<Epetra_IntSerialDenseVector> MLAPI::Space::GetRCPMyGlobalElements | ( | ) | const [inline] |
bool MLAPI::Space::IsLinear | ( | ) | const [inline] |
bool MLAPI::Space::operator!= | ( | const Space & | RHS | ) | const [inline] |
int MLAPI::Space::operator() | ( | int | i | ) | const [inline] |
Space& MLAPI::Space::operator= | ( | const string & | Label | ) | [inline] |
bool MLAPI::Space::operator== | ( | const Space & | RHS | ) | const [inline] |
std::ostream& MLAPI::Space::Print | ( | std::ostream & | os, | |
const bool | verbose = true | |||
) | const [inline, virtual] |
Implements MLAPI::BaseObject.
void MLAPI::Space::Reshape | ( | const int | NumGlobalElements, | |
const int | NumMyElements, | |||
const int * | MyGlobalElements | |||
) | [inline] |
void MLAPI::Space::Reshape | ( | const int | NumGlobalElements, | |
const int | NumMyElements = -1 | |||
) | [inline] |
void MLAPI::Space::Reshape | ( | ) | [inline] |
bool MLAPI::Space::IsLinear_ [private] |
int MLAPI::Space::NumGlobalElements_ [private] |
int MLAPI::Space::NumMyElements_ [private] |
int MLAPI::Space::Offset_ [private] |
Teuchos::RefCountPtr<Epetra_IntSerialDenseVector> MLAPI::Space::RCPMyGlobalElements_ [private] |