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 | Protected Attributes | List of all members
DICe::mesh::Mesh_Object Class Reference

A mesh object is the base class for elements, nodes, faces, that make up the computational domain. More...

#include <DICe_Mesh.h>

Inheritance diagram for DICe::mesh::Mesh_Object:
DICe::mesh::Bond DICe::mesh::Edge DICe::mesh::Element DICe::mesh::Internal_Cell DICe::mesh::Internal_Face_Edge DICe::mesh::Node DICe::mesh::Subelement

Public Member Functions

 Mesh_Object (const int_t global_id, const int_t local_id)
 Basic and only constructor. More...
 
virtual ~Mesh_Object ()
 destructor
 
int_t global_id () const
 Returns the global id of the mesh object.
 
int_t local_id () const
 Returns the local id of the mesh object.
 
int_t overlap_local_id () const
 Returns the local overlap id of mesh objects that are shared accross processors.
 
int_t overlap_neighbor_local_id () const
 
bool operator< (const Mesh_Object &right) const
 
const std::set< int_t > * shallow_relations (const field_enums::Entity_Rank entity_rank) const
 
const std::vector< Teuchos::RCP< Mesh_Object > > * deep_relations (const field_enums::Entity_Rank entity_rank) const
 
shallow_relations_mapget_shallow_relations_map ()
 Returns a pointer to the map of shallow relations for this mesh object.
 
deep_relations_mapget_deep_relations_map ()
 Returns a pointer to the map of deep relations for this mesh object.
 
std::vector< int_t > * get_shallow_elem_relations ()
 Returns a pointer to the shallow elem relations vector.
 
std::vector< Teuchos::RCP< Bond > > * get_deep_bond_relations ()
 Returns a pointer to the bond deep relations.
 
void add_shallow_relation (const field_enums::Entity_Rank entity_rank, const int_t global_id) const
 Add a shallow relation to this mesh object. More...
 
void add_deep_relation (const Teuchos::RCP< Element > element) const
 Add a deep relation for the given mesh object. More...
 
void add_deep_relation (const Teuchos::RCP< Node > node) const
 Add a deep relation for the given mesh object. More...
 
void add_deep_relation (const Teuchos::RCP< Internal_Face_Edge > internal_face_edge) const
 Add a deep relation for the given mesh object. More...
 
void add_deep_relation (const Teuchos::RCP< Internal_Cell > internal_cell) const
 Add a deep relation for the given mesh object. More...
 
void add_deep_relation (const Teuchos::RCP< Bond > bond) const
 Add a deep relation for the given mesh object. More...
 
int_t is_elem_relation (const int_t gid, scalar_t &sign)
 
size_t num_shallow_relations (const field_enums::Entity_Rank entity_rank) const
 
size_t num_deep_relations (const field_enums::Entity_Rank entity_rank) const
 
int_t num_initial_relations (const field_enums::Entity_Rank entity_rank) const
 
void update_local_id (const int_t local_id)
 
void update_overlap_local_id (const int_t overlap_local_id)
 
void update_overlap_neighbor_local_id (const int_t overlap_neighbor_local_id)
 
void set_initial_num_relations (const int_t num_relations, const field_enums::Entity_Rank relation_rank) const
 

Protected Attributes

int_t global_id_
 global id
 
int_t local_id_
 local id
 
int_t overlap_local_id_
 overlap local id
 
int_t overlap_neighbor_local_id_
 overlap neighbor local id (this is the index in the list that includes neighbor's neighbors shared accross processors)
 
shallow_relations_map shallow_relations_map_
 Map of shallow relations (ids only not pointers to the objects)
 
std::vector< int_tshallow_elem_relations_
 Vector of shallow elem relations.
 
deep_relations_map deep_relations_map_
 Map of deep relations (not just ids, but actual pointers to the objects)
 
std::vector< Teuchos::RCP< Bond > > deep_bond_relations_
 Vector of pointers to bond relations.
 
int_t initial_num_node_relations_
 Number of initial node relations.
 
int_t initial_num_elem_relations_
 Number of initial element relations.
 

Detailed Description

A mesh object is the base class for elements, nodes, faces, that make up the computational domain.

Constructor & Destructor Documentation

◆ Mesh_Object()

DICe::mesh::Mesh_Object::Mesh_Object ( const int_t  global_id,
const int_t  local_id 
)

Basic and only constructor.

Parameters
global_idthe global id of the mesh object
local_idthe local id of the mesh object

Member Function Documentation

◆ add_deep_relation() [1/5]

void DICe::mesh::Mesh_Object::add_deep_relation ( const Teuchos::RCP< Bond bond) const

Add a deep relation for the given mesh object.

Parameters
bondThe mesh object to add a deep relation for

◆ add_deep_relation() [2/5]

void DICe::mesh::Mesh_Object::add_deep_relation ( const Teuchos::RCP< Element element) const

Add a deep relation for the given mesh object.

Parameters
elementThe mesh object to add a deep relation for

Note: Be careful with deep relations, the relations need to be local to this process and the mesh object can be altered through the relations

◆ add_deep_relation() [3/5]

void DICe::mesh::Mesh_Object::add_deep_relation ( const Teuchos::RCP< Internal_Cell internal_cell) const

Add a deep relation for the given mesh object.

Parameters
internal_cellThe mesh object to add a deep relation for

◆ add_deep_relation() [4/5]

void DICe::mesh::Mesh_Object::add_deep_relation ( const Teuchos::RCP< Internal_Face_Edge internal_face_edge) const

Add a deep relation for the given mesh object.

Parameters
internal_face_edgeThe mesh object to add a deep relation for

◆ add_deep_relation() [5/5]

void DICe::mesh::Mesh_Object::add_deep_relation ( const Teuchos::RCP< Node node) const

Add a deep relation for the given mesh object.

Parameters
nodeThe mesh object to add a deep relation for

◆ add_shallow_relation()

void DICe::mesh::Mesh_Object::add_shallow_relation ( const field_enums::Entity_Rank  entity_rank,
const int_t  global_id 
) const

Add a shallow relation to this mesh object.

Parameters
entity_rankThe entity rank determines which list to add the relation to
global_idThe global id of the mesh object to add as a relation

Only save off the global id of the relation and nothing else. Good for off processor elements

◆ deep_relations()

const std::vector<Teuchos::RCP<Mesh_Object> >* DICe::mesh::Mesh_Object::deep_relations ( const field_enums::Entity_Rank  entity_rank) const
inline

Returns a pointer to the set of deep relations (actual pointers to the objects themselves, not just the id as in shallow relations)

Parameters
entity_rankThe rank of the relations to gather

◆ is_elem_relation()

int_t DICe::mesh::Mesh_Object::is_elem_relation ( const int_t  gid,
scalar_t sign 
)

Returns true if the given global id is a relation for this element

Parameters
gidGlobal id of the element in question
sign[out] The sign of the normal vector pointing to this relation (used for fluxes)

◆ num_deep_relations()

size_t DICe::mesh::Mesh_Object::num_deep_relations ( const field_enums::Entity_Rank  entity_rank) const
inline

Returns the number of deep relations for this mesh object

Parameters
entity_rankThe rank determines what the relation type is

◆ num_initial_relations()

int_t DICe::mesh::Mesh_Object::num_initial_relations ( const field_enums::Entity_Rank  entity_rank) const
inline

Returns the number of initial shallow relations for this mesh object

Parameters
entity_rankThe rank determines what the relation type is

◆ num_shallow_relations()

size_t DICe::mesh::Mesh_Object::num_shallow_relations ( const field_enums::Entity_Rank  entity_rank) const
inline

Returns the number of shallow relations for this mesh object

Parameters
entity_rankThe rank determines what the relation type is

◆ operator<()

bool DICe::mesh::Mesh_Object::operator< ( const Mesh_Object right) const
inline

Less than operator for creating maps or sets of mesh objects

Parameters
rightThe mesh object to compre to

◆ overlap_neighbor_local_id()

int_t DICe::mesh::Mesh_Object::overlap_neighbor_local_id ( ) const
inline

Returns the local neighbor overlap id (this overlap map contains neighbor relations that are shared accross processors as well)

◆ set_initial_num_relations()

void DICe::mesh::Mesh_Object::set_initial_num_relations ( const int_t  num_relations,
const field_enums::Entity_Rank  relation_rank 
) const

Set the number of initial relations

Parameters
num_relationsThe number of relations
relation_rankThe type of mesh object that this number applies to

◆ shallow_relations()

const std::set<int_t>* DICe::mesh::Mesh_Object::shallow_relations ( const field_enums::Entity_Rank  entity_rank) const
inline

Returns a pointer to the set of shallow relations (id of relation only)

Parameters
entity_rankThe rank of the relations to gather

◆ update_local_id()

void DICe::mesh::Mesh_Object::update_local_id ( const int_t  local_id)
inline

Update the local id of this mesh object

Parameters
local_idThe new id

◆ update_overlap_local_id()

void DICe::mesh::Mesh_Object::update_overlap_local_id ( const int_t  overlap_local_id)
inline

Update the overlap local id of this mesh object

Parameters
overlap_local_idThe new id

◆ update_overlap_neighbor_local_id()

void DICe::mesh::Mesh_Object::update_overlap_neighbor_local_id ( const int_t  overlap_neighbor_local_id)
inline

Update the overlap neighbor local id of this mesh object (this is the index in the shared map that includes neighbor's neighbors)

Parameters
overlap_neighbor_local_idThe new id