OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Class implements Work Transfer Plugin that introduces extension to efficiently handle nonlocal dependency of nonlocal materials via remote elements. More...
#include <nonlocalmatwtp.h>
Public Member Functions | |
NonlocalMaterialWTP (LoadBalancer *_lb) | |
void | init (Domain *d) |
Initializes receiver; should be called before any work transfer. More... | |
void | migrate () |
Migrates necessary local elements to remote processors, where they become remote elements needed to efficiently handle nonlocal dependencies. More... | |
void | update () |
Called after all wtps migrated their data. More... | |
Public Member Functions inherited from oofem::LoadBalancer::WorkTransferPlugin | |
WorkTransferPlugin (LoadBalancer *_lb) | |
virtual | ~WorkTransferPlugin () |
Protected Member Functions | |
void | giveElementNonlocalDepArry (IntArray &answer, Domain *d, int num) |
int | packMigratingElementDependencies (Domain *d, ProcessCommunicator &pc) |
int | unpackMigratingElementDependencies (Domain *d, ProcessCommunicator &pc) |
int | packRemoteElements (Domain *d, ProcessCommunicator &pc) |
int | unpackRemoteElements (Domain *d, ProcessCommunicator &pc) |
void | giveNonlocalDepArryElementPlugin (GaussPoint *gp, std::set< int > &s) |
Plugin for Element::ipEvaluator service to compile nonlocal dependency array for given element (in case of nonlocal material) More... | |
void | fastRebuildNonlocalTables () |
Rebuilds nonlocal integration tables in element gauss points using information in nonlocElementDependencyMap, this should be significantly faster than rebuild the whole information from scratch. More... | |
void | fastElementIPNonlocTableUpdater (GaussPoint *gp, IntArray &map) |
Element plugin for ipEvaluator service to update nonlocal tables of its integration points from given map, containing element dependency. More... | |
Protected Attributes | |
std::map< int, IntArray > | nonlocElementDependencyMap |
std::vector< std::list< int > > | toSendList |
Protected Attributes inherited from oofem::LoadBalancer::WorkTransferPlugin | |
LoadBalancer * | lb |
Class implements Work Transfer Plugin that introduces extension to efficiently handle nonlocal dependency of nonlocal materials via remote elements.
Definition at line 63 of file nonlocalmatwtp.h.
|
inline |
Definition at line 71 of file nonlocalmatwtp.h.
|
protected |
Element plugin for ipEvaluator service to update nonlocal tables of its integration points from given map, containing element dependency.
Definition at line 513 of file nonlocalmatwtp.C.
References oofem::GaussPoint::giveElement(), oofem::FEMComponent::giveInterface(), oofem::Element::giveMaterial(), oofem::NonlocalMaterialExtensionInterfaceType, and oofem::NonlocalMaterialExtensionInterface::rebuildNonlocalPointTable().
Referenced by fastRebuildNonlocalTables().
|
protected |
Rebuilds nonlocal integration tables in element gauss points using information in nonlocElementDependencyMap, this should be significantly faster than rebuild the whole information from scratch.
Definition at line 485 of file nonlocalmatwtp.C.
References oofem::IntArray::at(), oofem::Element_local, oofem::Domain::elementGlobal2Local(), fastElementIPNonlocTableUpdater(), oofem::LoadBalancer::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveGlobalNumber(), oofem::Domain::giveNumberOfElements(), oofem::Element::giveParallelMode(), oofem::Element::ipEvaluator(), oofem::LoadBalancer::WorkTransferPlugin::lb, nonlocElementDependencyMap, and oofem::IntArray::resize().
Referenced by update().
|
protected |
Definition at line 57 of file nonlocalmatwtp.C.
References oofem::IntArray::at(), oofem::IntArray::clear(), oofem::Domain::giveElement(), oofem::FEMComponent::giveInterface(), oofem::Element::giveMaterial(), giveNonlocalDepArryElementPlugin(), oofem::Element::ipEvaluator(), oofem::NonlocalMaterialExtensionInterfaceType, and oofem::IntArray::resize().
Referenced by init().
|
protected |
Plugin for Element::ipEvaluator service to compile nonlocal dependency array for given element (in case of nonlocal material)
Definition at line 84 of file nonlocalmatwtp.C.
References oofem::NonlocalMaterialStatusExtensionInterface::giveIntegrationDomainList(), oofem::GaussPoint::giveMaterialStatus(), and oofem::NonlocalMaterialStatusExtensionInterfaceType.
Referenced by giveElementNonlocalDepArry().
|
virtual |
Initializes receiver; should be called before any work transfer.
Current implementation assembles for each local element the list of contributing global element numbers. This is extracted from IP nonlocal tables;
Implements oofem::LoadBalancer::WorkTransferPlugin.
Definition at line 109 of file nonlocalmatwtp.C.
References oofem::CBT_dynamic, oofem::CommMode_Dynamic, oofem::Element_local, oofem::Communicator::finishExchange(), oofem::Domain::giveElement(), giveElementNonlocalDepArry(), oofem::Domain::giveEngngModel(), oofem::Element::giveGlobalNumber(), oofem::Domain::giveNumberOfElements(), oofem::EngngModel::giveNumberOfProcesses(), oofem::Element::giveParallelMode(), oofem::EngngModel::giveRank(), oofem::Communicator::initExchange(), MIGRATE_NONLOCALDEP_TAG, nonlocElementDependencyMap, oofem::Communicator::packAllData(), packMigratingElementDependencies(), oofem::Communicator::unpackAllData(), and unpackMigratingElementDependencies().
|
virtual |
Migrates necessary local elements to remote processors, where they become remote elements needed to efficiently handle nonlocal dependencies.
This involves several steps:
Implements oofem::LoadBalancer::WorkTransferPlugin.
Definition at line 143 of file nonlocalmatwtp.C.
References oofem::IntArray::at(), oofem::StaticCommunicationBuffer::bcast(), oofem::CBT_dynamic, oofem::Domain::commitTransactions(), oofem::CommMode_Dynamic, oofem::Element_local, oofem::Communicator::finishExchange(), oofem::LoadBalancer::giveDomain(), oofem::Domain::giveElement(), oofem::Domain::giveEngngModel(), oofem::Element::giveGlobalNumber(), oofem::Domain::giveNumberOfElements(), oofem::EngngModel::giveNumberOfProcesses(), oofem::CommunicationBuffer::givePackSizeOfInt(), oofem::Element::giveParallelMode(), oofem::EngngModel::giveRank(), oofem::IntArray::giveSize(), oofem::Domain::giveTransactionManager(), oofem::StaticCommunicationBuffer::init(), oofem::Communicator::initExchange(), oofem::LoadBalancer::WorkTransferPlugin::lb, MIGRATE_REMOTE_ELEMENTS_TAG, nonlocElementDependencyMap, OOFEM_ERROR, oofem::Communicator::packAllData(), packRemoteElements(), oofem::StaticCommunicationBuffer::read(), oofem::StaticCommunicationBuffer::resize(), toSendList, oofem::Communicator::unpackAllData(), unpackRemoteElements(), VERBOSEPARALLEL_PRINT, and oofem::StaticCommunicationBuffer::write().
|
protected |
Definition at line 301 of file nonlocalmatwtp.C.
References oofem::Element_local, oofem::Domain::giveElement(), oofem::LoadBalancer::giveElementPartition(), oofem::Domain::giveEngngModel(), oofem::Element::giveGlobalNumber(), oofem::Domain::giveNumberOfElements(), oofem::Element::giveParallelMode(), oofem::ProcessCommunicator::giveProcessCommunicatorBuff(), oofem::ProcessCommunicator::giveRank(), oofem::EngngModel::giveRank(), oofem::LoadBalancer::WorkTransferPlugin::lb, NonlocalMaterialWTP_END_DATA, nonlocElementDependencyMap, and oofem::ProcessCommunicatorBuff::write().
Referenced by init().
|
protected |
Definition at line 361 of file nonlocalmatwtp.C.
References CM_Definition, CM_DefinitionGlobal, CM_State, CM_UnknownDictState, oofem::IntArray::contains(), oofem::DofManager_local, oofem::Domain::dofmanGlobal2Local(), oofem::Domain::giveDofManager(), oofem::Element::giveDofManager(), oofem::Domain::giveElement(), oofem::Domain::giveEngngModel(), oofem::DofManager::giveGlobalNumber(), oofem::FEMComponent::giveInputRecordName(), oofem::Element::giveNumberOfDofManagers(), oofem::DofManager::giveParallelMode(), oofem::DofManager::givePartitionList(), oofem::ProcessCommunicator::giveProcessCommunicatorBuff(), oofem::ProcessCommunicator::giveRank(), oofem::EngngModel::giveRank(), oofem::DofManager::isShared(), oofem::DofManager::saveContext(), oofem::Element::saveContext(), toSendList, and oofem::ProcessCommunicatorBuff::write().
Referenced by migrate().
|
protected |
Definition at line 335 of file nonlocalmatwtp.C.
References oofem::Domain::giveEngngModel(), oofem::ProcessCommunicator::giveProcessCommunicatorBuff(), oofem::ProcessCommunicator::giveRank(), oofem::EngngModel::giveRank(), NonlocalMaterialWTP_END_DATA, nonlocElementDependencyMap, and oofem::ProcessCommunicatorBuff::read().
Referenced by init().
|
protected |
Definition at line 418 of file nonlocalmatwtp.C.
References oofem::DomainTransactionManager::addDofManTransaction(), oofem::DomainTransactionManager::addElementTransaction(), oofem::IntArray::at(), oofem::classFactory, CM_Definition, CM_State, CM_UnknownDictState, oofem::ClassFactory::createDofManager(), oofem::ClassFactory::createElement(), oofem::DofManager_null, oofem::Domain::dofmanGlobal2Local(), oofem::DomainTransactionManager::DTT_ADD, oofem::Element_remote, oofem::Domain::giveEngngModel(), oofem::DofManager::giveGlobalNumber(), oofem::Element::giveGlobalNumber(), oofem::ProcessCommunicator::giveProcessCommunicatorBuff(), oofem::ProcessCommunicator::giveRank(), oofem::EngngModel::giveRank(), oofem::Domain::giveTransactionManager(), oofem::ProcessCommunicatorBuff::read(), oofem::IntArray::resize(), oofem::DofManager::restoreContext(), oofem::Element::restoreContext(), oofem::DofManager::setParallelMode(), oofem::Element::setParallelMode(), and oofem::Element::setPartitionList().
Referenced by migrate().
|
virtual |
Called after all wtps migrated their data.
Intended to update local data structure. Current implementations rebuilds the nonlocal integration point tables.
Implements oofem::LoadBalancer::WorkTransferPlugin.
Definition at line 288 of file nonlocalmatwtp.C.
References fastRebuildNonlocalTables(), and nonlocElementDependencyMap.
|
protected |
Definition at line 66 of file nonlocalmatwtp.h.
Referenced by fastRebuildNonlocalTables(), init(), migrate(), packMigratingElementDependencies(), unpackMigratingElementDependencies(), and update().
|
protected |
Definition at line 68 of file nonlocalmatwtp.h.
Referenced by migrate(), and packRemoteElements().