本文整理汇总了C++中EngngModel::giveNumberOfProcesses方法的典型用法代码示例。如果您正苦于以下问题:C++ EngngModel::giveNumberOfProcesses方法的具体用法?C++ EngngModel::giveNumberOfProcesses怎么用?C++ EngngModel::giveNumberOfProcesses使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EngngModel
的用法示例。
在下文中一共展示了EngngModel::giveNumberOfProcesses方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initCommMaps
void
NodalAveragingRecoveryModel :: initCommMaps()
{
if ( initCommMap ) {
EngngModel *emodel = domain->giveEngngModel();
commBuff = new CommunicatorBuff(emodel->giveNumberOfProcesses(), CBT_dynamic);
communicator = new NodeCommunicator(emodel, commBuff, emodel->giveRank(),
emodel->giveNumberOfProcesses());
communicator->setUpCommunicationMaps(domain->giveEngngModel(), true, true);
OOFEM_LOG_INFO("NodalAveragingRecoveryModel :: initCommMaps: initialized comm maps\n");
initCommMap = false;
}
}
示例2: initCommMaps
void
SPRNodalRecoveryModel :: initCommMaps()
{
#ifdef __PARALLEL_MODE
if ( initCommMap ) {
EngngModel *emodel = domain->giveEngngModel();
commBuff = new CommunicatorBuff(emodel->giveNumberOfProcesses(), CBT_dynamic);
communicator = new NodeCommunicator(emodel, commBuff, emodel->giveRank(),
emodel->giveNumberOfProcesses());
communicator->setUpCommunicationMaps(domain->giveEngngModel(), true, true);
OOFEM_LOG_INFO("SPRNodalRecoveryModel :: initCommMaps: initialized comm maps");
initCommMap = false;
}
#endif
}
示例3: cb
/*
* prepares the communication maps for remote elements
* should be called immediately after load balancing,
* before any work transfer.
*
*/
void
NonlocalMaterialWTP :: init(Domain *domain)
{
int ie, gie, nelem = domain->giveNumberOfElements();
EngngModel *emodel = domain->giveEngngModel();
Element *elem;
int nproc = emodel->giveNumberOfProcesses();
int myrank = emodel->giveRank();
CommunicatorBuff cb(nproc, CBT_dynamic);
Communicator com(emodel, &cb, myrank, nproc, CommMode_Dynamic);
this->nonlocElementDependencyMap.clear();
// build nonlocal element dependency array for each element
for ( ie = 1; ie <= nelem; ie++ ) {
elem = domain->giveElement(ie);
if ( ( elem->giveParallelMode() == Element_local ) ) {
gie = elem->giveGlobalNumber();
this->giveElementNonlocalDepArry(nonlocElementDependencyMap [ gie ], domain, ie);
}
}
/* send and receive nonlocElementDependencyArry of migrating elements to remote partition */
com.packAllData(this, domain, & NonlocalMaterialWTP :: packMigratingElementDependencies);
com.initExchange(MIGRATE_NONLOCALDEP_TAG);
com.unpackAllData(this, domain, & NonlocalMaterialWTP :: unpackMigratingElementDependencies);
com.finishExchange();
}
示例4: initCommMaps
void
NodalAveragingRecoveryModel :: initCommMaps()
{
#ifdef __PARALLEL_MODE
if ( initCommMap ) {
EngngModel *emodel = domain->giveEngngModel();
ProblemCommunicatorMode commMode = emodel->giveProblemCommMode();
if ( commMode == ProblemCommMode__NODE_CUT ) {
commBuff = new CommunicatorBuff(emodel->giveNumberOfProcesses(), CBT_dynamic);
communicator = new ProblemCommunicator(emodel, commBuff, emodel->giveRank(),
emodel->giveNumberOfProcesses(),
commMode);
communicator->setUpCommunicationMaps(domain->giveEngngModel(), true, true);
OOFEM_LOG_INFO("NodalAveragingRecoveryModel :: initCommMaps: initialized comm maps\n");
initCommMap = false;
} else {
OOFEM_ERROR("NodalAveragingRecoveryModel :: initCommMaps: unsupported comm mode");
}
}
#endif
}