本文整理汇总了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);
}
}
示例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
}