本文整理汇总了C++中GaussPoint::order方法的典型用法代码示例。如果您正苦于以下问题:C++ GaussPoint::order方法的具体用法?C++ GaussPoint::order怎么用?C++ GaussPoint::order使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GaussPoint
的用法示例。
在下文中一共展示了GaussPoint::order方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: det_jacobian
double ShapeFunction::det_jacobian(const Element *el, const GaussPoint &g) const
{
double result;
if(sfcache[g.order()]->query_jac(el, g, result))
return result;
// don't be tempted to rewrite this in terms of
// det_jacobian(Element*, MasterCoord&) because that one doesn't use
// the precomputed values of the shape function derivatives!
#if DIM==2
result = el->jacobian(0, 0, g) * el->jacobian(1, 1, g) -
el->jacobian(0, 1, g) * el->jacobian(1, 0, g);
#elif DIM==3
// typing out a closed form in code is messy for 3d
double m[DIM][DIM];
int ii, jj;
for(ii=0; ii<DIM; ++ii) {
for(jj=0; jj<DIM; ++jj) {
m[ii][jj] = el->jacobian(ii,jj,g);
}
}
result = vtkMath::Determinant3x3(m);
#endif
sfcache[g.order()]->store_jac(el, g, result);
return result;
}
示例2: realderiv
double ShapeFunction::realderiv(const Element *el,
ShapeFunctionIndex n, SpaceIndex i,
const GaussPoint &g) const
{
// Trace("ShapeFunction::realderiv 1");
double result = 0;
if(sfcache[g.order()]->query_dsf(el, n, i, g, result))
return result;
// don't be tempted to rewrite this in terms of
// realderiv(Element*, ..., MasterCoord&) because that one doesn't use
// the precomputed values of the shape function derivatives!
for(SpaceIndex j=0; j<DIM; ++j)
result += el->Jdmasterdx(j, i, g)*masterderiv(n, j, g);
result /= el->det_jacobian(g);
sfcache[g.order()]->store_dsf(el, n, i, g, result);
return result;
}
示例3: value
double ShapeFunction::value(ShapeFunctionIndex n, const GaussPoint &g)
const
{
return sftable[g.order()]->f_table[g.index()][n];
}
示例4: masterderiv
// derivative wrt master coordinates
double ShapeFunction::masterderiv(ShapeFunctionIndex n, SpaceIndex j,
const GaussPoint &g) const
{
// Trace("ShapeFunction::masterderiv sf=" + to_string(n) + " gpt=" + to_string(g.mastercoord()));
return sftable[g.order()]->df_table[g.index()][n][j];
}