本文整理汇总了C++中FEM_ObjectBroker::getNewElementalLoad方法的典型用法代码示例。如果您正苦于以下问题:C++ FEM_ObjectBroker::getNewElementalLoad方法的具体用法?C++ FEM_ObjectBroker::getNewElementalLoad怎么用?C++ FEM_ObjectBroker::getNewElementalLoad使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FEM_ObjectBroker
的用法示例。
在下文中一共展示了FEM_ObjectBroker::getNewElementalLoad方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lpData
//.........这里部分代码省略.........
theNode->setDbTag(dbTag);
if (theNode->recvSelf(cTag, theChannel, theBroker) < 0) {
opserr << "LoadPattern::recvSelf - NodalLoad with dbTag " << dbTag << " failed in recvSelf\n";
return -2;
}
if (this->addNodalLoad(theNode) == false) {
opserr << "LoadPattern::recvSelf - failed adding NodalLoad tagged " << theNode->getTag() << " into LP!\n";
return -3;
}
loc+=2;
}
}
//
// now we rebuild the ElementalLoads .. same as NodalLoads above .. see comments above
//
if (numEle != 0) {
ID eleData(2*numEle);
if (theChannel.recvID(dbEle, currentGeoTag, eleData) < 0) {
opserr << "LoadPattern::recvSelf - channel failed to recv the EleLoad ID\n";
return -2;
}
int loc = 0;
for (int i=0; i<numEle; i++) {
int classTag = eleData(loc);
int dbTag = eleData(loc+1);
ElementalLoad *theEle = theBroker.getNewElementalLoad(classTag);
if (theEle == 0) {
opserr << "LoadPattern::recv - cannot create ElementalLoad with classTag " << classTag << endln;
return -2;
}
theEle->setDbTag(dbTag);
if (theEle->recvSelf(cTag, theChannel, theBroker) < 0) {
opserr << "LoadPattern::recvSelf - Ele with dbTag " << dbTag << " failed in recvSelf\n";
return -2;
}
if (this->addElementalLoad(theEle) == false) {
opserr << "LoadPattern::recvSelf - could not add Ele with tag " << theEle->getTag() << " into LP!\n";
return -3;
}
loc+=2;
}
}
//
// now we rebuild the SP_Constraints .. same as nodes above .. see above if can't understand!!
//
if (numSPs != 0) {
ID spData(2*numSPs);
if (theChannel.recvID(dbSPs, currentGeoTag, spData) < 0) {
opserr << "LoadPattern::recvSelf - channel failed to recv the SP_Constraints ID\n";
return -2;
}