42 return a.first() >
b.first() ? a :
b;
74 isNbrPatchMesh_(false),
75 nPositionalErrors_(0),
76 maxPositionalErrorSqr_(-vGreat),
77 maxPositionalErrorReceivePosition_(
point::uniform(NaN))
96 ? nonConformalCyclicPoly_.nbrPatchIndex()
98 ].LagrangianPatch::mesh();
121 patchMesh.
sub(
mesh.receivePatchFacePtr_());
123 patchMesh.
sub(
mesh.receivePositionPtr_());
127 nonConformalCyclicPoly_.nbrPatch().origPatch();
150 const scalar positionalErrorSqr =
169 sqr(positionalErrorSqr)
173 nPositionalErrors_ ++;
175 if (positionalErrorSqr > maxPositionalErrorSqr_)
177 maxPositionalErrorSqr_ = positionalErrorSqr;
178 maxPositionalErrorReceivePosition_ = receivePosition[i];
188 isNbrPatchMesh_ =
true;
191 receivePatchFace = -1;
201 isNbrPatchMesh_ =
false;
204 const label nPositionalErrors =
207 if (nPositionalErrors != 0)
209 const label nTransfers =
217 maxPositionalErrorSqr_,
218 maxPositionalErrorReceivePosition_
223 maxPositionalErrorSqr_ = maxPositionalErrorInfo.
first();
224 maxPositionalErrorReceivePosition_ = maxPositionalErrorInfo.
second();
227 << nPositionalErrors <<
"/" << nTransfers <<
" elements "
228 <<
"transferring to patch "
229 << nonConformalCyclicPoly_.nbrPatch().name()
230 <<
" were not accurately located. The largest positional error "
231 <<
"was " <<
sqrt(maxPositionalErrorSqr_)
232 <<
" from " << maxPositionalErrorReceivePosition_ <<
"."
236 nPositionalErrors_ = 0;
237 maxPositionalErrorSqr_ = -vGreat;
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Boundary part of a Lagrangian mesh. Just a list of Lagrangian patches with some added convenience fun...
Class containing Lagrangian geometry and topology.
Base class for Lagrangian patches.
virtual void partition() const
Update for mesh changes.
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
word sub(const word &fieldName) const
Return the name of a field corresponding to this sub-mesh.
label start() const
Return start.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
Pre-declare related SubField type.
A 2-tuple for storing two objects of different types.
const Type2 & second() const
Return second.
const Type1 & first() const
Return first.
static Form uniform(const Cmpt &s)
Return a VectorSpace with all elements = s.
const polyMesh & poly() const
Return reference to polyMesh.
Mesh object that implements searches within the local cells and faces.
static const meshSearch & New(const polyMesh &mesh, const pointInCellShapes=pointInCellShapes::tets)
Lookup or construct from mesh and cell decomposition option.
virtual const labelList & faceOwner() const
Return face owner.
A patch is a list of labels that address the faces in the global face list.
const vectorField::subField faceAreas() const
Return face areas.
label start() const
Return start label of this patch in the polyMesh face list.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define WarningInFunction
Report a warning using Foam::Warning.
point position(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label facei, const label faceTrii, const scalar stepFraction)
Return the position given the coordinates and tet topology.
bool locate(const polyMesh &mesh, const point &position, barycentric &coordinates, label &celli, label &facei, label &faceTrii, const scalar stepFraction, const string &debugPrefix=NullObjectRef< string >())
Initialise the location at the given position. Returns whether or not a.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
To & refCast(From &r)
Reference type cast template function.
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
tmp< DimensionedField< scalar, GeoMesh, Field > > magSqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)
const Type & operator()(const Type &a, const Type &b) const