LifeV
|
#include <GhostHandler.hpp>
Public Types | |
typedef MeshType | mesh_Type |
typedef std::shared_ptr< mesh_Type > | meshPtr_Type |
typedef Epetra_Comm | comm_Type |
typedef std::shared_ptr< comm_Type > | commPtr_Type |
typedef MapEpetra | map_Type |
typedef std::shared_ptr< map_Type > | mapPtr_Type |
typedef std::vector< Int > | idList_Type |
typedef std::shared_ptr< idList_Type > | idListPtr_Type |
typedef std::vector< idList_Type > | graph_Type |
typedef std::shared_ptr< graph_Type > | graphPtr_Type |
typedef std::vector< idListPtr_Type > | vertexPartition_Type |
typedef std::shared_ptr< vertexPartition_Type > | vertexPartitionPtr_Type |
typedef std::vector< markerID_Type > | markerIDList_Type |
typedef std::vector< int > | markerIDListSigned_Type |
Constructors & Destructors | |
GhostHandler (commPtr_Type const &comm) | |
Constructor. More... | |
GhostHandler (meshPtr_Type fullMesh, commPtr_Type const &comm) | |
Constructor. More... | |
GhostHandler (meshPtr_Type fullMesh, meshPtr_Type localMesh, mapPtr_Type map, commPtr_Type const &comm) | |
Constructor. More... | |
~GhostHandler () | |
Destructor. More... | |
Get Methods | |
mesh_Type const & | fullMesh () |
Full mesh getter. More... | |
mesh_Type const & | localMesh () |
Local mesh getter. More... | |
map_Type const & | map () |
Standard map getter. More... | |
neighborList_Type const & | pointPointNeighborsList () |
List of point neighbors to a point (identified by the global ID) More... | |
neighborList_Type const & | pointEdgeNeighborsList () |
List of edge neighbors to a point (identified by the global ID) More... | |
neighborList_Type const & | pointElementNeighborsList () |
List of element neighbors to a point (identified by the global ID) More... | |
Set Methods | |
void | setVerbose (const bool &verbose) |
Set verbosity. More... | |
General Methods | |
void | setUpNeighbors (NeighborType const neighborType=ALL_NEIGHBORS) |
Initialize neighbors list. More... | |
void | release () |
Release pointers to full and local mesh. More... | |
void | clean (NeighborType const neighborType=ALL_NEIGHBORS) |
Clean up neighbor lists. More... | |
void | exportToHDF5 (std::string const &fileName="ghostmap", bool const &truncate=true) |
Export neighbor lists to an hdf5 file. More... | |
void | importFromHDF5 (std::string const &fileName="ghostmap") |
Import neighbor lists to an hdf5 file. More... | |
void | createPointNeighbors () |
Create point neighbors to points and store them in the NeighborMarker. More... | |
void | createPointPointNeighborsList () |
Create the list of point neighbors to points. More... | |
void | createPointPointNeighborsList (markerIDListSigned_Type const &flags) |
Create the list of point neighbors to points that are in the given list of MarkerIDs. More... | |
neighbors_Type | circleNeighbors (UInt globalID, UInt nCircles=1) |
Create neighbors to a given point, with a specified number of generations. More... | |
neighbors_Type | neighborsWithinRadius (UInt globalID, Real radius) |
Create neighbors to a given point within a specified radius. More... | |
void | createPointEdgeNeighborsList () |
Create the list of edge neighbors to the points. More... | |
void | createPointElementNeighborsList () |
Create the list of element neighbors to the points. More... | |
map_Type & | ghostMapOnPoints () |
Create an overlapped map on points. More... | |
map_Type & | ghostMapOnPoints (UInt overlap) |
Create an overlapped map on points. More... | |
map_Type & | ghostMapOnEdges (UInt overlap) |
Create an overlapped map on edges. More... | |
map_Type & | ghostMapOnElementsFV () |
Create an overlapped map on elements for Finite Volumes. More... | |
map_Type & | ghostMapOnElementsFE (UInt overlap) |
Create an overlapped map on elements for Finite Elements. More... | |
void | extendGraphFE (graphPtr_Type elemGraph, idList_Type const &pointPID, UInt overlap) |
Extend the subdomains graph of the given overlap. More... | |
void | extendGraphFE (const vertexPartitionPtr_Type &elemGraph, idList_Type const &pointPID, UInt overlap, UInt partIndex) |
Extend the subdomains graph of the given overlap. More... | |
void | showMe (bool const verbose=false, std::ostream &out=std::cout) |
showMe method More... | |
Ghost Maps | |
mapPtr_Type | M_ghostMapOnPoints |
mapPtr_Type | M_ghostMapOnEdges |
mapPtr_Type | M_ghostMapOnElementsFV |
mapPtr_Type | M_ghostMapOnElementsFE |
Protected Members | |
meshPtr_Type | M_fullMesh |
meshPtr_Type | M_localMesh |
mapPtr_Type const | M_map |
commPtr_Type const | M_comm |
UInt const | M_me |
neighborList_Type | M_pointPointNeighborsList |
neighborList_Type | M_pointEdgeNeighborsList |
neighborList_Type | M_pointElementNeighborsList |
bool | M_verbose |
This class manages neighborhood information across processes. The aim is to have the possibility to build overlapping maps in order to ease the retrieving of ghosted values. The class offers also the possibility to build phisically overlapped meshes that do not require communication to retrieve mesh information from adjacent elements.
Definition at line 75 of file GhostHandler.hpp.
Definition at line 82 of file GhostHandler.hpp.
typedef std::shared_ptr<mesh_Type> meshPtr_Type |
Definition at line 83 of file GhostHandler.hpp.
typedef Epetra_Comm comm_Type |
Definition at line 84 of file GhostHandler.hpp.
typedef std::shared_ptr<comm_Type> commPtr_Type |
Definition at line 85 of file GhostHandler.hpp.
Definition at line 86 of file GhostHandler.hpp.
typedef std::shared_ptr<map_Type> mapPtr_Type |
Definition at line 87 of file GhostHandler.hpp.
typedef std::vector<Int> idList_Type |
Definition at line 88 of file GhostHandler.hpp.
typedef std::shared_ptr<idList_Type> idListPtr_Type |
Definition at line 89 of file GhostHandler.hpp.
typedef std::vector<idList_Type> graph_Type |
Definition at line 90 of file GhostHandler.hpp.
typedef std::shared_ptr<graph_Type> graphPtr_Type |
Definition at line 91 of file GhostHandler.hpp.
typedef std::vector<idListPtr_Type> vertexPartition_Type |
Definition at line 92 of file GhostHandler.hpp.
typedef std::shared_ptr<vertexPartition_Type> vertexPartitionPtr_Type |
Definition at line 93 of file GhostHandler.hpp.
typedef std::vector<markerID_Type> markerIDList_Type |
Definition at line 94 of file GhostHandler.hpp.
typedef std::vector<int> markerIDListSigned_Type |
Definition at line 95 of file GhostHandler.hpp.
|
explicit |
Constructor.
comm. | Communicator |
Definition at line 351 of file GhostHandler.hpp.
GhostHandler | ( | meshPtr_Type | fullMesh, |
commPtr_Type const & | comm | ||
) |
Constructor.
fullMesh. | Original mesh, before partitioning |
comm. | Communicator |
Definition at line 388 of file GhostHandler.hpp.
GhostHandler | ( | meshPtr_Type | fullMesh, |
meshPtr_Type | localMesh, | ||
mapPtr_Type | map, | ||
commPtr_Type const & | comm | ||
) |
Constructor.
fullMesh. | Original mesh, before partitioning |
localMesh. | Local mesh of the current proc |
map. | Original map without overlapping |
comm. | Communicator |
Definition at line 368 of file GhostHandler.hpp.
|
inline |
Destructor.
Definition at line 127 of file GhostHandler.hpp.
|
inline |
Full mesh getter.
Definition at line 135 of file GhostHandler.hpp.
|
inline |
Local mesh getter.
Definition at line 141 of file GhostHandler.hpp.
|
inline |
Standard map getter.
Definition at line 147 of file GhostHandler.hpp.
|
inline |
List of point neighbors to a point (identified by the global ID)
Definition at line 153 of file GhostHandler.hpp.
|
inline |
List of edge neighbors to a point (identified by the global ID)
Definition at line 160 of file GhostHandler.hpp.
|
inline |
List of element neighbors to a point (identified by the global ID)
Definition at line 167 of file GhostHandler.hpp.
|
inline |
void setUpNeighbors | ( | NeighborType const | neighborType = ALL_NEIGHBORS | ) |
Initialize neighbors list.
Definition at line 404 of file GhostHandler.hpp.
void release | ( | ) |
Release pointers to full and local mesh.
Definition at line 421 of file GhostHandler.hpp.
void clean | ( | NeighborType const | neighborType = ALL_NEIGHBORS | ) |
Clean up neighbor lists.
Definition at line 428 of file GhostHandler.hpp.
void exportToHDF5 | ( | std::string const & | fileName = "ghostmap" , |
bool const & | truncate = true |
||
) |
Export neighbor lists to an hdf5 file.
fileName. | Name of the file to write |
truncate. | Must be true when the file already exists on disk |
Definition at line 525 of file GhostHandler.hpp.
void importFromHDF5 | ( | std::string const & | fileName = "ghostmap" | ) |
Import neighbor lists to an hdf5 file.
fileName. | Name of the file to write |
Definition at line 556 of file GhostHandler.hpp.
void createPointNeighbors | ( | ) |
Create point neighbors to points and store them in the NeighborMarker.
this routine generates point neighbors for the given mesh
the routine assumes that the mesh is not yet partitioned or reordered (i.e. the local id and the global id are the same). if this is not true the method should be changed to use a more expensive STL find on the mesh points to get the correct point that has the given global id or construct a globalToLocal map beforehand.
Definition at line 588 of file GhostHandler.hpp.
void createPointPointNeighborsList | ( | ) |
Create the list of point neighbors to points.
Definition at line 616 of file GhostHandler.hpp.
void createPointPointNeighborsList | ( | markerIDListSigned_Type const & | flags | ) |
Create the list of point neighbors to points that are in the given list of MarkerIDs.
flags. | The list of MarkerIDs to restrict to. |
Definition at line 664 of file GhostHandler.hpp.
neighbors_Type circleNeighbors | ( | UInt | globalID, |
UInt | nCircles = 1 |
||
) |
Create neighbors to a given point, with a specified number of generations.
globalID. | ID of the point to be examined. |
nCircles. | Number of circles (generations) to consider. |
Definition at line 696 of file GhostHandler.hpp.
neighbors_Type neighborsWithinRadius | ( | UInt | globalID, |
Real | radius | ||
) |
Create neighbors to a given point within a specified radius.
globalID. | ID of the point to be examined. |
radius. | The value of the circle radius within which neighbors are included |
Definition at line 726 of file GhostHandler.hpp.
void createPointEdgeNeighborsList | ( | ) |
Create the list of edge neighbors to the points.
Definition at line 773 of file GhostHandler.hpp.
void createPointElementNeighborsList | ( | ) |
Create the list of element neighbors to the points.
Definition at line 806 of file GhostHandler.hpp.
GhostHandler< MeshType >::map_Type & ghostMapOnPoints | ( | ) |
Create an overlapped map on points.
Create a map based on points, expanding it across suddomain interfaces with overlap 1, using NeighborMarker.
Definition at line 824 of file GhostHandler.hpp.
GhostHandler< MeshType >::map_Type & ghostMapOnPoints | ( | UInt | overlap | ) |
Create an overlapped map on points.
Create a map based on points, expanding it across suddomain interfaces with generic overlap.
overlap. | Level of overlap between subdomains |
Definition at line 880 of file GhostHandler.hpp.
GhostHandler< MeshType >::map_Type & ghostMapOnEdges | ( | UInt | overlap | ) |
Create an overlapped map on edges.
Create a map based on edges, expanding it across suddomain interfaces with generic overlap.
overlap. | Level of overlap between subdomains |
Definition at line 951 of file GhostHandler.hpp.
GhostHandler< MeshType >::map_Type & ghostMapOnElementsFV | ( | ) |
Create an overlapped map on elements for Finite Volumes.
Create a map based on elements, expanding it across suddomain interfaces. The elements added are only those that share a facet with the current subdomain. This type of map is typically used for Finite Volumes.
Definition at line 1051 of file GhostHandler.hpp.
GhostHandler< MeshType >::map_Type & ghostMapOnElementsFE | ( | UInt | overlap | ) |
Create an overlapped map on elements for Finite Elements.
Create a map based on elements, expanding it across suddomain interfaces. The elements added are all those that share a point with the current subdomain. This type of map is typically used for Finite Elements.
overlap. | Level of overlap between subdomains |
Definition at line 1104 of file GhostHandler.hpp.
void extendGraphFE | ( | graphPtr_Type | elemGraph, |
idList_Type const & | pointPID, | ||
UInt | overlap | ||
) |
Extend the subdomains graph of the given overlap.
This method enriches each subdomain with the closest elements such that the partitions have the required overlap.
elemGraph. | The list of subdomain elements |
entityPID. | Info about proc ownership of each mesh entity. |
overlap. | Level of overlap between partitions. |
Definition at line 1197 of file GhostHandler.hpp.
void extendGraphFE | ( | const vertexPartitionPtr_Type & | elemGraph, |
idList_Type const & | pointPID, | ||
UInt | overlap, | ||
UInt | partIndex | ||
) |
Extend the subdomains graph of the given overlap.
This method enriches each subdomain with the closest elements such that the partitions have the required overlap.
elemGraph. | The list of subdomain elements |
entityPID. | Info about proc ownership of each mesh entity. |
overlap. | Level of overlap between partitions. |
Definition at line 1413 of file GhostHandler.hpp.
void showMe | ( | bool const | verbose = false , |
std::ostream & | out = std::cout |
||
) |
showMe method
Definition at line 1634 of file GhostHandler.hpp.
|
protected |
Definition at line 323 of file GhostHandler.hpp.
|
protected |
Definition at line 324 of file GhostHandler.hpp.
|
protected |
Definition at line 325 of file GhostHandler.hpp.
|
protected |
Definition at line 326 of file GhostHandler.hpp.
|
protected |
Definition at line 333 of file GhostHandler.hpp.
|
protected |
Definition at line 334 of file GhostHandler.hpp.
|
protected |
Definition at line 335 of file GhostHandler.hpp.
|
protected |
Definition at line 336 of file GhostHandler.hpp.
|
protected |
Definition at line 337 of file GhostHandler.hpp.
|
protected |
Definition at line 339 of file GhostHandler.hpp.
|
protected |
Definition at line 340 of file GhostHandler.hpp.
|
protected |
Definition at line 341 of file GhostHandler.hpp.
|
protected |
Definition at line 343 of file GhostHandler.hpp.