48 <<
"Discretisation scheme not specified\n\n" 50 << MeshConstructorTablePtr_->sortedToc()
54 const word schemeName(schemeData);
61 auto* ctorPtr = MeshConstructorTable(schemeName);
70 *MeshConstructorTablePtr_
74 return ctorPtr(
mesh, schemeData);
90 <<
"Discretisation scheme not specified" 92 <<
"Valid schemes are :" <<
endl 93 << MeshConstructorTablePtr_->sortedToc()
97 const word schemeName(schemeData);
104 auto* ctorPtr = MeshFluxConstructorTable(schemeName);
113 *MeshFluxConstructorTablePtr_
117 return ctorPtr(
mesh, faceFlux, schemeData);
138 <<
" from cells to faces without explicit correction" 159 "interpolate("+vf.
name()+
')',
171 for (label fi=0; fi<P.
size(); fi++)
173 sfi[fi] =
lambda[fi]*vfi[P[fi]] +
y[fi]*vfi[
N[fi]];
206 template<
class SFType>
229 <<
" from cells to faces without explicit correction" 238 const Field<Type>& vfi = vf;
245 tmp<GeometricField<RetType, fvsPatchField, surfaceMesh>> tsf
247 new GeometricField<RetType, fvsPatchField, surfaceMesh>
251 "interpolate("+vf.
name()+
')',
259 GeometricField<RetType, fvsPatchField, surfaceMesh>& sf = tsf.ref();
261 Field<RetType>& sfi = sf.primitiveFieldRef();
263 const typename SFType::Internal& Sfi = Sf.internalField();
265 for (label fi=0; fi<P.size(); fi++)
270 sfi[fi] = Sfi[fi] & (
lambda[fi]*(vfi[P[fi]] - vfi[
N[fi]]) + vfi[
N[fi]]);
275 typename GeometricField<RetType, fvsPatchField, surfaceMesh>::
276 Boundary& sfbf = sf.boundaryFieldRef();
281 const typename SFType::Patch& pSf = Sf.boundaryField()[
pi];
282 fvsPatchField<RetType>& psf = sfbf[
pi];
334 const GeometricField<Type, fvPatchField, volMesh>& vf
343 <<
" from cells to faces" 357 tsf.ref().oriented() = Sf.oriented();
381 const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
395 return tSfDotinterpVf;
412 <<
" from cells to faces" 416 tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsf
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix by subtracting the matrix multiplied by the current fi...
fvsPatchField< scalar > fvsPatchScalarField
void size(const label n)
Older name for setAddressableSize.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Mesh data needed to do the Finite Volume discretisation.
const word & name() const noexcept
Return the object name.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &tvf, const edgeScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
static tmp< GeometricField< typename innerProduct< vector, Type >::type, fvsPatchField, surfaceMesh > > dotInterpolate(const surfaceVectorField &Sf, const GeometricField< Type, fvPatchField, volMesh > &tvf)
Interpolate field onto faces.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Ostream & endl(Ostream &os)
Add newline and flush stream.
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
Generic templated field type.
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
A class for handling words, derived from Foam::string.
static tmp< surfaceInterpolationScheme< Type > > New(const fvMesh &mesh, Istream &schemeData)
Return new tmp interpolation scheme.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const objectRegistry & db() const noexcept
Return the local objectRegistry.
constexpr scalar pi(M_PI)
static tmp< GeometricField< typename innerProduct< typename SFType::value_type, Type >::type, fvsPatchField, surfaceMesh > > dotInterpolate(const SFType &Sf, const GeometricField< Type, fvPatchField, volMesh > &vf, const tmp< surfaceScalarField > &tlambdas)
Return the face-interpolate of the given cell field.
const Mesh & mesh() const noexcept
Return mesh.
int debug
Static debugging option.
dimensioned< Type > lerp(const dimensioned< Type > &a, const dimensioned< Type > &b, const scalar t)
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &, const tmp< surfaceScalarField > &, const tmp< surfaceScalarField > &)
Return the face-interpolate of the given cell field.
const fileName & instance() const noexcept
Read access to instance path component.
const Vector< label > N(dict.get< Vector< label >>("N"))
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Mesh data needed to do the Finite Volume discretisation.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
void clear() const noexcept
If object pointer points to valid object: delete object and set pointer to nullptr.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Defines the attributes of an object for which implicit objectRegistry management is supported...
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) - 2 >::type type
Abstract base class for surface interpolation schemes.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
bool eof() const noexcept
True if end of input seen.
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 ...
#define InfoInFunction
Report an information message using Foam::Info.