Derivatives
Name DerivativesOrder
Section Mesh::Derivatives
Type integer
Default 4
This variable gives the discretization order for the approximation of
the differential operators. This means, basically, that
DerivativesOrder points are used in each positive/negative
spatial direction, e.g. DerivativesOrder = 1 would give
the well-known three-point formula in 1D.
The number of points actually used for the Laplacian
depends on the stencil used. Let $O$ = DerivativesOrder, and $d$ = Dimensions.
- stencil_star: $2 O d + 1$
- stencil_cube: $(2 O + 1)^d$
- stencil_starplus: $2 O d + 1 + n$ with n being 8 in 2D and 24 in 3D.
Name DerivativesStencil
Section Mesh::Derivatives
Type integer
Default stencil_star
Decides what kind of stencil is used, i.e. which points, around
each point in the mesh, are the neighboring points used in the
expression of the differential operator.
If curvilinear coordinates are to be used, then only the stencil_starplus
or the stencil_cube may be used. We only recommend the stencil_starplus,
since the cube typically needs far too much memory.
Options:
- stencil_star:
A star around each point (i.e., only points on the axis).
- stencil_variational:
Same as the star, but with coefficients built in a different way.
- stencil_cube:
A cube of points around each point.
- stencil_starplus:
The star, plus a number of off-axis points.
- stencil_stargeneral:
The general star. Default for non-orthogonal grids.
Name MultigridDerivativesOrder
Section Mesh::Derivatives
Type integer
Default 1
This variable gives the discretization order for the approximation of
the differential operators on the different levels of the multigrid.
For more details, see the variable DerivativesOrder.
For star-general stencils, the minimum is set to 2.
Name StencilPrimitiveCoordinates
Section Mesh::Derivatives
Type logical
This variable controls the method for generating the stencil weights for the Laplacian.
For the gradient, the weights are always computed for primitive coordinates.
If set to yes, primitive coordinates are used for the polynomials and the right-hand side
of the Laplacian is computed using the metric tensor and the trace of the Hessian.
If set to no, Cartesian coordinates are used for the polynomials and the right-hand side
of the Laplacian reduces to the Cartesian case.
For some non-orthogonal grids, using primitve coordinates is necessary becasuse the polynomials
become linearly dependent, thus the corresponding matrix cannot be inverted. For some curvilinear
coordinate systems, using Cartesian coordinates is more accurate.
By default, use primitve coordinates except for curvilinear meshes.