本文整理汇总了C++中StructuralElement::computeStrainVector方法的典型用法代码示例。如果您正苦于以下问题:C++ StructuralElement::computeStrainVector方法的具体用法?C++ StructuralElement::computeStrainVector怎么用?C++ StructuralElement::computeStrainVector使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StructuralElement
的用法示例。
在下文中一共展示了StructuralElement::computeStrainVector方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: giveStiffnessMatrix
void
SimpleInterfaceMaterial :: giveStiffnessMatrix(FloatMatrix &answer,
MatResponseMode rMode,
GaussPoint *gp, TimeStep *tStep)
//
// Returns characteristic material stiffness matrix of the receiver
//
{
MaterialMode mMode = gp->giveElement()->giveMaterialMode();
FloatArray strainVector;
StructuralElement *el = static_cast< StructuralElement * >( gp->giveElement() );
double normalStrain;
el->computeStrainVector(strainVector, gp, tStep);
normalStrain = strainVector.at(1);
answer.zero();
switch ( mMode ) {
case _1dInterface:
answer.resize(1, 1);
if ( rMode == SecantStiffness || rMode == TangentStiffness ) {
if ( normalStrain + normalClearance <= 0 ) {
answer.at(1, 1) = this->kn; //in compression and after the clearance gap closed
} else {
answer.at(1, 1) = this->kn * this->stiffCoeff;
}
} else {
if ( rMode == ElasticStiffness ) {
answer.at(1, 1) = this->kn;
} else {
OOFEM_ERROR("unknown MatResponseMode (%s)", __MatResponseModeToString(rMode) );
}
}
return;
case _2dInterface:
answer.resize(2, 2);
if ( rMode == SecantStiffness || rMode == TangentStiffness ) {
if ( normalStrain + normalClearance <= 0. ) {
answer.at(1, 1) = answer.at(2, 2) = this->kn; //in compression and after the clearance gap closed
} else {
answer.at(1, 1) = answer.at(2, 2) = this->kn * this->stiffCoeff;
}
} else {
if ( rMode == ElasticStiffness ) {
answer.at(1, 1) = answer.at(2, 2) = this->kn;
} else {
OOFEM_ERROR("unknown MatResponseMode (%s)", __MatResponseModeToString(rMode) );
}
}
return;
case _3dInterface:
answer.resize(3, 3);
if ( rMode == SecantStiffness || rMode == TangentStiffness ) {
if ( normalStrain + normalClearance <= 0. ) {
answer.at(1, 1) = answer.at(2, 2) = answer.at(3, 3) = this->kn; //in compression and after the clearance gap closed
} else {
answer.at(1, 1) = answer.at(2, 2) = answer.at(3, 3) = this->kn * this->stiffCoeff;
}
} else {
if ( rMode == ElasticStiffness ) {
answer.at(1, 1) = answer.at(2, 2) = answer.at(3, 3) = this->kn;
} else {
OOFEM_ERROR("unknown MatResponseMode (%s)", __MatResponseModeToString(rMode) );
}
}
return;
default:
StructuralMaterial :: giveStiffnessMatrix(answer, rMode, gp, tStep);
}
}