41 #ifndef clippedLinear_H 42 #define clippedLinear_H 68 static scalar calcWfLimit(scalar cellSizeRatio)
70 if (cellSizeRatio <= 0 || cellSizeRatio > 1)
73 <<
"Given cellSizeRatio of " << cellSizeRatio
74 <<
" is not between 0 and 1" 78 return cellSizeRatio/(1.0 + cellSizeRatio);
98 wfLimit_(calcWfLimit(cellSizeRatio))
105 wfLimit_(calcWfLimit(readScalar(is)))
117 wfLimit_(calcWfLimit(readScalar(is)))
133 mesh.surfaceInterpolation::weights()
145 "clippedLinearWeights",
154 tclippedLinearWeights.
ref();
156 clippedLinearWeights.primitiveFieldRef() =
160 clippedLinearWeights.boundaryFieldRef();
175 return tclippedLinearWeights;
const Internal::FieldType & primitiveField() const noexcept
Return a const-reference to the internal field values.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
const dimensionSet dimless
Dimensionless.
const fvMesh & mesh() const
Return mesh reference.
const Time & time() const
Return the top-level database.
#define forAll(list, i)
Loop across all elements in list.
TypeName("clippedLinear")
Runtime type information.
clippedLinear(const fvMesh &mesh, const scalar cellSizeRatio)
Construct from mesh and cellSizeRatio.
Central-differencing interpolation scheme using clipped-weights to improve stability on meshes with v...
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
Mesh data needed to do the Finite Volume discretisation.
Internal & ref(const bool updateAccessTime=true)
Same as internalFieldRef()
const fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
A class for managing temporary objects.
tmp< surfaceScalarField > weights(const GeometricField< Type, fvPatchField, volMesh > &) const
Return the interpolation weighting factors.
Defines the attributes of an object for which implicit objectRegistry management is supported...
Abstract base class for surface interpolation schemes.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
dimensionSet clamp(const dimensionSet &a, const dimensionSet &range)