36 #ifndef clippedLinear_H 37 #define clippedLinear_H 58 const scalar cellSizeRatio_;
66 if (cellSizeRatio_ <= 0 || cellSizeRatio_ > 1)
69 <<
"Given cellSizeRatio of " << cellSizeRatio_
70 <<
" is not between 0 and 1" 74 wfLimit_ = cellSizeRatio_/(1.0 + cellSizeRatio_);
94 cellSizeRatio_(cellSizeRatio)
135 mesh.surfaceInterpolation::weights()
145 "clippedLinearWeights",
154 tclippedLinearWeights.
ref();
156 clippedLinearWeights.primitiveFieldRef() =
157 max(
min(cdWeights.primitiveField(), 1 - wfLimit_), wfLimit_);
159 surfaceScalarField::Boundary& clwbf =
160 clippedLinearWeights.boundaryFieldRef();
164 if (clwbf[
patchi].coupled())
171 cdWeights.boundaryField()[
patchi],
183 return tclippedLinearWeights;
#define forAll(list, i)
Loop across all elements in list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#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)...
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
const fvMesh & mesh() const
Return mesh reference.
const Time & time() const
Return the top-level database.
TypeName("clippedLinear")
Runtime type information.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
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...
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
Internal & ref()
Return a reference to the dimensioned internal field.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Mesh data needed to do the Finite Volume discretisation.
A class for managing temporary objects.
tmp< surfaceScalarField > weights(const GeometricField< Type, fvPatchField, volMesh > &) const
Return the interpolation weighting factors.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Abstract base class for surface interpolation schemes.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.