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


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

本文整理汇总了C++中StructuralElement::computeVectorOf方法的典型用法代码示例。如果您正苦于以下问题:C++ StructuralElement::computeVectorOf方法的具体用法?C++ StructuralElement::computeVectorOf怎么用?C++ StructuralElement::computeVectorOf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StructuralElement的用法示例。


在下文中一共展示了StructuralElement::computeVectorOf方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: computeResultAtCenterOfGravity

void
FreeWarping :: computeResultAtCenterOfGravity(TimeStep *tStep)
{
    int noCS = this->giveDomain(1)->giveNumberOfCrossSectionModels(); //number of warping Crosssections
    SolutionAtCG.resize(noCS);
    Element *closestElement;
    FloatArray lcoords,  closest, lcg;
    SpatialLocalizer *sp = this->giveDomain(1)->giveSpatialLocalizer();
    sp->init();
    lcoords.resize(2);
    closest.resize(2);
    lcg.resize(2);

    for ( int j = 1; j <= noCS; ++j ) {
        lcg.at(1) = CG.at(j, 1);
        lcg.at(2) = CG.at(j, 2);
        closestElement = sp->giveElementClosestToPoint(lcoords, closest, lcg, 0);

        StructuralElement *sE = dynamic_cast< StructuralElement * >(closestElement);
        FloatArray u, r, b;
        FloatMatrix N;
        sE->computeNmatrixAt(lcoords, N);
        sE->computeVectorOf(VM_Total, tStep, u);
        u.resizeWithValues(3);
        r.beProductOf(N, u);

        SolutionAtCG.at(j) = r.at(1);
    }
}
开发者ID:erisve,项目名称:oofem,代码行数:29,代码来源:freewarping.C

示例2: computeNonlocalDegreesOfFreedom

void GradDpElement :: computeNonlocalDegreesOfFreedom(FloatArray &answer, TimeStep *tStep)
{
    ///@todo Just use this instead! (should work, but I don't have any tests right now)
#if 0
    this->giveStructuralElement()->computeVectorOf({G_0}, VM_Total, tStep, answer);
#else
    StructuralElement *elem = this->giveStructuralElement();
    FloatArray u;
    answer.resize(nlSize);

    elem->computeVectorOf(VM_Total, tStep, u);
    u.resizeWithValues(totalSize);
    for  ( int i = 1; i <= nlSize; i++ ) {
        answer.at(i) = u.at( locK.at(i) );
    }
#endif
}
开发者ID:JimBrouzoulis,项目名称:OOFEM_Jim,代码行数:17,代码来源:graddpelement.C


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