49 <<
"constructing edgeInterpolationScheme<Type>" 56 <<
"Discretisation scheme not specified" <<
nl <<
nl 57 <<
"Valid schemes are :" <<
nl 58 << MeshConstructorTablePtr_->sortedToc()
62 const word schemeName(schemeData);
64 auto* ctorPtr = MeshConstructorTable(schemeName);
73 *MeshConstructorTablePtr_
77 return ctorPtr(
mesh, schemeData);
93 <<
"constructing edgeInterpolationScheme<Type>" 100 <<
"Discretisation scheme not specified" 102 <<
"Valid schemes are :" <<
endl 103 << MeshConstructorTablePtr_->sortedToc()
107 const word schemeName(schemeData);
109 auto* ctorPtr = MeshFluxConstructorTable(schemeName);
118 *MeshFluxConstructorTablePtr_
122 return ctorPtr(
mesh, faceFlux, schemeData);
150 <<
" from areas to edges " 151 "without explicit correction" 172 "interpolate("+vf.
name()+
')',
184 for (label fi=0; fi<P.
size(); ++fi)
188 const tensor& Te = curT[0];
189 const tensor& TP = curT[1];
190 const tensor& TN = curT[2];
219 for (label i=0; i<size; ++i)
222 mesh.edgeTransformTensors()[start + i];
224 const tensor& Te = curT[0];
225 const tensor& TP = curT[1];
226 const tensor& TN = curT[2];
268 <<
" from area to edges " 269 "without explicit correction" 282 tmp<GeometricField<Type, faePatchField, edgeMesh>> tsf
284 new GeometricField<Type, faePatchField, edgeMesh>
288 "interpolate("+vf.
name()+
')',
296 GeometricField<Type, faePatchField, edgeMesh>& sf = tsf.ref();
298 Field<Type>& sfi = sf.primitiveFieldRef();
300 for (label eI = 0; eI < P.size(); ++eI)
304 const tensor& Te = curT[0];
305 const tensor& TP = curT[1];
306 const tensor& TN = curT[2];
328 label size = vfb[
pi].patch().size();
329 label start = vfb[
pi].patch().start();
331 Field<Type> pOwnVf(vfb[
pi].patchInternalField());
332 Field<Type> pNgbVf(vfb[
pi].patchNeighbourField());
334 Field<Type>& pSf = sf.boundaryFieldRef()[
pi];
336 for (label i=0; i<size; ++i)
339 mesh.edgeTransformTensors()[start + i];
341 const tensor& Te = curT[0];
342 const tensor& TP = curT[1];
343 const tensor& TN = curT[2];
350 + (1 - pLambda[i])*
transform(TN, pNgbVf[i])
384 <<
" from area to edges " 385 "without explicit correction" 398 tmp<GeometricField<Type, faePatchField, edgeMesh>> tsf
400 new GeometricField<Type, faePatchField, edgeMesh>
404 "interpolate("+vf.
name()+
')',
412 GeometricField<Type, faePatchField, edgeMesh>& sf = tsf.ref();
414 Field<Type>& sfi = sf.primitiveFieldRef();
416 for (label eI = 0; eI < P.size(); ++eI)
418 sfi[eI] =
lambda[eI]*vfi[P[eI]] + (1 -
lambda[eI])*vfi[
N[eI]];
430 tsf.ref().boundaryFieldRef()[
pi] =
459 <<
" from areas to edges" 463 tmp<GeometricField<Type, faePatchField, edgeMesh>> tsf =
488 <<
" from area to edges " 492 tmp<GeometricField<Type, faePatchField, edgeMesh>> tsf =
493 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.