Digital Image Correlation Engine  Version 1.0
A modular, high-performance, image correlation tool used to compute full-field displacements and strains from digital images
Public Member Functions | Private Attributes | List of all members
DICe::MultiField_Map Class Reference

MPI distribution map. More...

#include <DICe_MultiFieldEpetra.h>

Public Member Functions

 MultiField_Map (const int_t num_elements, const int_t index_base, MultiField_Comm &comm)
 Constructor that splits the number of elements evenly across the processors. More...
 
 MultiField_Map (const int_t num_elements, Teuchos::ArrayView< const int_t > elements, const int_t index_base, MultiField_Comm &comm)
 Constructor that takes a list of elements as arguments (this is not necessarily continguous or one-to-one) More...
 
 MultiField_Map (const int_t num_elements, const int_t num_local_elements, const int_t index_base, MultiField_Comm &comm)
 Constructor that uses the local number of elements per processor and builds the global list. More...
 
virtual ~MultiField_Map ()
 destructor
 
Teuchos::RCP< const Epetra_Map > get () const
 Returns a pointer to the underlying map object.
 
int_t get_local_element (const int_t global_id) const
 Return the local processor id for the given global id. Returns -1 if the global id is not on the processor. More...
 
int get_global_element (const int_t local_id) const
 Return the global id for the given local id. More...
 
MultiField_Comm get_comm () const
 returns the parallel communicator
 
bool is_node_global_elem (const int_t global_id)
 
int_t get_num_global_elements () const
 Returns the total number of global elements.
 
int_t get_num_local_elements () const
 Returns the number of local elements.
 
int_t get_max_global_index () const
 Returns the max of all the global ids.
 
int_t get_min_global_index () const
 Returns the min of all the global ids.
 
void get_remote_index_list (Teuchos::Array< int_t > &GIDList, Teuchos::Array< int_t > &nodeIDList) const
 
Teuchos::ArrayView< const int_tget_global_element_list () const
 Reutrns an array view that lists the elements that are local to this process.
 
bool is_one_to_one () const
 Returns true if the map is one to one.
 
void describe () const
 Print the map to the screen.
 
 MultiField_Map (const int_t num_elements, const int_t index_base, MultiField_Comm &comm)
 Constructor that splits the number of elements evenly across the processors. More...
 
 MultiField_Map (const int_t num_elements, Teuchos::ArrayView< const int_t > elements, const int_t index_base, MultiField_Comm &comm)
 Constructor that takes a list of elements as arguments (this is not necessarily continguous or one-to-one) More...
 
 MultiField_Map (const int_t num_elements, const int_t num_local_elements, const int_t index_base, MultiField_Comm &comm)
 Constructor that uses the local number of elements per processor and builds the global list. More...
 
virtual ~MultiField_Map ()
 destructor
 
Teuchos::RCP< const map_typeget () const
 Returns a pointer to the underlying map object.
 
int_t get_local_element (const int global_id) const
 Return the local id for the given global id. Returns -1 if the global id is not on the processor. More...
 
int get_global_element (const int_t local_id) const
 Return the global id for the given local id. More...
 
int_t get_num_global_elements () const
 Returns the total number of global elements.
 
int_t get_num_local_elements () const
 Returns the number of local elements.
 
int_t get_max_global_index () const
 Returns the max of all the global ids.
 
int_t get_min_global_index () const
 Returns the min of all the global ids.
 
MultiField_Comm get_comm () const
 returns the parallel communicator
 
bool is_node_global_elem (const int_t global_id)
 
void get_remote_index_list (Teuchos::Array< int_t > &GIDList, Teuchos::Array< int_t > &nodeIDList) const
 
Teuchos::ArrayView< const int_tget_global_element_list () const
 Reutrns an array view that lists the elements that are local to this process.
 
bool is_one_to_one () const
 Returns true if the map is one to one.
 
void describe () const
 Print the map to the screen.
 

Private Attributes

Teuchos::RCP< const Epetra_Map > map_
 Pointer to the underlying map object for this class.
 
MultiField_Comm comm_
 communicator
 
Teuchos::RCP< const map_typemap_
 Pointer to the underlying map object for this class.
 

Detailed Description

MPI distribution map.

Constructor & Destructor Documentation

◆ MultiField_Map() [1/6]

DICe::MultiField_Map::MultiField_Map ( const int_t  num_elements,
const int_t  index_base,
MultiField_Comm comm 
)
inline

Constructor that splits the number of elements evenly across the processors.

Parameters
num_elementsthe global number of elements
index_baseeither 0 or 1
commthe MPI communicator

◆ MultiField_Map() [2/6]

DICe::MultiField_Map::MultiField_Map ( const int_t  num_elements,
Teuchos::ArrayView< const int_t elements,
const int_t  index_base,
MultiField_Comm comm 
)
inline

Constructor that takes a list of elements as arguments (this is not necessarily continguous or one-to-one)

Parameters
num_elementsthe global number of elements, if invalid is supplied, this number will be computed based on the element lists on each processor
elementsthe array of global element ids
index_baseeither 0 or 1
commMPI communicator

◆ MultiField_Map() [3/6]

DICe::MultiField_Map::MultiField_Map ( const int_t  num_elements,
const int_t  num_local_elements,
const int_t  index_base,
MultiField_Comm comm 
)
inline

Constructor that uses the local number of elements per processor and builds the global list.

Parameters
num_elementsthe global number of elements (-1 forces tpetra to decide)
num_local_elementsthe local number of elements
index_baseeither 0 or 1
commthe MPI communicator

◆ MultiField_Map() [4/6]

DICe::MultiField_Map::MultiField_Map ( const int_t  num_elements,
const int_t  index_base,
MultiField_Comm comm 
)
inline

Constructor that splits the number of elements evenly across the processors.

Parameters
num_elementsthe global number of elements
index_baseeither 0 or 1
commthe MPI communicator

◆ MultiField_Map() [5/6]

DICe::MultiField_Map::MultiField_Map ( const int_t  num_elements,
Teuchos::ArrayView< const int_t elements,
const int_t  index_base,
MultiField_Comm comm 
)
inline

Constructor that takes a list of elements as arguments (this is not necessarily continguous or one-to-one)

Parameters
num_elementsthe global number of elements, if invalid is supplied, this number will be computed based on the element lists on each processor
elementsthe array of global element ids
index_baseeither 0 or 1
commMPI communicator

◆ MultiField_Map() [6/6]

DICe::MultiField_Map::MultiField_Map ( const int_t  num_elements,
const int_t  num_local_elements,
const int_t  index_base,
MultiField_Comm comm 
)
inline

Constructor that uses the local number of elements per processor and builds the global list.

Parameters
num_elementsthe global number of elements (-1 forces tpetra to decide)
num_local_elementsthe local number of elements
index_baseeither 0 or 1
commthe MPI communicator

Member Function Documentation

◆ get_global_element() [1/2]

int DICe::MultiField_Map::get_global_element ( const int_t  local_id) const
inline

Return the global id for the given local id.

Parameters
local_idthe local id of the element

◆ get_global_element() [2/2]

int DICe::MultiField_Map::get_global_element ( const int_t  local_id) const
inline

Return the global id for the given local id.

Parameters
local_idthe local id of the element

◆ get_local_element() [1/2]

int_t DICe::MultiField_Map::get_local_element ( const int  global_id) const
inline

Return the local id for the given global id. Returns -1 if the global id is not on the processor.

Parameters
global_idthe global id of the element

◆ get_local_element() [2/2]

int_t DICe::MultiField_Map::get_local_element ( const int_t  global_id) const
inline

Return the local processor id for the given global id. Returns -1 if the global id is not on the processor.

Parameters
global_idthe global id of the element

◆ get_remote_index_list() [1/2]

void DICe::MultiField_Map::get_remote_index_list ( Teuchos::Array< int_t > &  GIDList,
Teuchos::Array< int_t > &  nodeIDList 
) const
inline

returns a list of the remote indices

Parameters
GIDListthe list of global IDs
nodeIDListthe list of node IDs

◆ get_remote_index_list() [2/2]

void DICe::MultiField_Map::get_remote_index_list ( Teuchos::Array< int_t > &  GIDList,
Teuchos::Array< int_t > &  nodeIDList 
) const
inline

returns a list of the remote indices

Parameters
GIDListthe list of global IDs
nodeIDListthe list of node IDs

◆ is_node_global_elem() [1/2]

bool DICe::MultiField_Map::is_node_global_elem ( const int_t  global_id)
inline

returns true if this global id is on this node

Parameters
global_idthe global id to check

◆ is_node_global_elem() [2/2]

bool DICe::MultiField_Map::is_node_global_elem ( const int_t  global_id)
inline

returns true if this global id is on this node

Parameters
global_idthe global id to check