本文整理汇总了C++中FEInterpolation::evaldNdxi方法的典型用法代码示例。如果您正苦于以下问题:C++ FEInterpolation::evaldNdxi方法的具体用法?C++ FEInterpolation::evaldNdxi怎么用?C++ FEInterpolation::evaldNdxi使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FEInterpolation
的用法示例。
在下文中一共展示了FEInterpolation::evaldNdxi方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: computeCovarBaseVectorAt
void
IntElLine1PhF :: computeCovarBaseVectorAt(IntegrationPoint *ip, FloatArray &G)
{
FloatMatrix dNdxi;
FEInterpolation *interp = this->giveInterpolation();
interp->evaldNdxi( dNdxi, ip->giveNaturalCoordinates(), FEIElementGeometryWrapper(this) );
G.resize(2);
G.zero();
int numNodes = this->giveNumberOfNodes();
for ( int i = 1; i <= dNdxi.giveNumberOfRows(); i++ ) {
double X1_i = 0.5 * ( this->giveNode(i)->giveCoordinate(1) + this->giveNode(i + numNodes / 2)->giveCoordinate(1) ); // (mean) point on the fictious mid surface
double X2_i = 0.5 * ( this->giveNode(i)->giveCoordinate(2) + this->giveNode(i + numNodes / 2)->giveCoordinate(2) );
G.at(1) += dNdxi.at(i, 1) * X1_i;
G.at(2) += dNdxi.at(i, 1) * X2_i;
}
}
示例2: computeCovarBaseVectorAt
void
IntElLine2IntPen :: computeCovarBaseVectorAt(IntegrationPoint *ip, FloatArray &G)
{
// printf("Entering IntElLine2IntPen :: computeCovarBaseVectorAt\n");
// Since we are averaging over the whole element, always evaluate the base vectors at xi = 0.
FloatArray xi_0 = {0.0};
FloatMatrix dNdxi;
FEInterpolation *interp = this->giveInterpolation();
// interp->evaldNdxi( dNdxi, ip->giveNaturalCoordinates(), FEIElementGeometryWrapper(this) );
interp->evaldNdxi( dNdxi, xi_0, FEIElementGeometryWrapper(this) );
G.resize(2);
G.zero();
int numNodes = this->giveNumberOfNodes();
for ( int i = 1; i <= dNdxi.giveNumberOfRows(); i++ ) {
double X1_i = 0.5 * ( this->giveNode(i)->giveCoordinate(1) + this->giveNode(i + numNodes / 2)->giveCoordinate(1) ); // (mean) point on the fictious mid surface
double X2_i = 0.5 * ( this->giveNode(i)->giveCoordinate(2) + this->giveNode(i + numNodes / 2)->giveCoordinate(2) );
G.at(1) += dNdxi.at(i, 1) * X1_i;
G.at(2) += dNdxi.at(i, 1) * X2_i;
}
}