Esempio n. 1
0
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();
}
Esempio n. 2
0
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();
}
Esempio n. 3
0
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();
}
Esempio n. 4
0
double UpwindDiff::calcDx(GridField<double> &g, const int i, const int j, const int k)
{
	if((*_w)(i, j, k).x > 0.0){ // if(BURNT)
		return (g(i, j, k) - g(i-1, j, k))/g.dx();
	}
	else {// FUEL
		return (g(i+1, j, k) - g(i, j, k))/g.dx();
	}
}
Esempio n. 5
0
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());
}
Esempio n. 6
0
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());
}
Esempio n. 7
0
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 */ );
}
Esempio n. 8
0
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());
}
Esempio n. 9
0
double CentralDiff::calcDz(GridField<double> &g, const int i, const int j, const int k)
{
	return (double)(g(i, j, k+1) - g(i, j, k-1))/(g.dx()*2.0);
}
Esempio n. 10
0
double CentralDiff::calcD2y(GridField<double> &g, const int i, const int j, const int k)
{
	return ( g(i,j+1,k) - 2.0*g(i,j,k) + g(i,j-1,k))/( g.dx()*g.dx() /* deltaY^2 */ );
}
Esempio n. 11
0
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());
}
Esempio n. 12
0
double CentralDiff::calcDy(GridField<double> &g, const int i, const int j, const int k)
{
	return (double)(g(i, j+1, k) - g(i, j-1, k))/(g.dx()*2.0);
}
Esempio n. 13
0
Vector3 CentralDiff::calcDxy(GridField<Vector3> &g, const int i, const int j, const int 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());
}
Esempio n. 14
0
double UpwindDiff::calcDzp(GridField<double> &g, const int i, const int j, const int k)
{
	return (double)(g(i, j, k + 1) - g(i, j, k))/(g.dx());
}
Esempio n. 15
0
Vector3 CentralDiff::calcD2x(GridField<Vector3> &g, const int i, const int j, const int k)
{
	return ( g(i+1,j,k) - 2.0*g(i,j,k) + g(i-1,j,k))/( g.dx()*g.dx() /*deltaX^2 */ );
}
Esempio n. 16
0
Vector3 CentralDiff::calcDz(GridField<Vector3> &g, const int i, const int j, const int k)
{
	return (Vector3)(g(i, j, k+1) - g(i, j, k-1))/(g.dx()*2.0);
}
Esempio n. 17
0
Vector3 CentralDiff::calcDy(GridField<Vector3> &g, const int i, const int j, const int k)
{
	return (Vector3)(g(i, j+1, k) - g(i, j-1, k))/(g.dx()*2.0);
}