ug4
Lib_grid_parallelization

Classes

class  ug::ComPol_CopyAttachment< TLayout, TAttachment >
 copies values from a specified attachment to a stream and back. More...
 
class  ug::ComPol_GatherVecAttachment< TLayout, TAttachment >
 Gathers the values stored in vector-attachments. More...
 
class  ug::DistributedGridManager
 manages the layouts and interfaces which are associated with a distributed grid. More...
 

Typedefs

typedef Attachment< GeomObjIDug::AGeomObjID
 An attachment which can store GeomObjIDs. More...
 
typedef std::pair< int, size_t > ug::GeomObjID
 The global id can be used to uniquely identify distributed objects. More...
 

Enumerations

enum  ug::ElementStatusTypes {
  ug::ES_NONE = INT_NONE , ug::ES_H_MASTER = INT_H_MASTER , ug::ES_H_SLAVE = INT_H_SLAVE , ug::ES_V_MASTER = INT_V_MASTER ,
  ug::ES_V_SLAVE = INT_V_SLAVE , ug::ES_SCHEDULED_FOR_INTERFACE = 1 << 6 , ug::ES_IN_INTERFACE = 1 << 7
}
 the states with which elements are marked in ug::DistributedGridManager More...
 

Functions

template<class TGeomObj >
void ug::CreateAndDistributeGlobalIDs (Grid &g, GridLayoutMap &glm, AGeomObjID &aID=aGeomObjID)
 Creates and distributes global ids for the given element type. More...
 
int ug::GetAssociatedInterfaceType (int interfaceType)
 Returns the type of associated interfaces. More...
 
template<>
size_t ug::hash_key< GeomObjID > (const GeomObjID &key)
 generates a hash key for a GeomObjID. More...
 
GeomObjID ug::MakeGeomObjID (int procRank, size_t localGeomObjID)
 Can be used to construct a GeomObjID from a proc-rank and a local id. More...
 
UG_API bool ug::operator< (const GeomObjID &gid1, const GeomObjID &gid2)
 
UG_API std::ostream & ug::operator<< (std::ostream &out, const GeomObjID &goId)
 
bool ug::TestGridLayoutMap (MultiGrid &mg, GridLayoutMap &glm, bool verbose=true)
 Checks whether the grid-layout-map on this proc is consistent with connected ones. More...
 

Variables

AGeomObjID ug::aGeomObjID
 This attachment instance should be used to store global ids. More...
 

Detailed Description

Typedef Documentation

◆ AGeomObjID

An attachment which can store GeomObjIDs.

◆ GeomObjID

typedef std::pair<int, size_t> ug::GeomObjID

The global id can be used to uniquely identify distributed objects.

Note that normally no global IDs are associated with geometric objects. However, methods exist, which can assign global ids based on the current layouts.

Enumeration Type Documentation

◆ ElementStatusTypes

the states with which elements are marked in ug::DistributedGridManager

Note that the constants are directly related to the constants enumerated in InterfaceNodeTypes. Please also note that the constants are currently stored in bytes. No value using more than 8 bits is thus allowed.

Enumerator
ES_NONE 
ES_H_MASTER 
ES_H_SLAVE 
ES_V_MASTER 
ES_V_SLAVE 
ES_SCHEDULED_FOR_INTERFACE 
ES_IN_INTERFACE 

Function Documentation

◆ CreateAndDistributeGlobalIDs()

template<class TGeomObj >
void ug::CreateAndDistributeGlobalIDs ( Grid g,
GridLayoutMap glm,
AGeomObjID aID = aGeomObjID 
)

◆ GetAssociatedInterfaceType()

int ug::GetAssociatedInterfaceType ( int  interfaceType)

Returns the type of associated interfaces.

Parameters
interfaceTypea constant enumerated in ug::InterfaceNodeTypes.
Returns
the associated interface type or INT_NONE, if no associated type is known.

References ug::INT_H_MASTER, ug::INT_H_SLAVE, ug::INT_NONE, ug::INT_V_MASTER, and ug::INT_V_SLAVE.

◆ hash_key< GeomObjID >()

template<>
size_t ug::hash_key< GeomObjID > ( const GeomObjID key)

generates a hash key for a GeomObjID.

Todo:
Check distribution quality.

◆ MakeGeomObjID()

GeomObjID ug::MakeGeomObjID ( int  procRank,
size_t  localGeomObjID 
)
inline

Can be used to construct a GeomObjID from a proc-rank and a local id.

Referenced by ug::CreateAndDistributeGlobalIDs().

◆ operator<()

bool ug::operator< ( const GeomObjID gid1,
const GeomObjID gid2 
)

◆ operator<<()

std::ostream & ug::operator<< ( std::ostream &  out,
const GeomObjID goId 
)

◆ TestGridLayoutMap()

bool ug::TestGridLayoutMap ( MultiGrid mg,
GridLayoutMap glm,
bool  verbose 
)

Checks whether the grid-layout-map on this proc is consistent with connected ones.

References ug::aPosition, ug::aPosition1, ug::aPosition2, ug::Grid::has_vertex_attachment(), UG_LOG, and verbose.

Variable Documentation

◆ aGeomObjID

AGeomObjID ug::aGeomObjID("globalID", false)

This attachment instance should be used to store global ids.

Referenced by ug::DistributeGrid().