本文整理汇总了C++中UniaxialMaterial::getTag方法的典型用法代码示例。如果您正苦于以下问题:C++ UniaxialMaterial::getTag方法的具体用法?C++ UniaxialMaterial::getTag怎么用?C++ UniaxialMaterial::getTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UniaxialMaterial
的用法示例。
在下文中一共展示了UniaxialMaterial::getTag方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: theMaterial
// constructor:
// responsible for allocating the necessary space needed by each object
// and storing the tags of the CorotTruss end nodes.
CorotTruss::CorotTruss(int tag, int dim,
int Nd1, int Nd2,
UniaxialMaterial &theMat,
double a, double r)
:Element(tag,ELE_TAG_CorotTruss),
theMaterial(0), connectedExternalNodes(2),
numDOF(0), numDIM(dim),
Lo(0.0), Ln(0.0),
A(a), rho(r), R(3,3),
theMatrix(0), theVector(0)
{
// get a copy of the material and check we obtained a valid copy
theMaterial = theMat.getCopy();
if (theMaterial == 0) {
opserr << "FATAL CorotTruss::CorotTruss - " << tag <<
"failed to get a copy of material with tag " << theMat.getTag() << endln;
exit(-1);
}
// ensure the connectedExternalNode ID is of correct size & set values
if (connectedExternalNodes.Size() != 2) {
opserr << "FATAL CorotTruss::CorotTruss - " << tag <<
"failed to create an ID of size 2\n";
exit(-1);
}
connectedExternalNodes(0) = Nd1;
connectedExternalNodes(1) = Nd2;
// set node pointers to NULL
theNodes[0] = 0;
theNodes[1] = 0;
}
示例2: theMaterial
// constructor:
// responsible for allocating the necessary space needed by each object
// and storing the tags of the CorotTruss end nodes.
XC::CorotTruss::CorotTruss(int tag, int dim,int Nd1, int Nd2, UniaxialMaterial &theMat,double a)
:CorotTrussBase(tag,ELE_TAG_CorotTruss,dim,Nd1,Nd2), theMaterial(nullptr), A(a)
{
// get a copy of the material and check we obtained a valid copy
theMaterial = theMat.getCopy();
if(theMaterial == 0)
{
std::cerr << getClassName() << "::" << __FUNCTION__
<< "; FATAL error in element: " << tag
<< "failed to get a copy of material with tag "
<< theMat.getTag() << std::endl;
exit(-1);
}
}
示例3: theBetaMaterial
Truss2::Truss2(int tag,
int dim,
int Nd1, int Nd2, int oNd1, int oNd2,
UniaxialMaterial &theMat,
double a, double r, int damp)
:Element(tag,ELE_TAG_Truss2),
theMaterial(0), theBetaMaterial(0), connectedExternalNodes(2), connectedExternalOtherNodes(2),
dimension(dim), numDOF(0), theLoad(0),
theMatrix(0), theVector(0),
L(0.0), A(a), rho(r), doRayleighDamping(damp)
{
// get a copy of the material and check we obtained a valid copy
theMaterial = theMat.getCopy();
if (theMaterial == 0) {
opserr << "FATAL Truss2::Truss2 - " << tag <<
"failed to get a copy of material with tag " << theMat.getTag() << endln;
exit(-1);
} else if (theMaterial->getClassTag() == MAT_TAG_ConcretewBeta) {
theBetaMaterial = (ConcretewBeta *) theMaterial;
}
// ensure the connectedExternalNode ID is of correct size & set values
if (connectedExternalNodes.Size() != 2 || connectedExternalOtherNodes.Size() != 2) {
opserr << "FATAL Truss2::Truss2 - " << tag << "failed to create an ID of size 2\n";
exit(-1);
}
connectedExternalNodes(0) = Nd1;
connectedExternalNodes(1) = Nd2;
/// some work to save the other nodes:
connectedExternalOtherNodes(0) = oNd1;
connectedExternalOtherNodes(1) = oNd2;
// set node pointers to NULL
for (int i=0; i<2; i++) {
theNodes[i] = 0;
theOtherNodes[i] = 0;
}
cosX[0] = 0.0;
cosX[1] = 0.0;
cosX[2] = 0.0;
// AddingSensitivity:BEGIN /////////////////////////////////////
parameterID = 0;
theLoadSens = 0;
// AddingSensitivity:END //////////////////////////////////////
}
示例4: numDOF
N4BiaxialTruss::N4BiaxialTruss(int tag,
int dim,
int Nd1, int Nd2,
int GNd1, int GNd2,
UniaxialMaterial &theMat,
double a, double r, int damp)
:Element(tag,ELE_TAG_N4BiaxialTruss),
theMaterial_1(0), theBetaMaterial_1(0),
theMaterial_2(0), theBetaMaterial_2(0),
connectedExternalNodes(4),
dimension(dim), numDOF(0), theLoad(0),
theMatrix(0), theVector(0), theVector2(0),
L(0.0), A(a), rho(r), doRayleighDamping(damp)
{
// get a copy of the material and check we obtained a valid copy
theMaterial_1 = theMat.getCopy();
theMaterial_2 = theMat.getCopy();
if ((theMaterial_1 == 0) || (theMaterial_2 == 0)) {
opserr << "FATAL N4BiaxialTruss::N4BiaxialTruss - " << tag <<
"failed to get a copy of material with tag " << theMat.getTag() << endln;
exit(-1);
} else if (theMat.getClassTag() == MAT_TAG_ConcretewBeta) {
theBetaMaterial_1 = (ConcretewBeta *) theMaterial_1;
theBetaMaterial_2 = (ConcretewBeta *) theMaterial_2;
}
// ensure the connectedExternalNode ID is of correct size & set values
if (connectedExternalNodes.Size() != 4) {
opserr << "FATAL N4BiaxialTruss::N4BiaxialTruss - " << tag << "failed to create an node ID array of size 4\n";
exit(-1);
}
connectedExternalNodes(0) = Nd1;
connectedExternalNodes(1) = Nd2;
connectedExternalNodes(2) = GNd1;
connectedExternalNodes(3) = GNd2;
// set node pointers to NULL
for (int i=0; i<4; i++)
theNodes[i] = 0;
cosX[0] = 0.0;
cosX[1] = 0.0;
cosX[2] = 0.0;
}