本文整理汇总了C++中DofManager::findDofWithDofId方法的典型用法代码示例。如果您正苦于以下问题:C++ DofManager::findDofWithDofId方法的具体用法?C++ DofManager::findDofWithDofId怎么用?C++ DofManager::findDofWithDofId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DofManager
的用法示例。
在下文中一共展示了DofManager::findDofWithDofId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mapAndUpdate
int
EIPrimaryUnknownMapper :: mapAndUpdate(FloatArray &answer, ValueModeType mode,
Domain *oldd, Domain *newd, TimeStep *tStep)
{
int inode, nd_nnodes = newd->giveNumberOfDofManagers();
int nsize = newd->giveEngngModel()->giveNumberOfDomainEquations( newd->giveNumber(), EModelDefaultEquationNumbering() );
FloatArray unknownValues;
IntArray dofidMask, locationArray;
IntArray reglist;
#ifdef OOFEM_MAPPING_CHECK_REGIONS
ConnectivityTable *conTable = newd->giveConnectivityTable();
const IntArray *nodeConnectivity;
#endif
answer.resize(nsize);
answer.zero();
for ( inode = 1; inode <= nd_nnodes; inode++ ) {
DofManager *node = newd->giveNode(inode);
/* HUHU CHEATING */
#ifdef __PARALLEL_MODE
if ( ( node->giveParallelMode() == DofManager_null ) ||
( node->giveParallelMode() == DofManager_remote ) ) {
continue;
}
#endif
#ifdef OOFEM_MAPPING_CHECK_REGIONS
// build up region list for node
nodeConnectivity = conTable->giveDofManConnectivityArray(inode);
reglist.resize( nodeConnectivity->giveSize() );
reglist.clear();
for ( int indx = 1; indx <= nodeConnectivity->giveSize(); indx++ ) {
reglist.insertSortedOnce( newd->giveElement( nodeConnectivity->at(indx) )->giveRegionNumber() );
}
#endif
///@todo Shouldn't we pass a primary field or something to this function?
if ( this->evaluateAt(unknownValues, dofidMask, mode, oldd, * node->giveCoordinates(), reglist, tStep) ) {
///@todo This doesn't respect local coordinate systems in nodes. Supporting that would require major reworking.
for ( int ii = 1; ii <= dofidMask.giveSize(); ii++ ) {
// exclude slaves; they are determined from masters
auto it = node->findDofWithDofId((DofIDItem)dofidMask.at(ii));
if ( it != node->end() ) {
Dof *dof = *it;
if ( dof->isPrimaryDof() ) {
int eq = dof->giveEquationNumber(EModelDefaultEquationNumbering());
answer.at( eq ) += unknownValues.at(ii);
}
}
}
} else {
OOFEM_ERROR("evaluateAt service failed for node %d", inode);
}
}
return 1;
}