48 #ifndef Foam_leastSquaresEdgeInterpolation_H 49 #define Foam_leastSquaresEdgeInterpolation_H 127 return this->
mesh().edgeInterpolation::weights();
133 tmp<GeometricField<Type, faePatchField, edgeMesh>>
151 const GradFieldType& gradAf = tgradAf.
cref();
155 FieldType& Pi = tPi.ref();
159 const label nFaces = pointFaceAddr[i].
size();
161 FieldType Pij(nFaces);
164 for (label facei = 0; facei < nFaces; ++facei)
166 const label j = pointFaceAddr[i][facei];
172 Pij[facei] = af[j] + (dPC[facei] & gradAf[j]);
178 Pi[i] =
sum(Pij/magdPC)/
sum(scalar(1)/magdPC);
188 "interpolate(" + af.
name() +
')',
195 EdgeFieldType& interp = tinterp.ref();
196 FieldType& interpEdges = interp.primitiveFieldRef();
203 for (label edgei = 0; edgei < nInternalEdges; ++edgei)
209 Pi[faEdges[edgei].start()]
210 + Pi[faEdges[edgei].end()]
216 forAll(interp.boundaryField(), patchi)
218 interp.boundaryFieldRef()[patchi] = af.
boundaryField()[patchi];
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Graphite solid properties.
void size(const label n)
Older name for setAddressableSize.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
TypeName("leastSquares")
Runtime type information.
List< edge > edgeList
List of edge.
const word & name() const noexcept
Return the object name.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Abstract base class for edge interpolation schemes.
const T & cref() const
Return const reference to the object or to the contents of a (non-null) managed pointer.
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &) const
Return the edge-interpolate of the given face field.
virtual const pointField & points() const
Return raw points.
#define forAll(list, i)
Loop across all elements in list.
Generic templated field type.
const objectRegistry & db() const noexcept
Return the local objectRegistry.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
Second-order gradient scheme using least-squares.
leastSquaresEdgeInterpolation(const leastSquaresEdgeInterpolation &)=delete
No copy construct.
label nInternalEdges() const
Internal edges using 0,1 or 2 boundary points.
Least-squares edge interpolation scheme class, from face centers to points then from points to edges...
const Mesh & mesh() const noexcept
Return mesh.
tmp< edgeScalarField > weights(const GeometricField< Type, faPatchField, areaMesh > &) const
Return the interpolation weighting factors.
const fileName & instance() const noexcept
Read access to instance path component.
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
const faMesh & mesh() const
Return mesh reference.
const labelListList & pointFaces() const
void clear() const noexcept
If object pointer points to valid object: delete object and set pointer to nullptr.
A class for managing temporary objects.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
const dimensionSet & dimensions() const noexcept
Return dimensions.
static constexpr const zero Zero
Global zero (0)
void operator=(const leastSquaresEdgeInterpolation &)=delete
No copy assignment.