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


C++ GaussPoint::order方法代码示例

本文整理汇总了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;
}
开发者ID:anilkunwar,项目名称:OOF2,代码行数:29,代码来源:shapefunction.C

示例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;
}
开发者ID:anilkunwar,项目名称:OOF2,代码行数:20,代码来源:shapefunction.C

示例3: value

double ShapeFunction::value(ShapeFunctionIndex n, const GaussPoint &g)
  const
{
  return sftable[g.order()]->f_table[g.index()][n];
}
开发者ID:anilkunwar,项目名称:OOF2,代码行数:5,代码来源:shapefunction.C

示例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];
}
开发者ID:anilkunwar,项目名称:OOF2,代码行数:7,代码来源:shapefunction.C


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