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 Member Functions | Private Attributes | List of all members
DICe::Decomp Class Reference

decomposes the images and the mesh points for parallel execution. More...

#include <DICe_Decomp.h>

Public Member Functions

 Decomp (const Teuchos::RCP< Teuchos::ParameterList > &input_params, const Teuchos::RCP< Teuchos::ParameterList > &correlation_params)
 
 Decomp (Teuchos::ArrayRCP< scalar_t > subset_centroids_x, Teuchos::ArrayRCP< scalar_t > subset_centroids_y, Teuchos::RCP< std::vector< int_t > > neighbor_ids, Teuchos::RCP< std::map< int_t, std::vector< int_t > > > obstructing_subset_ids, const Teuchos::RCP< Teuchos::ParameterList > &correlation_params)
 
 ~Decomp ()
 destructor
 
int_t num_global_subsets () const
 returns the global number of subsets
 
std::vector< int_tthis_proc_gid_order () const
 returns a copy of the execution ordering
 
Teuchos::RCP< MultiField_Mapid_decomp_map ()
 returns the one to one decomp map
 
Teuchos::RCP< MultiField_Mapid_decomp_overlap_map ()
 return the non one-to-one decomposition map (some ids are ghosted across processors)
 
Teuchos::ArrayRCP< scalar_toverlap_coords_x () const
 returns a pointer to the trimmed set of overlap x coordinates
 
Teuchos::ArrayRCP< scalar_toverlap_coords_y () const
 returns a pointer to the trimmed set of overlap y coordinates
 
Teuchos::RCP< std::vector< int_t > > neighbor_ids () const
 returns a pointer to the neighbor ids vector
 
Teuchos::RCP< DICe::Subset_File_Infosubset_info () const
 returns a pointer to the subset info
 
int_t image_width () const
 returns the image width
 
int_t image_height () const
 returns the image width
 

Private Member Functions

void initialize (const Teuchos::ArrayRCP< scalar_t > subset_centroids_x, const Teuchos::ArrayRCP< scalar_t > subset_centroids_y, Teuchos::RCP< std::vector< int_t > > &neighbor_ids, Teuchos::RCP< std::map< int_t, std::vector< int_t > > > obstructing_subset_ids, const Teuchos::RCP< Teuchos::ParameterList > &correlation_params)
 
void populate_coordinate_vectors (const std::string &image_file_name, const Teuchos::RCP< Teuchos::ParameterList > &input_params, const Teuchos::RCP< Teuchos::ParameterList > &correlation_params, Teuchos::ArrayRCP< scalar_t > &subset_centroids_x, Teuchos::ArrayRCP< scalar_t > &subset_centroids_y, Teuchos::RCP< std::vector< int_t > > &neighbor_ids, Teuchos::RCP< std::map< int_t, std::vector< int_t > > > &obstructing_subset_ids)
 
void create_obstruction_dist_map (Teuchos::RCP< std::map< int_t, std::vector< int_t > > > &obstructing_subset_ids)
 
void create_seed_dist_map (Teuchos::RCP< std::vector< int_t > > &neighbor_ids, Teuchos::RCP< std::map< int_t, std::vector< int_t > > > &obstructing_subset_ids, const Teuchos::RCP< Teuchos::ParameterList > &correlation_params)
 

Private Attributes

int_t num_global_subsets_
 total number of points in the discretization
 
int_t image_width_
 image width of reference image (used for filtering points out of bounds)
 
int_t image_height_
 image height of reference image (used for filtering points out of bounds)
 
Teuchos::RCP< MultiField_Commcomm_
 global mpi communicator
 
Teuchos::RCP< MultiField_Mapid_decomp_map_
 one-to-one decomposition map (all ids are only onwned by one processor)
 
Teuchos::RCP< MultiField_Mapid_decomp_overlap_map_
 non one-to-one decomposition map (some ids are ghosted across processors)
 
std::vector< int_tthis_proc_gid_order_
 vector to keep track of the execution order for this processor
 
Teuchos::ArrayRCP< scalar_toverlap_coords_x_
 all the local and ghosted point x coordinates for this processor
 
Teuchos::ArrayRCP< scalar_toverlap_coords_y_
 all the local and ghosted point y coordinates for this processor
 
Teuchos::RCP< std::vector< int_t > > neighbor_ids_
 trimmed list of neighbor ids
 
Teuchos::RCP< DICe::Subset_File_Infosubset_info_
 info about ROI's, etc
 

Detailed Description

decomposes the images and the mesh points for parallel execution.

Constructor & Destructor Documentation

◆ Decomp() [1/2]

DICe::Decomp::Decomp ( const Teuchos::RCP< Teuchos::ParameterList > &  input_params,
const Teuchos::RCP< Teuchos::ParameterList > &  correlation_params 
)

constructor

Parameters
input_paramsthe input parameters
correlation_paramsthe correlation parameters

◆ Decomp() [2/2]

DICe::Decomp::Decomp ( Teuchos::ArrayRCP< scalar_t subset_centroids_x,
Teuchos::ArrayRCP< scalar_t subset_centroids_y,
Teuchos::RCP< std::vector< int_t > >  neighbor_ids,
Teuchos::RCP< std::map< int_t, std::vector< int_t > > >  obstructing_subset_ids,
const Teuchos::RCP< Teuchos::ParameterList > &  correlation_params 
)

constructor that splits up an already populated set of correlation points

Parameters
subset_centroids_xx coordinates of all global points
subset_centroids_yy coordinates of all global points prior to decomposition
neighbor_idsneighbor id to use for initialization if USE_NEIGHBOR_VALUES is selected
obstructing_subset_idsobstructions listed for each subset if necessary
correlation_paramspointer to the parameters used for the correlation

Member Function Documentation

◆ create_obstruction_dist_map()

void DICe::Decomp::create_obstruction_dist_map ( Teuchos::RCP< std::map< int_t, std::vector< int_t > > > &  obstructing_subset_ids)
private

redo the ordering and decomposition of points if there are obstructions involved

Parameters
obstructing_subset_idsmap giving the obstructions for each subset

◆ create_seed_dist_map()

void DICe::Decomp::create_seed_dist_map ( Teuchos::RCP< std::vector< int_t > > &  neighbor_ids,
Teuchos::RCP< std::map< int_t, std::vector< int_t > > > &  obstructing_subset_ids,
const Teuchos::RCP< Teuchos::ParameterList > &  correlation_params 
)
private

redo the ordering and decomposition to include seeds

Parameters
neighbor_idsvector of neighbor ids for each global point
obstructing_subset_idsused to make sure both obstructions and seeds aren's used together
correlation_paramscorrelation parameters from xml file

◆ initialize()

void DICe::Decomp::initialize ( const Teuchos::ArrayRCP< scalar_t subset_centroids_x,
const Teuchos::ArrayRCP< scalar_t subset_centroids_y,
Teuchos::RCP< std::vector< int_t > > &  neighbor_ids,
Teuchos::RCP< std::map< int_t, std::vector< int_t > > >  obstructing_subset_ids,
const Teuchos::RCP< Teuchos::ParameterList > &  correlation_params 
)
private

initialize all the maps and split up the subsets across processors preserving obstructions and seeds

Parameters
subset_centroids_xx coordinates of all global points
subset_centroids_yy coordinates of all global points prior to decomposition
neighbor_idsthe neighbors in global ids to use for initialization of the solution if neighbor values are used
obstructing_subset_idsobstructions listed for each subset if necessary
correlation_paramspointer to the parameters used for the correlation

◆ populate_coordinate_vectors()

void DICe::Decomp::populate_coordinate_vectors ( const std::string &  image_file_name,
const Teuchos::RCP< Teuchos::ParameterList > &  input_params,
const Teuchos::RCP< Teuchos::ParameterList > &  correlation_params,
Teuchos::ArrayRCP< scalar_t > &  subset_centroids_x,
Teuchos::ArrayRCP< scalar_t > &  subset_centroids_y,
Teuchos::RCP< std::vector< int_t > > &  neighbor_ids,
Teuchos::RCP< std::map< int_t, std::vector< int_t > > > &  obstructing_subset_ids 
)
private

populate the coordinate vectors note: all other procs besides proc 0 get an empty vector for coords_x and coords_y

Parameters
image_file_namename of the image to read for computing SSSIG if necessary
input_paramsinput parameters from xml file
correlation_paramscorrelation parameters from xml file
subset_centroids_xvector that gets populated with all global subset x coordinates
subset_centroids_yvector that gets populated with all global subset y coordinates
neighbor_idslist of neighbors to use if USE_NEIGHBOR_VALUES is the initialization type
obstructing_subset_idslist of obstructions