本文整理汇总了C++中NDMaterial::getRho方法的典型用法代码示例。如果您正苦于以下问题:C++ NDMaterial::getRho方法的具体用法?C++ NDMaterial::getRho怎么用?C++ NDMaterial::getRho使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NDMaterial
的用法示例。
在下文中一共展示了NDMaterial::getRho方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: theMaterial
TotalLagrangianFD8NodeBrick::TotalLagrangianFD8NodeBrick(int tag,
int node_numb_1, int node_numb_2, int node_numb_3, int node_numb_4,
int node_numb_5, int node_numb_6, int node_numb_7, int node_numb_8,
NDMaterial &m, double b1, double b2, double b3)
:Element(tag, ELE_TAG_TotalLagrangianFD8NodeBrick ),
theMaterial(0), connectedExternalNodes(NumNodes), Q(0), bf(NumDof), Ki(0)
{
connectedExternalNodes( 0) = node_numb_1;
connectedExternalNodes( 1) = node_numb_2;
connectedExternalNodes( 2) = node_numb_3;
connectedExternalNodes( 3) = node_numb_4;
connectedExternalNodes( 4) = node_numb_5;
connectedExternalNodes( 5) = node_numb_6;
connectedExternalNodes( 6) = node_numb_7;
connectedExternalNodes( 7) = node_numb_8;
bf(0) = b1;
bf(1) = b2;
bf(2) = b3;
theMaterial = new NDMaterial *[NumTotalGaussPts];
if (theMaterial == 0) {
opserr<<"FiniteDeformationElastic3D::FiniteDeformationElastic3D -- failed allocate material model pointer\n";
exit(-1);
}
int i;
for (i=0; i<NumTotalGaussPts; i++) {
theMaterial[i] = m.getCopy();
if (theMaterial[i] == 0) {
opserr<<"FiniteDeformationElastic3D::FiniteDeformationElastic3D -- failed allocate material model pointer\n";
exit(-1);
}
}
rho = m.getRho();
for (i=0; i<NumNodes; i++) theNodes[i] = 0;
}