Go to the documentation of this file.
48 <<
"Discretisation scheme not specified\n\n"
50 << MeshConstructorTablePtr_->sortedToc()
54 const word schemeName(schemeData);
61 auto cstrIter = MeshConstructorTablePtr_->cfind(schemeName);
63 if (!cstrIter.found())
70 *MeshConstructorTablePtr_
74 return cstrIter()(
mesh, schemeData);
90 <<
"Discretisation scheme not specified"
92 <<
"Valid schemes are :" <<
endl
93 << MeshConstructorTablePtr_->sortedToc()
97 const word schemeName(schemeData);
102 <<
"Discretisation scheme = " << schemeName <<
endl;
105 auto cstrIter = MeshFluxConstructorTablePtr_->cfind(schemeName);
107 if (!cstrIter.found())
114 *MeshFluxConstructorTablePtr_
118 return cstrIter()(
mesh, faceFlux, schemeData);
139 <<
" from cells to faces without explicit correction"
160 "interpolate("+vf.name()+
')',
174 sfi[fi] =
lambda[fi]*vfi[P[fi]] +
y[fi]*vfi[
N[fi]];
207 template<
class SFType>
230 <<
" from cells to faces without explicit correction"
239 const Field<Type>& vfi = vf;
242 const fvMesh&
mesh = vf.mesh();
246 tmp<GeometricField<RetType, fvsPatchField, surfaceMesh>> tsf
248 new GeometricField<RetType, fvsPatchField, surfaceMesh>
252 "interpolate("+vf.name()+
')',
257 Sf.dimensions()*vf.dimensions()
260 GeometricField<RetType, fvsPatchField, surfaceMesh>& sf = tsf.ref();
262 Field<RetType>& sfi = sf.primitiveFieldRef();
264 const typename SFType::Internal& Sfi = Sf();
266 for (
label fi=0; fi<P.size(); fi++)
268 sfi[fi] = Sfi[fi] & (
lambda[fi]*(vfi[P[fi]] - vfi[
N[fi]]) + vfi[
N[fi]]);
273 typename GeometricField<RetType, fvsPatchField, surfaceMesh>::
274 Boundary& sfbf = sf.boundaryFieldRef();
279 const typename SFType::Patch& pSf = Sf.boundaryField()[
pi];
280 fvsPatchField<RetType>& psf = sfbf[
pi];
339 <<
" from cells to faces"
353 tsf.ref().oriented() = Sf.oriented();
377 const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
391 return tSfDotinterpVf;
408 <<
" from cells to faces"
int debug
Static debugging option.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static tmp< surfaceInterpolationScheme< Type > > New(const fvMesh &mesh, Istream &schemeData)
Return new tmp interpolation scheme.
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.
#define InfoInFunction
Report an information message using Foam::Info.
A class for handling words, derived from Foam::string.
void clear() const noexcept
static tmp< GeometricField< typename innerProduct< vector, Type >::type, fvsPatchField, surfaceMesh > > dotInterpolate(const surfaceVectorField &Sf, const GeometricField< Type, fvPatchField, volMesh > &tvf)
Interpolate field onto faces.
A class for managing temporary objects.
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.
bool eof() const
Return true if end of input seen.
fvsPatchField< scalar > fvsPatchScalarField
Mesh data needed to do the Finite Volume discretisation.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix.
#define forAll(list, i)
Loop across all elements in list.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Generic templated field type.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
Mesh data needed to do the Finite Volume discretisation.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field.
constexpr scalar pi(M_PI)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Internal & ref(const bool updateAccessTime=true)
Return a reference to the dimensioned internal field.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
Abstract base class for surface interpolation schemes.
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
const Vector< label > N(dict.get< Vector< label >>("N"))
UList< label > labelUList
A UList of labels.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
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.
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) - 2 >::type type
const Boundary & boundaryField() const
Return const-reference to the boundary field.