本文整理汇总了C++中NDMaterial::setTrialStrain方法的典型用法代码示例。如果您正苦于以下问题:C++ NDMaterial::setTrialStrain方法的具体用法?C++ NDMaterial::setTrialStrain怎么用?C++ NDMaterial::setTrialStrain使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NDMaterial
的用法示例。
在下文中一共展示了NDMaterial::setTrialStrain方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: eps
int
TimoshenkoSection3d::setTrialSectionDeformation (const Vector &deforms)
{
int res = 0;
e = deforms;
kData[0] = 0.0; kData[1] = 0.0; kData[2] = 0.0; kData[3] = 0.0;
kData[4] = 0.0; kData[5] = 0.0; kData[6] = 0.0; kData[7] = 0.0;
kData[8] = 0.0;
sData[0] = 0.0; sData[1] = 0.0; sData[2] = 0.0;
int loc = 0;
double d0 = deforms(0);
double d1 = deforms(1);
double d2 = deforms(2);
for (int i = 0; i < numFibers; i++) {
NDMaterial *theMat = theMaterials[i];
double y = matData[loc++] - yBar;
double z = matData[loc++] - zBar;
double A = matData[loc++];
// determine material strain and set it
double strain = d0 + y*d1 + z*d2;
Vector eps(3);
eps(0) = strain;
res = theMat->setTrialStrain(eps);
const Vector &stress = theMat->getStress();
const Matrix &tangent = theMat->getTangent();
double value = tangent(0,0) * A;
double vas1 = y*value;
double vas2 = z*value;
double vas1as2 = vas1*z;
kData[0] += value;
kData[1] += vas1;
kData[2] += vas2;
kData[4] += vas1 * y;
kData[5] += vas1as2;
kData[8] += vas2 * z;
double fs0 = stress(0) * A;
sData[0] += fs0;
sData[1] += fs0 * y;
sData[2] += fs0 * z;
}
kData[3] = kData[1];
kData[6] = kData[2];
kData[7] = kData[5];
return res;
}