本文整理汇总了C++中FEInterpolation::evaldNdx方法的典型用法代码示例。如果您正苦于以下问题:C++ FEInterpolation::evaldNdx方法的具体用法?C++ FEInterpolation::evaldNdx怎么用?C++ FEInterpolation::evaldNdx使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FEInterpolation
的用法示例。
在下文中一共展示了FEInterpolation::evaldNdx方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: computeBmatrixAt
void
AxisymElement :: computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int li, int ui)
//
// Returns the [ 6 x (nno*2) ] strain-displacement matrix {B} of the receiver,
// evaluated at gp.
// (epsilon_x,epsilon_y,...,Gamma_xy) = B . r
// r = ( u1,v1,u2,v2,u3,v3,u4,v4)
{
FEInterpolation *interp = this->giveInterpolation();
FloatArray N;
interp->evalN( N, gp->giveNaturalCoordinates(), *this->giveCellGeometryWrapper() );
double r = 0.0;
for ( int i = 1; i <= this->giveNumberOfDofManagers(); i++ ) {
double x = this->giveNode(i)->giveCoordinate(1);
r += x * N.at(i);
}
FloatMatrix dNdx;
interp->evaldNdx( dNdx, gp->giveNaturalCoordinates(), *this->giveCellGeometryWrapper() );
answer.resize(6, dNdx.giveNumberOfRows() * 2);
answer.zero();
for ( int i = 1; i <= dNdx.giveNumberOfRows(); i++ ) {
answer.at(1, i * 2 - 1) = dNdx.at(i, 1);
answer.at(2, i * 2 - 0) = dNdx.at(i, 2);
answer.at(3, i * 2 - 1) = N.at(i) / r;
answer.at(6, 2 * i - 1) = dNdx.at(i, 2);
answer.at(6, 2 * i - 0) = dNdx.at(i, 1);
}
}
示例2: computeBHmatrixAt
void
Structural3DElement :: computeBHmatrixAt(GaussPoint *gp, FloatMatrix &answer)
// Returns the [ 9 x (nno * 3) ] displacement gradient matrix {BH} of the receiver,
// evaluated at gp.
// BH matrix - 9 rows : du/dx, dv/dy, dw/dz, dv/dz, du/dz, du/dy, dw/dy, dw/dx, dv/dx
{
FEInterpolation *interp = this->giveInterpolation();
FloatMatrix dNdx;
interp->evaldNdx( dNdx, gp->giveNaturalCoordinates(), FEIElementGeometryWrapper(this) );
answer.resize(9, dNdx.giveNumberOfRows() * 3);
answer.zero();
for ( int i = 1; i <= dNdx.giveNumberOfRows(); i++ ) {
answer.at(1, 3 * i - 2) = dNdx.at(i, 1); // du/dx
answer.at(2, 3 * i - 1) = dNdx.at(i, 2); // dv/dy
answer.at(3, 3 * i - 0) = dNdx.at(i, 3); // dw/dz
answer.at(4, 3 * i - 1) = dNdx.at(i, 3); // dv/dz
answer.at(7, 3 * i - 0) = dNdx.at(i, 2); // dw/dy
answer.at(5, 3 * i - 2) = dNdx.at(i, 3); // du/dz
answer.at(8, 3 * i - 0) = dNdx.at(i, 1); // dw/dx
answer.at(6, 3 * i - 2) = dNdx.at(i, 2); // du/dy
answer.at(9, 3 * i - 1) = dNdx.at(i, 1); // dv/dx
}
}
示例3: computeBMatrixAt
void Space3dStructuralElementEvaluator :: computeBMatrixAt(FloatMatrix &answer, GaussPoint *gp)
{
FloatMatrix d;
Element *element = this->giveElement();
FEInterpolation *interp = element->giveInterpolation();
// this uses FEInterpolation::nodes2coords - quite inefficient in this case (large num of dofmans)
interp->evaldNdx( d, gp->giveNaturalCoordinates(), FEIIGAElementGeometryWrapper( element, gp->giveIntegrationRule()->giveKnotSpan() ) );
answer.resize(6, d.giveNumberOfRows() * 3);
answer.zero();
for ( int i = 1; i <= d.giveNumberOfRows(); i++ ) {
answer.at(1, i * 3 - 2) = d.at(i, 1);
answer.at(2, i * 3 - 1) = d.at(i, 2);
answer.at(3, i * 3 - 0) = d.at(i, 3);
answer.at(4, 3 * i - 1) = d.at(i, 3);
answer.at(4, 3 * i - 0) = d.at(i, 2);
answer.at(5, 3 * i - 2) = d.at(i, 3);
answer.at(5, 3 * i - 0) = d.at(i, 1);
answer.at(6, 3 * i - 2) = d.at(i, 2);
answer.at(6, 3 * i - 1) = d.at(i, 1);
}
}
示例4: computeBmatrixAt
void
L4Axisymm :: computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int li, int ui)
{
// Returns the [ 6 x (nno*2) ] strain-displacement matrix {B} of the receiver,
// evaluated at gp. Uses reduced integration.
// (epsilon_x,epsilon_y,...,Gamma_xy) = B . r
// r = ( u1,v1,u2,v2,u3,v3,u4,v4)
FloatArray N, NRed, redCoord;
if ( numberOfFiAndShGaussPoints == 1 ) { // Reduced integration
redCoord = {0.0, 0.0}; // eval in centroid
} else {
redCoord = gp->giveNaturalCoordinates();
}
FEInterpolation *interp = this->giveInterpolation();
interp->evalN( N, gp->giveNaturalCoordinates(), FEIElementGeometryWrapper(this) );
interp->evalN( NRed, redCoord, FEIElementGeometryWrapper(this) );
// Evaluate radius at center
double r = 0.0;
for ( int i = 1; i <= this->giveNumberOfDofManagers(); i++ ) {
double x = this->giveNode(i)->giveCoordinate(1);
r += x * NRed.at(i);
}
FloatMatrix dNdx, dNdxRed;
interp->evaldNdx( dNdx, gp->giveNaturalCoordinates(), FEIElementGeometryWrapper(this) );
interp->evaldNdx( dNdxRed, redCoord, FEIElementGeometryWrapper(this) );
answer.resize(6, dNdx.giveNumberOfRows() * 2);
answer.zero();
for ( int i = 1; i <= dNdx.giveNumberOfRows(); i++ ) {
answer.at(1, i * 2 - 1) = dNdx.at(i, 1);
answer.at(2, i * 2 - 0) = dNdx.at(i, 2);
answer.at(3, i * 2 - 1) = NRed.at(i) / r;
answer.at(6, 2 * i - 1) = dNdxRed.at(i, 2);
answer.at(6, 2 * i - 0) = dNdxRed.at(i, 1);
}
}
示例5: computeBmatrixAt
void
PlaneStressElement :: computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int lowerIndx, int upperIndx)
{
FEInterpolation *interp = this->giveInterpolation();
FloatMatrix dNdx;
interp->evaldNdx( dNdx, gp->giveNaturalCoordinates(), * this->giveCellGeometryWrapper() );
answer.resize(3, dNdx.giveNumberOfRows() * 2);
answer.zero();
for ( int i = 1; i <= dNdx.giveNumberOfRows(); i++ ) {
answer.at(1, i * 2 - 1) = dNdx.at(i, 1);
answer.at(2, i * 2 - 0) = dNdx.at(i, 2);
answer.at(3, 2 * i - 1) = dNdx.at(i, 2);
answer.at(3, 2 * i - 0) = dNdx.at(i, 1);
}
}
示例6: computeBmatrixAt
void
Structural3DElement :: computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int li, int ui)
// Returns the [ 6 x (nno*3) ] strain-displacement matrix {B} of the receiver, eva-
// luated at gp.
// B matrix - 6 rows : epsilon-X, epsilon-Y, epsilon-Z, gamma-YZ, gamma-ZX, gamma-XY :
{
FEInterpolation *interp = this->giveInterpolation();
FloatMatrix dNdx;
interp->evaldNdx( dNdx, gp->giveNaturalCoordinates(), FEIElementGeometryWrapper(this) );
answer.resize(6, dNdx.giveNumberOfRows() * 3);
answer.zero();
for ( int i = 1; i <= dNdx.giveNumberOfRows(); i++ ) {
answer.at(1, 3 * i - 2) = dNdx.at(i, 1);
answer.at(2, 3 * i - 1) = dNdx.at(i, 2);
answer.at(3, 3 * i - 0) = dNdx.at(i, 3);
answer.at(5, 3 * i - 2) = answer.at(4, 3 * i - 1) = dNdx.at(i, 3);
answer.at(6, 3 * i - 2) = answer.at(4, 3 * i - 0) = dNdx.at(i, 2);
answer.at(6, 3 * i - 1) = answer.at(5, 3 * i - 0) = dNdx.at(i, 1);
}
}