当前位置: 首页>>代码示例>>C++>>正文


C++ StructuralElement::computeStrainVector方法代码示例

本文整理汇总了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);
    }
}
开发者ID:JimBrouzoulis,项目名称:OOFEM_Jim,代码行数:76,代码来源:simpleinterfacemat.C


注:本文中的StructuralElement::computeStrainVector方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。