本文整理汇总了C++中StructuralMaterial::give方法的典型用法代码示例。如果您正苦于以下问题:C++ StructuralMaterial::give方法的具体用法?C++ StructuralMaterial::give怎么用?C++ StructuralMaterial::give使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StructuralMaterial
的用法示例。
在下文中一共展示了StructuralMaterial::give方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
SimpleCrossSection :: give3dBeamStiffMtrx(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
{
StructuralMaterial *mat = dynamic_cast< StructuralMaterial * >( this->giveMaterial(gp) );
FloatMatrix mat3d;
double area, E, G, Iy, Iz, Ik;
double shearAreay, shearAreaz;
mat->give1dStressStiffMtrx(mat3d, rMode, gp, tStep);
E = mat3d.at(1, 1);
G = mat->give('G', gp);
area = this->give(CS_Area, gp);
Iy = this->give(CS_InertiaMomentY, gp);
Iz = this->give(CS_InertiaMomentZ, gp);
Ik = this->give(CS_TorsionMomentX, gp);
//shearCoeff = this->give(CS_BeamShearCoeff);
shearAreay = this->give(CS_ShearAreaY, gp);
shearAreaz = this->give(CS_ShearAreaZ, gp);
answer.resize(6, 6);
answer.zero();
answer.at(1, 1) = E * area;
///@todo Do this by using the general 3d tangent matrix instead somehow!!!
answer.at(2, 2) = shearAreay * G;
answer.at(3, 3) = shearAreaz * G;
//answer.at(2, 2) = shearCoeff * G * area;
//answer.at(3, 3) = shearCoeff * G * area;
answer.at(4, 4) = G * Ik;
answer.at(5, 5) = E * Iy;
answer.at(6, 6) = E * Iz;
}