本文整理汇总了C++中GridField::dx方法的典型用法代码示例。如果您正苦于以下问题:C++ GridField::dx方法的具体用法?C++ GridField::dx怎么用?C++ GridField::dx使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GridField
的用法示例。
在下文中一共展示了GridField::dx方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: calcDy
double UpwindDiff::calcDy(GridField<double> &g, const int i, const int j, const int k)
{
if((*_w)(i, j, k).y > 0.0)
return (g(i, j, k) - g(i, j-1, k))/g.dx();
else
return (g(i, j+1, k) - g(i, j, k))/g.dx();
}
示例2: calcDz
double UpwindDiff::calcDz(GridField<double> &g, const int i, const int j, const int k)
{
if((*_w)(i, j, k).z > 0.0)
return (g(i, j, k) - g(i, j, k-1))/g.dx();
else
return (g(i, j, k+1) - g(i, j, k))/g.dx();
}
示例3: calcDx
Vector3 UpwindDiff::calcDx(GridField<Vector3> &g, const int i, const int j, const int k)
{
if((*_w)(i, j, k).x > 0.0)
return (g(i, j, k) - g(i-1, j, k))/g.dx();
else
return (g(i+1, j, k) - g(i, j, k))/g.dx();
}
示例4: calcDxy
double CentralDiff::calcDxy(GridField<double> &g, const int i, const int j, const int k)
{
/*CellType c_t = LevelSet::getCellType(g(i,j,k));
return ( g(i+1,j+1,k,c_t) - g(i+1,j-1,k,c_t) + g(i-1,j-1,k,c_t) - g(i-1,j+1,k,c_t) ) / (4.0*g.dx()*g.dx());*/
/*double asd4 = g(i-1,j+1,k);
double asd3 = g(i-1,j-1,k);
double asd2 = g(i+1,j-1,k);
double asd1 = g(i+1,j+1,k);
*/
return ( g(i+1,j+1,k) - g(i+1,j-1,k) + g(i-1,j-1,k) - g(i-1,j+1,k) ) / (4.0*g.dx()*g.dx());
}
示例5: calcDyz
Vector3 CentralDiff::calcDyz(GridField<Vector3> &g, const int i, const int j, const int k)
{
return ( g(i,j+1,k+1) - g(i,j+1,k-1) + g(i,j-1,k-1) - g(i,j-1,k+1) ) / (4.0*g.dx()*g.dx());
}
示例6: g
double CentralDiff::calcD2z(GridField<double> &g, const int i, const int j, const int k)
{
return ( g(i,j,k+1) - 2.0*g(i,j,k) + g(i,j,k-1))/( g.dx()*g.dx() /* deltaZ^2 */ );
}
示例7: calcDxz
double CentralDiff::calcDxz(GridField<double> &g, const int i, const int j, const int k)
{
return ( g(i+1,j,k+1) - g(i+1,j,k-1) + g(i-1,j,k-1) - g(i-1,j,k+1) ) / (4.0*g.dx()*g.dx());
}
示例8: calcDzp
double CentralDiff::calcDzp(GridField<double> &g, const int i, const int j, const int k)
{
throw;
//EJ DEFINIERAD I CENTRAL
return (double)(g(i, j, k + 1) - g(i, j, k))/(g.dx());
}