|
IBAMR
IBAMR version 0.19.
|
#include <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 |
Private Member Functions | |
| void | computeLocalIndices () const |
| void | operator= (const ProcessorMapping &) |
Private Attributes | |
| int | d_my_rank |
| int | d_nodes |
| tbox::Array< int > | d_mapping |
| int | d_local_index_count |
| tbox::Array< int > | d_local_indices |
Class ProcessorMapping represents the processor assignments of patches to processors. It makes sure that all processor assignments are in the range from 0 through NODES-1 and answers whether a particular assignment is local to the processor.
| 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 | ( | ) |
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 | ) |
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.
Return the processor assignment for the specified patch index.
Set the processor assignment (second argument) for the specified patch index (first argument).
| tbox::Array<int> SAMRAI::hier::ProcessorMapping::getProcessorMapping | ( | ) | const |
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 |
Return the total number of indices in the mapping array.
Check whether the specified index is a local index (that is, mapped to the local processor).
|
private |
Fills in the array d_local_indices, and sets d_local_index_count.
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |
|
mutableprivate |
1.8.17