OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
ParMetis load balancer. More...
#include <parmetisloadbalancer.h>
Public Member Functions | |
ParmetisLoadBalancer (Domain *d) | |
virtual | ~ParmetisLoadBalancer () |
virtual void | calculateLoadTransfer () |
virtual DofManMode | giveDofManState (int idofman) |
Returns the label of dofmanager after load balancing. More... | |
virtual IntArray * | giveDofManPartitions (int idofman) |
Returns the partition list of given dofmanager after load balancing. More... | |
virtual int | giveElementPartition (int ielem) |
Returns the new partition number assigned to local element after LB. More... | |
Public Member Functions inherited from oofem::LoadBalancer | |
LoadBalancer (Domain *d) | |
virtual | ~LoadBalancer () |
virtual void | printStatistics () const |
Print receiver statistics. More... | |
virtual IRResultType | initializeFrom (InputRecord *ir) |
Initializes receiver according to object description stored in input record. More... | |
Domain * | giveDomain () |
Returns reference to its domain. More... | |
virtual void | setDomain (Domain *d) |
sets associated Domain More... | |
void | migrateLoad (Domain *d) |
Protected Member Functions | |
void | handleMasterSlaveDofManLinks () |
void | initGlobalParmetisElementNumbering () |
int | giveLocalElementNumber (int globnum) |
int | giveGlobalElementNumber (int locnum) |
void | labelDofManagers () |
Label local partition nodes (the nodes that are local or shared). More... | |
int | determineDofManState (int idofman, int myrank, int npart, IntArray *dofManPartitions) |
int | packSharedDmanPartitions (ProcessCommunicator &pc) |
int | unpackSharedDmanPartitions (ProcessCommunicator &pc) |
void | addSharedDofmanPartitions (int _locnum, IntArray _partitions) |
virtual const char * | giveClassName () const |
Returns class name of the receiver. More... | |
Protected Member Functions inherited from oofem::LoadBalancer | |
int | packMigratingData (Domain *, ProcessCommunicator &pc) |
int | unpackMigratingData (Domain *, ProcessCommunicator &pc) |
void | deleteRemoteDofManagers (Domain *) |
void | deleteRemoteElements (Domain *) |
void | initializeWtp (IntArray &wtp) |
Protected Attributes | |
IntArray | gToLMap |
Element numbering maps. More... | |
IntArray | lToGMap |
idx_t * | elmdist |
int | myGlobNumOffset |
real_t * | tpwgts |
Partition weights (user input). More... | |
IntArray | dofManState |
Array of DofManMode(s). More... | |
std::vector< IntArray > | dofManPartitions |
Array of dof man partitions. More... | |
IntArray | elementPart |
Partition vector of the locally-stored elements. More... | |
Protected Attributes inherited from oofem::LoadBalancer | |
Domain * | domain |
std::vector< std::unique_ptr< WorkTransferPlugin > > | wtpList |
List of work transfer plugins. More... | |
Additional Inherited Members | |
Public Types inherited from oofem::LoadBalancer | |
enum | DofManMode { DM_NULL, DM_Local, DM_Shared, DM_Remote } |
Describes the state of dofmanager after load balancing on the local partition. More... | |
ParMetis load balancer.
Definition at line 57 of file parmetisloadbalancer.h.
oofem::ParmetisLoadBalancer::ParmetisLoadBalancer | ( | Domain * | d | ) |
Definition at line 55 of file parmetisloadbalancer.C.
|
virtual |
Definition at line 61 of file parmetisloadbalancer.C.
|
protected |
Definition at line 558 of file parmetisloadbalancer.C.
References dofManPartitions.
Referenced by unpackSharedDmanPartitions().
|
virtual |
Implements oofem::LoadBalancer.
Definition at line 74 of file parmetisloadbalancer.C.
References oofem::IntArray::at(), oofem::LoadBalancer::domain, oofem::Element_local, elementPart, elmdist, oofem::Element::giveDofManager(), oofem::Domain::giveElement(), oofem::Domain::giveEngngModel(), oofem::DofManager::giveGlobalNumber(), oofem::EngngModel::giveLoadBalancerMonitor(), oofem::Element::giveNumberOfDofManagers(), oofem::Domain::giveNumberOfElements(), oofem::EngngModel::giveNumberOfProcesses(), oofem::Element::giveParallelMode(), oofem::LoadBalancerMonitor::giveProcessorWeights(), oofem::EngngModel::giveRank(), initGlobalParmetisElementNumbering(), labelDofManagers(), OOFEM_ERROR, oofem::Element::predictRelativeComputationalCost(), oofem::IntArray::resize(), and tpwgts.
|
protected |
Definition at line 410 of file parmetisloadbalancer.C.
References oofem::IntArray::at(), oofem::LoadBalancer::DM_Local, oofem::LoadBalancer::DM_NULL, oofem::LoadBalancer::DM_Remote, oofem::LoadBalancer::DM_Shared, oofem::DofManager_local, oofem::DofManager_shared, oofem::LoadBalancer::domain, oofem::Domain::giveDofManager(), and oofem::DofManager::giveParallelMode().
Referenced by labelDofManagers().
|
inlineprotectedvirtual |
Returns class name of the receiver.
Implements oofem::LoadBalancer.
Definition at line 105 of file parmetisloadbalancer.h.
|
virtual |
Returns the partition list of given dofmanager after load balancing.
Implements oofem::LoadBalancer.
Definition at line 475 of file parmetisloadbalancer.C.
References dofManPartitions.
Referenced by packSharedDmanPartitions().
|
virtual |
Returns the label of dofmanager after load balancing.
Implements oofem::LoadBalancer.
Definition at line 468 of file parmetisloadbalancer.C.
References oofem::IntArray::at(), and dofManState.
|
virtual |
Returns the new partition number assigned to local element after LB.
Implements oofem::LoadBalancer.
Definition at line 481 of file parmetisloadbalancer.C.
References oofem::IntArray::at(), and elementPart.
Referenced by labelDofManagers().
|
inlineprotected |
Definition at line 89 of file parmetisloadbalancer.h.
References oofem::IntArray::at().
|
inlineprotected |
Definition at line 88 of file parmetisloadbalancer.h.
References oofem::IntArray::at().
|
protected |
Definition at line 565 of file parmetisloadbalancer.C.
References oofem::IntArray::at(), dofManPartitions, oofem::LoadBalancer::domain, oofem::Domain::giveDofManager(), oofem::DofManager::giveMasterDofMans(), oofem::Domain::giveNumberOfDofManagers(), oofem::IntArray::giveSize(), and oofem::DofManager::hasAnySlaveDofs().
Referenced by labelDofManagers().
|
protected |
Definition at line 248 of file parmetisloadbalancer.C.
References oofem::IntArray::at(), oofem::LoadBalancer::domain, oofem::Element_local, elmdist, oofem::Domain::giveElement(), oofem::Domain::giveEngngModel(), oofem::Domain::giveNumberOfElements(), oofem::EngngModel::giveNumberOfProcesses(), oofem::Element::giveParallelMode(), oofem::IntArray::givePointer(), oofem::EngngModel::giveRank(), gToLMap, lToGMap, myGlobNumOffset, OOFEM_ERROR, and oofem::IntArray::resize().
Referenced by calculateLoadTransfer().
|
protected |
Label local partition nodes (the nodes that are local or shared).
Labeling consist of assigning corresponding id that characterize the status of local dof manager after balancing the load. Labeling determines which of local nodes remain local, or became local on other partition, or became shared, etc.
Definition at line 306 of file parmetisloadbalancer.C.
References oofem::IntArray::at(), oofem::CBT_dynamic, oofem::IntArray::clear(), oofem::CommMode_Dynamic, determineDofManState(), oofem::LoadBalancer::DM_Local, oofem::LoadBalancer::DM_NULL, oofem::LoadBalancer::DM_Remote, oofem::LoadBalancer::DM_Shared, oofem::DofManager_local, oofem::DofManager_shared, dofManPartitions, dofManState, oofem::LoadBalancer::domain, oofem::Element_local, oofem::Domain::giveConnectivityTable(), oofem::Domain::giveDofManager(), oofem::ConnectivityTable::giveDofManConnectivityArray(), oofem::Domain::giveElement(), giveElementPartition(), oofem::Domain::giveEngngModel(), oofem::Domain::giveNumberOfDofManagers(), oofem::EngngModel::giveNumberOfProcesses(), oofem::DofManager::giveParallelMode(), oofem::Element::giveParallelMode(), oofem::EngngModel::giveRank(), oofem::IntArray::giveSize(), handleMasterSlaveDofManLinks(), oofem::Communicator::packAllData(), packSharedDmanPartitions(), oofem::IntArray::resize(), SHARED_DOFMAN_PARTITIONS_TAG, unpackSharedDmanPartitions(), and oofem::IntArray::zero().
Referenced by calculateLoadTransfer().
|
protected |
Definition at line 487 of file parmetisloadbalancer.C.
References oofem::DofManager_shared, oofem::LoadBalancer::domain, oofem::IntArray::findFirstIndexOf(), oofem::Domain::giveDofManager(), giveDofManPartitions(), oofem::Domain::giveEngngModel(), oofem::DofManager::giveGlobalNumber(), oofem::Domain::giveNumberOfDofManagers(), oofem::DofManager::giveParallelMode(), oofem::DofManager::givePartitionList(), oofem::ProcessCommunicator::giveProcessCommunicatorBuff(), oofem::ProcessCommunicator::giveRank(), oofem::EngngModel::giveRank(), PARMETISLB_END_DATA, oofem::IntArray::storeYourself(), and oofem::ProcessCommunicatorBuff::write().
Referenced by labelDofManagers().
|
protected |
Definition at line 519 of file parmetisloadbalancer.C.
References addSharedDofmanPartitions(), oofem::Domain::dofmanGlobal2Local(), oofem::LoadBalancer::domain, oofem::Domain::giveEngngModel(), oofem::ProcessCommunicator::giveProcessCommunicatorBuff(), oofem::ProcessCommunicator::giveRank(), oofem::EngngModel::giveRank(), oofem::Domain::initGlobalDofManMap(), OOFEM_ERROR, PARMETISLB_END_DATA, oofem::ProcessCommunicatorBuff::read(), and oofem::IntArray::restoreYourself().
Referenced by labelDofManagers().
|
protected |
Array of dof man partitions.
Definition at line 69 of file parmetisloadbalancer.h.
Referenced by addSharedDofmanPartitions(), giveDofManPartitions(), handleMasterSlaveDofManLinks(), and labelDofManagers().
|
protected |
Array of DofManMode(s).
Definition at line 67 of file parmetisloadbalancer.h.
Referenced by giveDofManState(), and labelDofManagers().
|
protected |
Partition vector of the locally-stored elements.
Definition at line 71 of file parmetisloadbalancer.h.
Referenced by calculateLoadTransfer(), and giveElementPartition().
|
protected |
Definition at line 62 of file parmetisloadbalancer.h.
Referenced by calculateLoadTransfer(), initGlobalParmetisElementNumbering(), ParmetisLoadBalancer(), and ~ParmetisLoadBalancer().
|
protected |
Element numbering maps.
Definition at line 61 of file parmetisloadbalancer.h.
Referenced by initGlobalParmetisElementNumbering().
|
protected |
Definition at line 61 of file parmetisloadbalancer.h.
Referenced by initGlobalParmetisElementNumbering().
|
protected |
Definition at line 63 of file parmetisloadbalancer.h.
Referenced by initGlobalParmetisElementNumbering().
|
protected |
Partition weights (user input).
Definition at line 65 of file parmetisloadbalancer.h.
Referenced by calculateLoadTransfer(), ParmetisLoadBalancer(), and ~ParmetisLoadBalancer().