File derivs.cxx

Functions

Field3D DDX(const Field3D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate first partial derivative in X

\(\partial / \partial x\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field2D DDX(const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate first partial derivative in X

\(\partial / \partial x\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field3D DDY(const Field3D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate first partial derivative in Y

\(\partial / \partial y\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field2D DDY(const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate first partial derivative in Y

\(\partial / \partial y\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field3D DDZ(const Field3D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate first partial derivative in Z

\(\partial / \partial z\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field2D DDZ(const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate first partial derivative in Z

\(\partial / \partial z\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Vector3D DDZ(const Vector3D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate first partial derivative in Z

\(\partial / \partial z\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Vector2D DDZ(const Vector2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate first partial derivative in Z

\(\partial / \partial z\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field3D D2DX2(const Field3D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate second partial derivative in X

\(\partial^2 / \partial x^2\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field2D D2DX2(const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate second partial derivative in X

\(\partial^2 / \partial x^2\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field3D D2DY2(const Field3D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate second partial derivative in Y

\(\partial^2 / \partial y^2\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field2D D2DY2(const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate second partial derivative in Y

\(\partial^2 / \partial y^2\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field3D D2DZ2(const Field3D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate second partial derivative in Z

\(\partial^2 / \partial z^2\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field2D D2DZ2(const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate second partial derivative in Z

\(\partial^2 / \partial z^2\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field3D D4DX4(const Field3D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate forth partial derivative in X

\(\partial^4 / \partial x^4\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field2D D4DX4(const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate forth partial derivative in X

\(\partial^4 / \partial x^4\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field3D D4DY4(const Field3D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate forth partial derivative in Y

\(\partial^4 / \partial y^4\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field2D D4DY4(const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate forth partial derivative in Y

\(\partial^4 / \partial y^4\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field3D D4DZ4(const Field3D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate forth partial derivative in Z

\(\partial^4 / \partial z^4\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field2D D4DZ4(const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate forth partial derivative in Z

\(\partial^4 / \partial z^4\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field2D D2DXDY(const Field2D &f, CELL_LOC outloc, const std::string &method, const std::string &region, const std::string &dfdy_boundary_condition)

Mixed derivative in X and Y

This first takes derivatives in Y, then in X.

** Communicates and applies boundary in X.

Field3D D2DXDY(const Field3D &f, CELL_LOC outloc, const std::string &method, const std::string &region, const std::string &dfdy_boundary_condition)

Mixed derivative in X and Y

This first takes derivatives in Y, then in X.

** Communicates and applies boundary in X.

Field2D D2DXDZ(const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate mixed partial derivative in x and z

\(\partial^2 / \partial x \partial z\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field3D D2DXDZ(const Field3D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

X-Z mixed derivative.

Calculate mixed partial derivative in x and z

\(\partial^2 / \partial x \partial z\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field2D D2DYDZ(const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Calculate mixed partial derivative in y and z

\(\partial^2 / \partial y \partial z\)

Parameters
  • f: The field to be differentiated
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field3D D2DYDZ(const Field3D &f, CELL_LOC outloc, MAYBE_UNUSED(const std::string &method), const std::string &region, )
Field2D VDDX(const Field2D &v, const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

Special case where both arguments are 2D. Output location ignored for now.

For terms of form v * grad(f)

\(v \cdot \partial f / \partial x\)

Parameters
  • v: The velocity field
  • f: The field of the advected quantity
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field3D VDDX(const Field3D &v, const Field3D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

General version for 2 or 3-D objects.

For terms of form v * grad(f)

\(v \cdot \partial f / \partial x\)

Parameters
  • v: The velocity field
  • f: The field of the advected quantity
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field2D VDDY(const Field2D &v, const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

For terms of form v * grad(f)

\(v \cdot \partial f / \partial y\)

Parameters
  • v: The velocity field
  • f: The field of the advected quantity
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field3D VDDY(const Field3D &v, const Field3D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

For terms of form v * grad(f)

\(v \cdot \partial f / \partial y\)

Parameters
  • v: The velocity field
  • f: The field of the advected quantity
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field2D VDDZ(const Field2D &v, const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

For terms of form v * grad(f)

\(v \cdot \partial f / \partial z\)

Parameters
  • v: The velocity field
  • f: The field of the advected quantity
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field2D VDDZ(const Field3D &v, const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

For terms of form v * grad(f)

\(v \cdot \partial f / \partial z\)

Parameters
  • v: The velocity field
  • f: The field of the advected quantity
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field3D VDDZ(const Field3D &v, const Field3D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

For terms of form v * grad(f)

\(v \cdot \partial f / \partial z\)

Parameters
  • v: The velocity field
  • f: The field of the advected quantity
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field2D FDDX(const Field2D &v, const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

for terms of form div(v * f)

\(\partial (v f) / \partial x\)

Parameters
  • v: The velocity field
  • f: The field of the advected quantity
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field3D FDDX(const Field3D &v, const Field3D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

for terms of form div(v * f)

\(\partial (v f) / \partial x\)

Parameters
  • v: The velocity field
  • f: The field of the advected quantity
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field2D FDDY(const Field2D &v, const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

for terms of form div(v * f)

\(\partial (v f) / \partial y\)

Parameters
  • v: The velocity field
  • f: The field of the advected quantity
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field3D FDDY(const Field3D &v, const Field3D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

for terms of form div(v * f)

\(\partial (v f) / \partial y\)

Parameters
  • v: The velocity field
  • f: The field of the advected quantity
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field2D FDDZ(const Field2D &v, const Field2D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

for terms of form div(v * f)

\(\partial (v f) / \partial z\)

Parameters
  • v: The velocity field
  • f: The field of the advected quantity
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY

Field3D FDDZ(const Field3D &v, const Field3D &f, CELL_LOC outloc = CELL_DEFAULT, const std::string &method = "DEFAULT", const std::string &region = "RGN_NOBNDRY")

for terms of form div(v * f)

\(\partial (v f) / \partial z\)

Parameters
  • v: The velocity field
  • f: The field of the advected quantity
  • outloc: The cell location where the result is desired. If staggered grids is not enabled then this has no effect If not given, defaults to CELL_DEFAULT
  • method: Differencing method to use. This overrides the default If not given, defaults to DIFF_DEFAULT
  • region: What region is expected to be calculated If not given, defaults to RGN_NOBNDRY