47 <<
"constructing edgeInterpolationScheme<Type>" 54 <<
"Discretisation scheme not specified" <<
nl <<
nl 55 <<
"Valid schemes are :" <<
nl 56 << MeshConstructorTablePtr_->sortedToc()
60 const word schemeName(schemeData);
62 auto* ctorPtr = MeshConstructorTable(schemeName);
71 *MeshConstructorTablePtr_
75 return ctorPtr(
mesh, schemeData);
91 <<
"constructing edgeInterpolationScheme<Type>" 98 <<
"Discretisation scheme not specified" 100 <<
"Valid schemes are :" <<
endl 101 << MeshConstructorTablePtr_->sortedToc()
105 const word schemeName(schemeData);
107 auto* ctorPtr = MeshFluxConstructorTable(schemeName);
116 *MeshFluxConstructorTablePtr_
120 return ctorPtr(
mesh, faceFlux, schemeData);
148 <<
" from areas to edges " 149 "without explicit correction" 170 "interpolate("+vf.
name()+
')',
182 for (label fi=0; fi<P.
size(); ++fi)
186 const tensor& Te = curT[0];
187 const tensor& TP = curT[1];
188 const tensor& TN = curT[2];
217 for (label i=0; i<size; ++i)
220 mesh.edgeTransformTensors()[start + i];
222 const tensor& Te = curT[0];
223 const tensor& TP = curT[1];
224 const tensor& TN = curT[2];
266 <<
" from area to edges " 267 "without explicit correction" 280 tmp<GeometricField<Type, faePatchField, edgeMesh>> tsf
282 new GeometricField<Type, faePatchField, edgeMesh>
286 "interpolate("+vf.
name()+
')',
294 GeometricField<Type, faePatchField, edgeMesh>& sf = tsf.ref();
296 Field<Type>& sfi = sf.primitiveFieldRef();
298 for (label eI = 0; eI < P.size(); ++eI)
302 const tensor& Te = curT[0];
303 const tensor& TP = curT[1];
304 const tensor& TN = curT[2];
326 label size = vfb[
pi].patch().size();
327 label start = vfb[
pi].patch().start();
329 Field<Type> pOwnVf(vfb[
pi].patchInternalField());
330 Field<Type> pNgbVf(vfb[
pi].patchNeighbourField());
332 Field<Type>& pSf = sf.boundaryFieldRef()[
pi];
334 for (label i=0; i<size; ++i)
337 mesh.edgeTransformTensors()[start + i];
339 const tensor& Te = curT[0];
340 const tensor& TP = curT[1];
341 const tensor& TN = curT[2];
348 + (1 - pLambda[i])*
transform(TN, pNgbVf[i])
382 <<
" from area to edges " 383 "without explicit correction" 396 tmp<GeometricField<Type, faePatchField, edgeMesh>> tsf
398 new GeometricField<Type, faePatchField, edgeMesh>
402 "interpolate("+vf.
name()+
')',
410 GeometricField<Type, faePatchField, edgeMesh>& sf = tsf.ref();
412 Field<Type>& sfi = sf.primitiveFieldRef();
414 for (label eI = 0; eI < P.size(); ++eI)
416 sfi[eI] =
lambda[eI]*vfi[P[eI]] + (1 -
lambda[eI])*vfi[
N[eI]];
428 tsf.ref().boundaryFieldRef()[
pi] =
457 <<
" from areas to edges" 461 tmp<GeometricField<Type, faePatchField, edgeMesh>> tsf =
486 <<
" from area to edges " 490 tmp<GeometricField<Type, faePatchField, edgeMesh>> tsf =
491 euclidianInterpolate(vf, weights(vf));
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix by subtracting the matrix multiplied by the current fi...
static tmp< GeometricField< Type, faePatchField, edgeMesh > > euclidianInterpolate(const GeometricField< Type, faPatchField, areaMesh > &, const tmp< edgeScalarField > &)
Return the euclidian edge-interpolate of the given area field.
void size(const label n)
Older name for setAddressableSize.
errorManipArg< error, int > exit(error &err, const int errNo=1)
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.
const Internal & internalField() const noexcept
Return a const-reference to the dimensioned internal field.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
constexpr char nl
The newline '\n' character (0x0a)
virtual ~edgeInterpolationScheme()
Ostream & endl(Ostream &os)
Add newline and flush stream.
UList< label > labelUList
A UList of labels.
static tmp< edgeInterpolationScheme< Type > > New(const faMesh &mesh, Istream &schemeData)
Return new tmp interpolation scheme.
#define forAll(list, i)
Loop across all elements in list.
Generic templated field type.
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const objectRegistry & db() const noexcept
Return the local objectRegistry.
constexpr scalar pi(M_PI)
GeometricField< scalar, faePatchField, edgeMesh > edgeScalarField
const Mesh & mesh() const noexcept
Return mesh.
int debug
Static debugging option.
faePatchField< scalar > faePatchScalarField
const fileName & instance() const noexcept
Read access to instance path component.
const Vector< label > N(dict.get< Vector< label >>("N"))
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &, const tmp< edgeScalarField > &, const tmp< edgeScalarField > &)
Return the face-interpolate of the given cell field.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
faePatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cove...
void clear() const noexcept
If object pointer points to valid object: delete object and set pointer to nullptr.
A class for managing temporary objects.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
Tensor of scalars, i.e. Tensor<scalar>.
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.
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.