73 #include "surfaceInterpolate.H" 87 public surfaceInterpolationScheme<Type>,
114 void operator=(
const CoBlended&) =
delete;
135 Co1_(readScalar(is)),
140 Co2_(readScalar(is)),
150 if (Co1_ < 0 || Co2_ < 0 || Co1_ >= Co2_)
153 <<
"coefficients = " << Co1_ <<
" and " << Co2_
154 <<
" should be > 0 and Co2 > Co1" 168 surfaceInterpolationScheme<Type>(
mesh),
169 Co1_(readScalar(is)),
172 surfaceInterpolationScheme<Type>::
New(
mesh, faceFlux, is)
174 Co2_(readScalar(is)),
177 surfaceInterpolationScheme<Type>::
New(
mesh, faceFlux, is)
181 if (Co1_ < 0 || Co2_ < 0 || Co1_ >= Co2_)
184 <<
"coefficients = " << Co1_ <<
" and " << Co2_
185 <<
" should be > 0 and Co2 > Co1" 196 const GeometricField<Type, fvPatchField, volMesh>& vf
200 tmp<surfaceScalarField> tUflux = faceFlux_;
207 mesh.objectRegistry::template lookupObject<volScalarField>
215 <<
"dimensions of faceFlux are not correct" 219 return tmp<surfaceScalarField>
223 vf.name() +
"BlendingFactor",
253 bf*tScheme1_().weights(vf)
254 + (scalar(1) - bf)*tScheme2_().weights(vf);
260 tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
263 const GeometricField<Type, fvPatchField, volMesh>& vf
269 bf*tScheme1_().interpolate(vf)
270 + (scalar(1) - bf)*tScheme2_().interpolate(vf);
277 return tScheme1_().corrected() || tScheme2_().corrected();
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
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.
virtual tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > correction(const GeometricField< Type, fvPatchField, volMesh > &vf) const
Return the explicit correction to the face-interpolate.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
const fvMesh & mesh() const
Return mesh reference.
const Time & time() const
Return the top-level database.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
A class for handling words, derived from Foam::string.
static tmp< surfaceInterpolationScheme< Type > > New(const fvMesh &mesh, Istream &schemeData)
Return new tmp interpolation scheme.
Base class for blended schemes to provide access to the blending factor surface field.
Two-scheme Courant number based blending differencing scheme.
TypeName("CoBlended")
Runtime type information.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
const dimensionSet dimDensity
virtual tmp< surfaceScalarField > blendingFactor(const GeometricField< Type, fvPatchField, volMesh > &vf) const
Return the face-based blending factor.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Mesh data needed to do the Finite Volume discretisation.
virtual bool corrected() const
Return true if this scheme uses an explicit correction.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf) const
Return the face-interpolate of the given cell field.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Abstract base class for surface interpolation schemes.
virtual const surfaceScalarField & deltaCoeffs() const
Return reference to cell-centre difference coefficients.
dimensionedScalar deltaT() const
Return time step.
const dimensionSet dimArea(sqr(dimLength))
tmp< surfaceScalarField > weights(const GeometricField< Type, fvPatchField, volMesh > &vf) const
Return the interpolation weighting factors.
const dimensionSet & dimensions() const noexcept
Return dimensions.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
const dimensionSet dimVelocity