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",
240 tmp<surfaceScalarField>
243 const GeometricField<Type, fvPatchField, volMesh>& vf
249 bf*tScheme1_().weights(vf)
250 + (scalar(1) - bf)*tScheme2_().weights(vf);
256 tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
259 const GeometricField<Type, fvPatchField, volMesh>& vf
265 bf*tScheme1_().interpolate(vf)
266 + (scalar(1) - bf)*tScheme2_().interpolate(vf);
273 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.
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
const dimensionSet dimVolume(pow3(dimLength))
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.
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.
Represents 0/1 range or concept. Used for tagged dispatch or clamping.
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.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf) const
Return the face-interpolate of the given cell field.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
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.
tmp< surfaceScalarField > weights(const GeometricField< Type, fvPatchField, volMesh > &vf) const
Return the interpolation weighting factors.
dimensionSet clamp(const dimensionSet &a, const dimensionSet &range)
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 ...