本文整理汇总了C++中FEM_ObjectBroker::getNewCrdTransf方法的典型用法代码示例。如果您正苦于以下问题:C++ FEM_ObjectBroker::getNewCrdTransf方法的具体用法?C++ FEM_ObjectBroker::getNewCrdTransf怎么用?C++ FEM_ObjectBroker::getNewCrdTransf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FEM_ObjectBroker
的用法示例。
在下文中一共展示了FEM_ObjectBroker::getNewCrdTransf方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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
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
//.........这里部分代码省略.........
示例3: idData
int
Timoshenko2d::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 ID idData(7); // one bigger than needed so no clash with section ID
if (theChannel.recvID(dbTag, commitTag, idData) < 0) {
opserr << "Timoshenko2d::recvSelf() - failed to recv ID data\n";
return -1;
}
this->setTag(idData(0));
connectedExternalNodes(0) = idData(1);
connectedExternalNodes(1) = idData(2);
int crdTransfClassTag = idData(4);
int crdTransfDbTag = idData(5);
// 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 << "Timoshenko2d::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 << "Timoshenko2d::sendSelf() - failed to recv crdTranf\n";
return -3;
}
//
// recv an ID for the sections containing each sections dbTag and classTag
//
ID idSections(2*idData(3));
int loc = 0;
if (theChannel.recvID(dbTag, commitTag, idSections) < 0) {
opserr << "Timoshenko2d::recvSelf() - failed to recv ID data\n";
return -1;
}
// now receive the sections
if (numSections != idData(3)) {
//
// we do not have correct number of sections, must delete the old and create
// new ones before can recvSelf on the sections
//
// delete the old
if (numSections != 0) {
for (i=0; i<numSections; i++)
delete theSections[i];
delete [] theSections;
}
// create a new array to hold pointers
theSections = new SectionForceDeformation *[idData(3)];
if (theSections == 0) {
opserr << "Timoshenko2d::recvSelf() - out of memory creating sections array of size " <<
idData(3) << endln;
return -1;
}
// create a section and recvSelf on it
numSections = idData(3);
loc = 0;
for (i=0; i<numSections; i++) {
int sectClassTag = idSections(loc);
int sectDbTag = idSections(loc+1);
loc += 2;
//switch (sectClassTag) {
//default:
opserr << "Timoshenko2d::recvSelf() --default secTag at sec " << i+1 << endln;
theSections[i] = new FiberSection2d();
// break;
//}
if (theSections[i] == 0) {
opserr << "Timoshenko2d::recvSelf() - Broker could not create Section of class type " <<
sectClassTag << endln;
exit(-1);
}
//.........这里部分代码省略.........
示例4: data
int
PileToe3D::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
{
int res;
int dataTag = this->getDbTag();
// PileToe3D 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 PileToe3D::recvSelf() - failed to receive Vector\n";
return -1;
}
this->setTag((int)data(0));
mRadius = data(1);
mSubgradeCoeff = data(2);
mCC = data(3);
MyTag = (int)data(0);
// PileToe3D now receives the tags of it's one external node
res = theChannel.recvID(dataTag, commitTag, externalNodes);
if (res < 0) {
opserr <<"WARNING PileToe3D::recvSelf() - " << this->getTag() << " failed to receive ID\n";
return -2;
}
// PileToe3D now receives the tags of it's two beam external nodes
res = theChannel.recvID(dataTag, commitTag, externalBNodes);
if (res < 0) {
opserr <<"WARNING PileToe3D::recvSelf() - " << this->getTag() << " failed to receive ID\n";
return -2;
}
int crdClass = (int)data(4);
int crdDb = (int)data(5);
// check if we have a material object already & if we do if of right type
if ((crdTransf == 0) || (crdTransf->getClassTag() != crdClass)) {
// if old one .. delete it
if (crdTransf != 0)
delete crdTransf;
// create a new material object
crdTransf = theBroker.getNewCrdTransf(crdClass);
if (crdTransf == 0) {
opserr <<"WARNING PileToe3D::recvSelf() - " << this->getTag()
<< " failed to get a blank CrdTransf of type " << crdClass << endln;
return -3;
}
}
crdTransf->setDbTag(crdDb); // note: we set the dbTag before we receive the material
res = crdTransf->recvSelf(commitTag, theChannel, theBroker);
if (res < 0) {
opserr <<"WARNING PileToe3D::recvSelf() - "<< this->getTag() << "failed to receive its Material\n";
return -3;
}
return 0;
}
示例5: data
int
ModElasticBeam2d::recvSelf(int cTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
{
int res = 0;
static Vector data(19);
res += theChannel.recvVector(this->getDbTag(), cTag, data);
if (res < 0) {
opserr << "ModElasticBeam2d::recvSelf -- could not receive data Vector\n";
return res;
}
A = data(0);
E = data(1);
I = data(2);
alpha = data(10);
d = data(11);
alphaM = data(12);
betaK = data(13);
betaK0 = data(14);
betaKc = data(15);
//added by Dimitrios Lignos
K11 = data(16);
K33 = data(17);
K44 = data(18);
rho = data(3);
cMass = (int)data(4);
this->setTag((int)data(5));
connectedExternalNodes(0) = (int)data(6);
connectedExternalNodes(1) = (int)data(7);
// Check if the CoordTransf is null; if so, get a new one
int crdTag = (int)data(8);
if (theCoordTransf == 0) {
theCoordTransf = theBroker.getNewCrdTransf(crdTag);
if (theCoordTransf == 0) {
opserr << "ModElasticBeam2d::recvSelf -- could not get a CrdTransf2d\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 << "ModElasticBeam2d::recvSelf -- could not get a CrdTransf2d\n";
exit(-1);
}
}
// Now, receive the CoordTransf
theCoordTransf->setDbTag((int)data(9));
res += theCoordTransf->recvSelf(cTag, theChannel, theBroker);
if (res < 0) {
opserr << "ModElasticBeam2d::recvSelf -- could not receive CoordTransf\n";
return res;
}
// Revert the crdtrasf to its last committed state
theCoordTransf->revertToLastCommit();
return res;
}
示例6: data
int ElasticTimoshenkoBeam2d::recvSelf(int commitTag, Channel &rChannel,
FEM_ObjectBroker &theBroker)
{
int res = 0;
static Vector data(16);
res += rChannel.recvVector(this->getDbTag(), commitTag, data);
if (res < 0) {
opserr << "ElasticTimoshenkoBeam2d::recvSelf() - could not receive data Vector.\n";
return res;
}
this->setTag((int)data(0));
connectedExternalNodes(0) = (int)data(1);
connectedExternalNodes(1) = (int)data(2);
E = data(3);
G = data(4);
A = data(5);
Iz = data(6);
Avy = data(7);
rho = data(8);
cMass = (int)data(9);
alphaM = data(10);
betaK = data(11);
betaK0 = data(12);
betaKc = data(13);
// check if the CoordTransf is null; if so, get a new one
int crdTag = (int)data(14);
if (theCoordTransf == 0) {
theCoordTransf = theBroker.getNewCrdTransf(crdTag);
if (theCoordTransf == 0) {
opserr << "ElasticTimoshenkoBeam2d::recvSelf() - could not get a CrdTransf2d.\n";
return -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 << "ElasticTimoshenkoBeam2d::recvSelf() - could not get a CrdTransf2d.\n";
return -1;
}
}
// receive the CoordTransf
theCoordTransf->setDbTag((int)data(15));
res += theCoordTransf->recvSelf(commitTag, rChannel, theBroker);
if (res < 0) {
opserr << "ElasticTimoshenkoBeam2d::recvSelf() - could not receive CoordTransf.\n";
return res;
}
// get coordinate transformation type and save flag
if (strncmp(theCoordTransf->getClassType(),"Linear",6) == 0) {
nlGeo = 0;
} else if (strncmp(theCoordTransf->getClassType(),"PDelta",6) == 0) {
nlGeo = 1;
} else if (strncmp(theCoordTransf->getClassType(),"Corot",5) == 0) {
nlGeo = 1;
opserr << "\nWARNING ElasticTimoshenkoBeam2d::recvSelf()"
<< " - Element: " << this->getTag() << endln
<< "Unsupported Corotational transformation assigned.\n"
<< "Using PDelta transformation instead.\n";
}
// revert the CoordTransf to its last committed state
theCoordTransf->revertToLastCommit();
return res;
}