#include <source/hierarchy/patches/ProcessorMapping.h>
Public Member Functions | |
| ProcessorMapping () | |
| ProcessorMapping (const int n) | |
| ProcessorMapping (const ProcessorMapping &mapping) | |
| ProcessorMapping (const tbox::Array< int > &mapping) | |
| ~ProcessorMapping () | |
| void | setMappingSize (const int n) |
| void | setNumberNodes (const int n) |
| int | getProcessorAssignment (const int i) const |
| void | setProcessorAssignment (const int i, const int p) |
| tbox::Array< int > | getProcessorMapping () const |
| void | setProcessorMapping (const tbox::Array< int > &mapping) |
| int | getNumberOfLocalIndices () const |
| const tbox::Array< int > & | getLocalIndices () const |
| int | getSizeOfMappingArray () const |
| bool | isMappingLocal (const int i) const |
| SAMRAI::hier::ProcessorMapping::ProcessorMapping | ( | ) |
Create a default processor mapping array with 0 elements. Before the mapping can be used, its size should be set using the function setMappingSize() and each element of the mapping should be set by setProcessorAssignment().
| SAMRAI::hier::ProcessorMapping::ProcessorMapping | ( | const int | n | ) |
Create a processor mapping array with enough space for n elements. All elements of the mapping are initialized to processor zero, but they should be set by setProcessorAssignment() later.
| SAMRAI::hier::ProcessorMapping::ProcessorMapping | ( | const ProcessorMapping & | mapping | ) |
Create a new processor mapping and copy the processor assignments from the argument.
| SAMRAI::hier::ProcessorMapping::ProcessorMapping | ( | const tbox::Array< int > & | mapping | ) |
Create a new processor mapping and get processor assignments from the the tbox::Array<int> argument.
| SAMRAI::hier::ProcessorMapping::~ProcessorMapping | ( | ) | [inline] |
The destructor simply releases the storage for the mapping.
| void SAMRAI::hier::ProcessorMapping::setMappingSize | ( | const int | n | ) |
Resize the mapping so that it has n elements. Before it can be used, each element should be set using setProcessorAssignment().
| void SAMRAI::hier::ProcessorMapping::setNumberNodes | ( | const int | n | ) | [inline] |
Sets the number of nodes to n. IMPORTANT NOTE: This method should only be used for testing purposes. Under normal circumstances, the number of nodes is set by a call to tbox::SAMRAI_MPI::getNodes() and should NOT be changed.
| int SAMRAI::hier::ProcessorMapping::getProcessorAssignment | ( | const int | i | ) | const [inline] |
Return the processor assignment for the specified patch index.
| void SAMRAI::hier::ProcessorMapping::setProcessorAssignment | ( | const int | i, | |
| const int | p | |||
| ) | [inline] |
Set the processor assignment (second argument) for the specified patch index (first argument).
| tbox::Array< int > SAMRAI::hier::ProcessorMapping::getProcessorMapping | ( | ) | const [inline] |
Return an tbox::Array<int> of the processor mappings.
| void SAMRAI::hier::ProcessorMapping::setProcessorMapping | ( | const tbox::Array< int > & | mapping | ) |
Sets the processor mappings from an tbox::Array<int>. Remaps the processors so that patches are not accidentally mapped to non-existent nodes.
| int SAMRAI::hier::ProcessorMapping::getNumberOfLocalIndices | ( | ) | const |
Return the number of local indices (that is, those indices mapped to the local processor).
| const tbox::Array< int > & SAMRAI::hier::ProcessorMapping::getLocalIndices | ( | ) | const |
Return an array containing the local indices (that is, those indices mapped to the local processor).
| int SAMRAI::hier::ProcessorMapping::getSizeOfMappingArray | ( | ) | const [inline] |
Return the total number of indices in the mapping array.
| bool SAMRAI::hier::ProcessorMapping::isMappingLocal | ( | const int | i | ) | const [inline] |
Check whether the specified index is a local index (that is, mapped to the local processor).
1.5.1