本文整理汇总了C++中FEM_ObjectBroker::getNewNodalLoad方法的典型用法代码示例。如果您正苦于以下问题:C++ FEM_ObjectBroker::getNewNodalLoad方法的具体用法?C++ FEM_ObjectBroker::getNewNodalLoad怎么用?C++ FEM_ObjectBroker::getNewNodalLoad使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FEM_ObjectBroker
的用法示例。
在下文中一共展示了FEM_ObjectBroker::getNewNodalLoad方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lpData
int
LoadPattern::recvSelf(int cTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
{
// get my current database tag
// NOTE - dbTag equals 0 if not sending to a database OR has not yet been sent
int myDbTag = this->getDbTag();
// into an ID we place all info needed to determine state of LoadPattern
int numNod, numEle, numSPs;
ID lpData(11);
if (theChannel.recvID(myDbTag, cTag, lpData) < 0) {
opserr << "LoadPattern::recvSelf - channel failed to recv the initial ID\n";
return -1;
}
isConstant = lpData(7);
this->setTag(lpData(10));
if (isConstant == 0) { // we must recv the load factor in a Vector
Vector data(2);
if (theChannel.recvVector(myDbTag, cTag, data) < 0) {
opserr << "LoadPattern::recvSelf - channel failed to recv the Vector\n";
return -2;
}
loadFactor = data(0);
scaleFactor = data(1);
}
// read data about the time series
if (lpData(8) != -1) {
if (theSeries == 0) {
theSeries = theBroker.getNewTimeSeries(lpData(8));
} else if (theSeries->getClassTag() != lpData(8)) {
delete theSeries;
theSeries = theBroker.getNewTimeSeries(lpData(8));
}
if (theSeries == 0) {
opserr << "LoadPattern::recvSelf - failed to create TimeSeries\n";
return -3;
}
theSeries->setDbTag(lpData(9));
if (theSeries->recvSelf(cTag, theChannel, theBroker) < 0) {
opserr << "LoadPattern::recvSelf - the TimeSeries failed to recv\n";
return -3;
}
}
/*
if (theChannel.isDatastore() == 1) {
static ID theLastSendTag(1);
if (theChannel.recvID(myDbTag,0,theLastSendTag) == 0)
lastGeoSendTag = theLastSendTag(0);
}
*/
if (lastChannel != theChannel.getTag() || currentGeoTag != lpData(0) || theChannel.isDatastore() == 0) {
// clear out the all the components in the current load pattern
this->clearAll();
lastChannel = theChannel.getTag();
currentGeoTag = lpData(0);
numNod = lpData(1);
numEle = lpData(2);
numSPs = lpData(3);
dbNod = lpData(4);
dbEle = lpData(5);
dbSPs = lpData(6);
//
// now we rebuild the nodal loads
//
// first get the information from the domainData about the nodes
if (numNod != 0) {
ID nodeData(2*numNod);
// now receive the ID about the nodes, class tag and dbTags
if (theChannel.recvID(dbNod, currentGeoTag, nodeData) < 0) {
opserr << "LoadPAttern::recvSelf - channel failed to recv the NodalLoad ID\n";
return -2;
}
// now for each NodalLoad we 1) get a new node of the correct type from the ObjectBroker
// 2) ensure the node exists and set it's dbTag, 3) we invoke recvSelf on this new
// blank node and 4) add this node to the domain
int loc = 0;
for (int i=0; i<numNod; i++) {
int classTag = nodeData(loc);
int dbTag = nodeData(loc+1);
NodalLoad *theNode = theBroker.getNewNodalLoad(classTag);
//.........这里部分代码省略.........