本文整理汇总了C++中FEM_ObjectBroker类的典型用法代码示例。如果您正苦于以下问题:C++ FEM_ObjectBroker类的具体用法?C++ FEM_ObjectBroker怎么用?C++ FEM_ObjectBroker使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FEM_ObjectBroker类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: data
int
ElasticBeam3d::recvSelf(int cTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
{
int res = 0;
static Vector data(17);
res += theChannel.recvVector(this->getDbTag(), cTag, data);
if (res < 0) {
opserr << "ElasticBeam3d::recvSelf -- could not receive data Vector\n";
return res;
}
A = data(0);
E = data(1);
G = data(2);
Jx = data(3);
Iy = data(4);
Iz = data(5);
rho = data(6);
cMass = (int)data(7);
this->setTag((int)data(8));
connectedExternalNodes(0) = (int)data(9);
connectedExternalNodes(1) = (int)data(10);
alphaM = data(13);
betaK = data(14);
betaK0 = data(15);
betaKc = data(16);
// Check if the CoordTransf is null; if so, get a new one
int crdTag = (int)data(11);
if (theCoordTransf == 0) {
theCoordTransf = theBroker.getNewCrdTransf(crdTag);
if (theCoordTransf == 0) {
opserr << "ElasticBeam3d::recvSelf -- could not get a CrdTransf3d\n";
exit(-1);
}
}
// Check that the CoordTransf is of the right type; if not, delete
// the current one and get a new one of the right type
if (theCoordTransf->getClassTag() != crdTag) {
delete theCoordTransf;
theCoordTransf = theBroker.getNewCrdTransf(crdTag);
if (theCoordTransf == 0) {
opserr << "ElasticBeam3d::recvSelf -- could not get a CrdTransf3d\n";
exit(-1);
}
}
// Now, receive the CoordTransf
theCoordTransf->setDbTag((int)data(12));
res += theCoordTransf->recvSelf(cTag, theChannel, theBroker);
if (res < 0) {
opserr << "ElasticBeam3d::recvSelf -- could not receive CoordTransf\n";
return res;
}
return res;
}
示例2: data
int
NewtonLineSearch::recvSelf(int cTag,
Channel &theChannel,
FEM_ObjectBroker &theBroker)
{
static ID data(1);
if (theChannel.recvID(0, cTag, data) < 0) {
opserr << "NewtonLineSearch::recvSelf(int cTag, Channel &theChannel) - failed to recv data\n";
return -1;
}
int lineSearchClassTag = data(0);
if (theLineSearch == 0 || theLineSearch->getClassTag() != lineSearchClassTag) {
if (theLineSearch != 0)
delete theLineSearch;
theLineSearch = theBroker.getLineSearch(lineSearchClassTag);
if (theLineSearch == 0) {
opserr << "NewtonLineSearch::recvSelf(int cTag, Channel &theChannel) - failed to obtain a LineSerach object\n";
return -1;
}
}
if (theLineSearch->recvSelf(cTag, theChannel, theBroker) < 0) {
opserr << "NewtonLineSearch::recvSelf(int cTag, Channel &theChannel) - failed to recv the LineSerach object\n";
return -1;
}
return 0;
}
示例3: data
int
CorotTruss::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
{
int res;
int dataTag = this->getDbTag();
// truss creates a Vector, receives the Vector and then sets the
// internal data with the data in the Vector
static Vector data(7);
res = theChannel.recvVector(dataTag, commitTag, data);
if (res < 0) {
opserr << "WARNING Truss::recvSelf() - failed to receive Vector\n";
return -1;
}
this->setTag((int)data(0));
numDIM = (int)data(1);
numDOF = (int)data(2);
A = data(3);
rho = data(6);
// truss now receives the tags of it's two external nodes
res = theChannel.recvID(dataTag, commitTag, connectedExternalNodes);
if (res < 0) {
opserr << "WARNING Truss::recvSelf() - " << this->getTag() << " failed to receive ID\n";
return -2;
}
// finally truss creates a material object of the correct type,
// sets its database tag and asks this new object to recveive itself.
int matClass = (int)data(4);
int matDb = (int)data(5);
// check if we have a material object already & if we do if of right type
if ((theMaterial == 0) || (theMaterial->getClassTag() != matClass)) {
// if old one .. delete it
if (theMaterial != 0)
delete theMaterial;
// create a new material object
theMaterial = theBroker.getNewUniaxialMaterial(matClass);
if (theMaterial == 0) {
opserr << "WARNING Truss::recvSelf() - " << this->getTag() <<
"failed to get a blank Material of type: " << matClass << endln;
return -3;
}
}
theMaterial->setDbTag(matDb); // note: we set the dbTag before we receive the material
res = theMaterial->recvSelf(commitTag, theChannel, theBroker);
if (res < 0) {
opserr << "WARNING Truss::recvSelf() - " << this->getTag() << " failed to receive its Material\n";
return -3;
}
return 0;
}
示例4: data
int
PeriodicNewton::recvSelf(int cTag,
Channel &theChannel,
FEM_ObjectBroker &theBroker)
{
static ID data(3);
int result;
int dataTag = this->getDbTag();
result = theChannel.recvID(dataTag, cTag, data);
if (result != 0) {
opserr << "PeriodicNewton::recvSelf() - failed to receive ID\n";
return result;
}
int ctType = data(0);
int ctDb = data(1);
maxCount = data(2);
theTest = theBroker.getNewConvergenceTest(ctType);
theTest->setDbTag(ctDb);
result = theTest->recvSelf(cTag, theChannel, theBroker);
if (result != 0) {
opserr << "PeriodicNewton::recvSelf() - failed to recv CTest object\n";
return result;
}
return 0;
}
示例5: data
int
BeamContact2Dp::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
{
int res = 0;
int dataTag = this->getDbTag();
// BeamContact2Dp creates a vector, receives the vector, and then sets the internal
// data with the data in the vector
static Vector data(6);
res = theChannel.recvVector(dataTag, commitTag, data);
if (res < 0) {
opserr << "WARNING BeamContact2Dp::recvSelf() - failed to receive Vector\n";
return -1;
}
this->setTag((int)data(0));
mRadius = data(1);
mPenalty = data(2);
mIniContact = (int)data(3);
// BeamContact2Dp now receives the tags of its four external nodes
res = theChannel.recvID(dataTag, commitTag, mExternalNodes);
if (res < 0) {
opserr << "WARNING BeamContact2Dp::recvSelf() - " << this->getTag() << " failed to receive ID\n";
return -2;
}
// finally, BeamContact2Dp creates a material object of the correct type, sets its
// database tag, and asks this new object to receive itself
int matClass = (int)data(4);
int matDb = (int)data(5);
// check if material object exists and that it is the right type
if ((theMaterial == 0) || (theMaterial->getClassTag() != matClass)) {
// if old one, delete it
if (theMaterial != 0)
delete theMaterial;
// create new material object
NDMaterial *theMatCopy = theBroker.getNewNDMaterial(matClass);
theMaterial = (ContactMaterial2D *)theMatCopy;
if (theMaterial == 0) {
opserr << "WARNING BeamContact2Dp::recvSelf() - " << this->getTag()
<< " failed to get a blank Material of type " << matClass << endln;
return -3;
}
}
// NOTE: we set the dbTag before we receive the material
theMaterial->setDbTag(matDb);
res = theMaterial->recvSelf(commitTag, theChannel, theBroker);
if (res < 0) {
opserr << "WARNING BeamContact2Dp::recvSelf() - " << this->getTag() << " failed to receive its Material\n";
return -3;
}
return 0;
}
示例6: classTags
int
PathIndependentMaterial::recvSelf(int cTag, Channel &theChannel,
FEM_ObjectBroker &theBroker)
{
int res = 0;
static ID classTags(3);
int dbTag = this->getDbTag();
res = theChannel.recvID(dbTag, cTag, classTags);
if (res < 0) {
opserr << "PathIndependentMaterial::recvSelf -- could not receive ID\n";
return res;
}
this->setTag(int(classTags(2)));
// Check if the material is null; if so, get a new one
if (theMaterial == 0) {
theMaterial = theBroker.getNewUniaxialMaterial(classTags(0));
if (theMaterial == 0) {
opserr << " PathIndependentMaterial::recvSelf -- could not get a UniaxialMaterial\n";
return -1;
}
}
// Check that the material is of the right type; if not, delete
// the current one and get a new one of the right type
if (theMaterial->getClassTag() != classTags(0)) {
delete theMaterial;
theMaterial = theBroker.getNewUniaxialMaterial(classTags(0));
if (theMaterial == 0) {
opserr << "PathIndependentMaterial::recvSelf -- could not get a UniaxialMaterial\n";
exit(-1);
}
}
// Now, receive the material
theMaterial->setDbTag(classTags(1));
res += theMaterial->recvSelf(cTag, theChannel, theBroker);
if (res < 0) {
opserr << "PathIndependentMaterial::recvSelf -- could not receive UniaxialMaterial\n";
return res;
}
return res;
}
示例7: data
int ElastomericBearing2d::recvSelf(int commitTag, Channel &rChannel,
FEM_ObjectBroker &theBroker)
{
// delete material memory
for (int i=0; i<2; i++)
if (theMaterials[i] != 0)
delete theMaterials[i];
// receive element parameters
static Vector data(9);
rChannel.recvVector(0, commitTag, data);
this->setTag((int)data(0));
k0 = data(1);
qYield = data(2);
k2 = data(3);
shearDistI = data(4);
addRayleigh = (int)data(5);
mass = data(6);
double ke = k0 + k2;
// receive the two end nodes
rChannel.recvID(0, commitTag, connectedExternalNodes);
// receive the material class tags
ID matClassTags(2);
rChannel.recvID(0, commitTag, matClassTags);
// receive the material models
for (int i=0; i<2; i++) {
theMaterials[i] = theBroker.getNewUniaxialMaterial(matClassTags(i));
if (theMaterials[i] == 0) {
opserr << "ElastomericBearing2d::recvSelf() - "
<< "failed to get blank uniaxial material.\n";
return -2;
}
theMaterials[i]->recvSelf(commitTag, rChannel, theBroker);
}
// receive remaining data
if ((int)data(7) == 3) {
x.resize(3);
rChannel.recvVector(0, commitTag, x);
}
if ((int)data(8) == 3) {
y.resize(3);
rChannel.recvVector(0, commitTag, y);
}
// initialize initial stiffness matrix
kbInit.Zero();
kbInit(0,0) = theMaterials[0]->getInitialTangent();
kbInit(1,1) = ke;
kbInit(2,2) = theMaterials[1]->getInitialTangent();
// initialize other variables
this->revertToStart();
return 0;
}
示例8: idData
int
CoupledZeroLength::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
{
int res = 0;
int dataTag = this->getDbTag();
// CoupledZeroLength creates an ID, receives the ID and then sets the
// internal data with the data in the ID
static ID idData(10);
res += theChannel.recvID(dataTag, commitTag, idData);
if (res < 0) {
opserr << "CoupledZeroLength::recvSelf -- failed to receive ID data\n";
return res;
}
res += theChannel.recvMatrix(dataTag, commitTag, transformation);
if (res < 0) {
opserr << "CoupledZeroLength::recvSelf -- failed to receive transformation Matrix\n";
return res;
}
this->setTag(idData(0));
dimension = idData(1);
numDOF = idData(2);
connectedExternalNodes(0) = idData(3);
connectedExternalNodes(1) = idData(4);
useRayleighDamping = idData(5);
dirn1 = idData(6);
dirn1 = idData(7);
int matDbTag = idData(8);
int matClassTag = idData(9);
// If null, get a new one from the broker
if (theMaterial == 0 || theMaterial->getClassTag() != matClassTag) {
if (theMaterial != 0)
delete theMaterial;
theMaterial = theBroker.getNewUniaxialMaterial(matClassTag);
if (theMaterial == 0) {
opserr << "CoupledZeroLength::recvSelf -- failed to allocate new Material " << endln;
return -1;
}
}
// Receive the materials
theMaterial->setDbTag(matDbTag);
res = theMaterial->recvSelf(commitTag, theChannel, theBroker);
if (res < 0) {
opserr << "CoupledZeroLength::recvSelf -- failed to receive new Material1d " << endln;
}
return res;
}
示例9: idData
int
BeamFiberMaterial2d::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
{
int res = 0;
// recv an id containg the tag and associated materials class and db tags
static ID idData(3);
res = theChannel.sendID(this->getDbTag(), commitTag, idData);
if (res < 0) {
opserr << "BeamFiberMaterial2d::sendSelf() - failed to send id data\n";
return res;
}
this->setTag(idData(0));
int matClassTag = idData(1);
// if the associated material has not yet been created or is of the wrong type
// create a new material for recvSelf later
if (theMaterial == 0 || theMaterial->getClassTag() != matClassTag) {
if (theMaterial != 0)
delete theMaterial;
theMaterial = theBroker.getNewNDMaterial(matClassTag);
if (theMaterial == 0) {
opserr << "BeamFiberMaterial2d::recvSelf() - failed to get a material of type: " << matClassTag << endln;
return -1;
}
}
theMaterial->setDbTag(idData(2));
// recv a vector containing strains and set the strains
static Vector vecData(4);
res = theChannel.recvVector(this->getDbTag(), commitTag, vecData);
if (res < 0) {
opserr << "BeamFiberMaterial2d::sendSelf() - failed to send vector data\n";
return res;
}
Cstrain22 = vecData(0);
Cstrain33 = vecData(1);
Cgamma31 = vecData(2);
Cgamma23 = vecData(3);
Tstrain22 = Cstrain22;
Tstrain33 = Cstrain33;
Tgamma31 = Cgamma31;
Tgamma23 = Cgamma23;
// now receive the materials data
res = theMaterial->recvSelf(commitTag, theChannel, theBroker);
if (res < 0)
opserr << "BeamFiberMaterial2d::sendSelf() - failed to send vector material\n";
return res;
}
示例10: dataID
int
MinMaxMaterial::recvSelf(int cTag, Channel &theChannel,
FEM_ObjectBroker &theBroker)
{
int dbTag = this->getDbTag();
static ID dataID(3);
if (theChannel.recvID(dbTag, cTag, dataID) < 0) {
opserr << "MinMaxMaterial::recvSelf() - failed to get the ID\n";
return -1;
}
this->setTag(int(dataID(0)));
// as no way to change material, don't have to check classTag of the material
if (theMaterial == 0) {
int matClassTag = int(dataID(1));
theMaterial = theBroker.getNewUniaxialMaterial(matClassTag);
if (theMaterial == 0) {
opserr << "MinMaxMaterial::recvSelf() - failed to create Material with classTag "
<< dataID(0) << endln;
return -2;
}
}
theMaterial->setDbTag(dataID(2));
static Vector dataVec(3);
if (theChannel.recvVector(dbTag, cTag, dataVec) < 0) {
opserr << "MinMaxMaterial::recvSelf() - failed to get the Vector\n";
return -3;
}
minStrain = dataVec(0);
maxStrain = dataVec(1);
if (dataVec(2) == 1.0)
Cfailed = true;
else
Cfailed = false;
Tfailed = Cfailed;
if (theMaterial->recvSelf(cTag, theChannel, theBroker) < 0) {
opserr << "MinMaxMaterial::recvSelf() - failed to get the Material\n";
return -4;
}
return 0;
}
示例11: idData
int
PlateRebarMaterial::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
{
int res = 0;
int dataTag = this->getDbTag();
// recv an id containg the tag and associated materials class and db tags
static ID idData(3);
res = theChannel.recvID(dataTag, commitTag, idData);
if (res < 0) {
opserr << "PlateRebarMaterial::sendSelf() - failed to receive id data" << endln;
return res;
}
this->setTag(idData(0));
int matClassTag = idData(1);
if (theMat->getClassTag() != matClassTag) {
if (theMat != 0) delete theMat;
theMat = theBroker.getNewUniaxialMaterial(matClassTag);
if (theMat == 0) {
opserr << "PlateRebarMaterial::recvSelf() - failed to get a material of type: " << matClassTag << endln;
return -1;
}
}
theMat->setDbTag(idData(2));
static Vector vecData(1);
res = theChannel.recvVector(dataTag, commitTag, vecData);
if (res < 0) {
opserr << "PlateRebarMaterial::sendSelf() - failed to receive vector data" << endln;
return res;
}
angle = vecData(0);
double rang = angle * 0.0174532925;
c = cos(rang);
s = sin(rang);
// now receive the materials data
res = theMat->recvSelf(commitTag, theChannel, theBroker);
if (res < 0)
opserr << "PlateRebarMaterial::sendSelf() - failed to receive material1" << endln;
return res;
}
示例12: data
int
UniformExcitation::recvSelf(int commitTag, Channel &theChannel,
FEM_ObjectBroker &theBroker)
{
int dbTag = this->getDbTag();
static Vector data(6);
int res = theChannel.recvVector(dbTag, commitTag, data);
if (res < 0) {
opserr << "UniformExcitation::recvSelf() - channel failed to recv data\n";
return res;
}
this->setTag(data(0));
theDof = data(1);
vel0 = data(2);
fact = data(5);
int motionClassTag = data(3);
int motionDbTag = data(4);
if (theMotion == 0 || theMotion->getClassTag() != motionClassTag) {
if (theMotion != 0)
delete theMotion;
theMotion = theBroker.getNewGroundMotion(motionClassTag);
if (theMotion == 0) {
opserr << "UniformExcitation::recvSelf() - could not create a grond motion\n";
return -3;
}
// have to set the motion in EarthquakePattern base class
if (numMotions == 0)
this->addMotion(*theMotion);
else
theMotions[0] = theMotion;
}
theMotion->setDbTag(motionDbTag);
res = theMotion->recvSelf(commitTag, theChannel, theBroker);
if (res < 0) {
opserr << "UniformExcitation::recvSelf() - motion could not receive itself \n";
return res;
}
return 0;
}
示例13: idData
int
NineNodeMixedQuad::recvSelf (int commitTag,
Channel &theChannel,
FEM_ObjectBroker &theBroker)
{
int res = 0;
int dataTag = this->getDbTag();
static ID idData(28);
// Quad now receives the tags of its four external nodes
res += theChannel.recvID(dataTag, commitTag, idData);
if (res < 0) {
opserr << "WARNING NineNodeMixedQuad::recvSelf() - " << this->getTag() << " failed to receive ID\n";
return res;
}
this->setTag(idData(18));
connectedExternalNodes(0) = idData(19);
connectedExternalNodes(1) = idData(20);
connectedExternalNodes(2) = idData(21);
connectedExternalNodes(3) = idData(22);
connectedExternalNodes(4) = idData(23);
connectedExternalNodes(5) = idData(24);
connectedExternalNodes(6) = idData(25);
connectedExternalNodes(7) = idData(26);
connectedExternalNodes(8) = idData(27);
int i;
if (materialPointers[0] == 0) {
for (i = 0; i < 9; i++) {
int matClassTag = idData(i);
int matDbTag = idData(i+9);
// Allocate new material with the sent class tag
materialPointers[i] = theBroker.getNewNDMaterial(matClassTag);
if (materialPointers[i] == 0) {
opserr << "NineNodeMixedQuad::recvSelf() - Broker could not create NDMaterial of class type" << matClassTag << endln;
return -1;
}
// Now receive materials into the newly allocated space
materialPointers[i]->setDbTag(matDbTag);
res += materialPointers[i]->recvSelf(commitTag, theChannel, theBroker);
if (res < 0) {
opserr << "NineNodeMixedQuad::recvSelf() - material " <<
i << "failed to recv itself\n";
return res;
}
}
}
// Number of materials is the same, receive materials into current space
else {
for (i = 0; i < 9; i++) {
int matClassTag = idData(i);
int matDbTag = idData(i+9);
// Check that material is of the right type; if not,
// delete it and create a new one of the right type
if (materialPointers[i]->getClassTag() != matClassTag) {
delete materialPointers[i];
materialPointers[i] = theBroker.getNewNDMaterial(matClassTag);
if (materialPointers[i] == 0) {
opserr << "NineNodeMixedQuad::recvSelf() - Broker could not create NDMaterial of class type" << matClassTag << endln;
exit(-1);
}
}
// Receive the material
materialPointers[i]->setDbTag(matDbTag);
res += materialPointers[i]->recvSelf(commitTag, theChannel, theBroker);
if (res < 0) {
opserr << "NineNodeMixedQuad::recvSelf() - material " <<
i << "failed to recv itself\n";
return res;
}
}
}
return res;
}
示例14: recvSelf
int RAReinforcedConcretePlateFiber::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
{
int res = 0;
int dataTag = this->getDbTag();
// Quad creates a Vector, receives the Vector and then sets the
// internal data with the data in the Vector
static Vector data(9);
res += theChannel.recvVector(dataTag, commitTag, data);
if (res < 0) {
opserr << "WARNING RAReinforcedConcretePlateFiber::recvSelf() - failed to receive Vector\n";
return res;
}
this->setTag((int)data(0));
rho = data(1);
angle1 = data(2);
angle2 = data(3);
rou1 = data(4);
rou2 = data(5);
fpc = data(6);
fy = data(7);
E0 = data(8);
static ID idData(8);
// now receives the tags of its materials
res += theChannel.recvID(dataTag, commitTag, idData);
if (res < 0) {
opserr << "WARNING RAReinforcedConcretePlateFiber::recvSelf() - " << this->getTag() << " failed to receive ID\n";
return res;
}
if (theMaterial == 0) {
// Allocate new materials
theMaterial = new UniaxialMaterial *[4];
if (theMaterial == 0) {
opserr << "RAReinforcedConcretePlateFiber::recvSelf() - Could not allocate UniaxialMaterial* array\n";
return -1;
}
for (int i = 0; i < 4; i++) {
int matClassTag = idData(i);
int matDbTag = idData(i+4);
// Allocate new material with the sent class tag
theMaterial[i] = theBroker.getNewUniaxialMaterial(matClassTag);
if (theMaterial[i] == 0) {
opserr << "RAReinforcedConcretePlateFiber::recvSelf() - Broker could not create NDMaterial of class type " << matClassTag << endln;
return -1;
}
// Now receive materials into the newly allocated space
theMaterial[i]->setDbTag(matDbTag);
res += theMaterial[i]->recvSelf(commitTag, theChannel, theBroker);
if (res < 0) {
opserr << "RAReinforcedConcretePlateFiber::recvSelf() - material " << i << "failed to recv itself\n";
return res;
}
}
}
// materials exist , ensure materials of correct type and recvSelf on them
else {
for (int i = 0; i < 4; i++) {
int matClassTag = idData(i);
int matDbTag = idData(i+4);
// Check that material is of the right type; if not,
// delete it and create a new one of the right type
if (theMaterial[i]->getClassTag() != matClassTag) {
delete theMaterial[i];
theMaterial[i] = theBroker.getNewUniaxialMaterial(matClassTag);
if (theMaterial[i] == 0) {
opserr << "RAReinforcedConcretePlateFiber::recvSelf() - material " << i << "failed to create\n";
return -1;
}
}
// Receive the material
theMaterial[i]->setDbTag(matDbTag);
res += theMaterial[i]->recvSelf(commitTag, theChannel, theBroker);
if (res < 0) {
opserr << "RAReinforcedConcretePlateFiber::recvSelf() - material " << i << "failed to recv itself\n";
return res;
}
}
}
return res;
}
示例15: data
int
DispBeamColumn2d::recvSelf(int commitTag, Channel &theChannel,
FEM_ObjectBroker &theBroker)
{
//
// receive the integer data containing tag, numSections and coord transformation info
//
int dbTag = this->getDbTag();
int i;
static Vector data(14);
if (theChannel.recvVector(dbTag, commitTag, data) < 0) {
opserr << "DispBeamColumn2d::recvSelf() - failed to recv data Vector\n";
return -1;
}
this->setTag((int)data(0));
connectedExternalNodes(0) = (int)data(1);
connectedExternalNodes(1) = (int)data(2);
int nSect = (int)data(3);
int crdTransfClassTag = (int)data(4);
int crdTransfDbTag = (int)data(5);
int beamIntClassTag = (int)data(6);
int beamIntDbTag = (int)data(7);
rho = data(8);
cMass = (int)data(9);
alphaM = data(10);
betaK = data(11);
betaK0 = data(12);
betaKc = data(13);
// create a new crdTransf object if one needed
if (crdTransf == 0 || crdTransf->getClassTag() != crdTransfClassTag) {
if (crdTransf != 0)
delete crdTransf;
crdTransf = theBroker.getNewCrdTransf(crdTransfClassTag);
if (crdTransf == 0) {
opserr << "DispBeamColumn2d::recvSelf() - failed to obtain a CrdTrans object with classTag " <<
crdTransfClassTag << endln;
return -2;
}
}
crdTransf->setDbTag(crdTransfDbTag);
// invoke recvSelf on the crdTransf object
if (crdTransf->recvSelf(commitTag, theChannel, theBroker) < 0) {
opserr << "DispBeamColumn2d::sendSelf() - failed to recv crdTranf\n";
return -3;
}
// create a new beamInt object if one needed
if (beamInt == 0 || beamInt->getClassTag() != beamIntClassTag) {
if (beamInt != 0)
delete beamInt;
beamInt = theBroker.getNewBeamIntegration(beamIntClassTag);
if (beamInt == 0) {
opserr << "DispBeamColumn2d::recvSelf() - failed to obtain the beam integration object with classTag" <<
beamIntClassTag << endln;
exit(-1);
}
}
beamInt->setDbTag(beamIntDbTag);
// invoke recvSelf on the beamInt object
if (beamInt->recvSelf(commitTag, theChannel, theBroker) < 0)
{
opserr << "DispBeamColumn2d::sendSelf() - failed to recv beam integration\n";
return -3;
}
//
// recv an ID for the sections containing each sections dbTag and classTag
//
ID idSections(2*nSect);
int loc = 0;
if (theChannel.recvID(dbTag, commitTag, idSections) < 0) {
opserr << "DispBeamColumn2d::recvSelf() - failed to recv ID data\n";
return -1;
}
//
// now receive the sections
//
if (numSections != nSect) {
//
// we do not have correct number of sections, must delete the old and create
//.........这里部分代码省略.........