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_);
90 cellSizeRatio_(cellSizeRatio)
131 mesh.surfaceInterpolation::weights()
139 "clippedLinearWeights",
145 tclippedLinearWeights.
ref();
148 max(
min(cdWeights.primitiveField(), 1 - wfLimit_), wfLimit_);
155 if (clwbf[
patchi].coupled())
162 cdWeights.boundaryField()[
patchi],
174 return tclippedLinearWeights;
#define forAll(list, i)
Loop across all elements in list.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
T & ref() const
Return non-const reference or generate a fatal error.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
static tmp< GeometricField< scalar, fvsPatchField, surfaceMesh > > New(const word &name, const Internal &, const PtrList< fvsPatchField< scalar >> &)
Return a temporary field constructed from name,.
const dimensionSet dimless
const fvMesh & mesh() const
Return mesh reference.
TypeName("clippedLinear")
Runtime type information.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
clippedLinear(const fvMesh &mesh, const scalar cellSizeRatio)
Construct from mesh and cellSizeRatio.
Centred interpolation interpolation scheme using clipped-weights to improve stability on meshes with ...
Internal::FieldType & primitiveFieldRef()
Return a reference to the internal field.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
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.
void operator=(const clippedLinear &)=delete
Disallow default bitwise assignment.
Abstract base class for surface interpolation schemes.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.