45 if (
mesh().isInternalFace(faceI))
56 faceI -
mesh().nInternalFaces()
71 const bool moveInternalFaces
76 for (
const label facei : facesToMove)
78 if (moveInternalFaces || !isInternalOrProcessorFace(facei))
80 marker.set(
mesh().faces()[facei]);
98Foam::pointSmoother::pointSmoother
106 for (
const auto&
pp :
mesh.boundaryMesh())
108 if (isA<processorPolyPatch>(pp))
110 processorPatchIDs_.insert(pp.index());
121 const word& pointSmootherType,
122 const polyMesh&
mesh,
126 Info<<
"Selecting pointSmoother type " << pointSmootherType <<
endl;
128 auto* ctorPtr = dictionaryConstructorTable(pointSmootherType);
137 *dictionaryConstructorTablePtr_
148 const polyMesh&
mesh,
170 const bool correctBCs
183 pointDisplacement.
ref()
199 pointDisplacement().
mesh()
221 tmp<scalarField> tortho
257 const auto& faceOrtho = tfaceOrtho();
261 auto& ortho = tortho.ref();
268 auto& o = ortho[own[facei]];
269 o =
min(o, faceOrtho[facei]);
273 auto& o = ortho[nei[facei]];
274 o =
min(o, faceOrtho[facei]);
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Internal & ref(const bool updateAccessTime=true)
Same as internalFieldRef().
static FOAM_NO_DANGLING_REFERENCE const pointConstraints & New(const pointMesh &mesh, Args &&... args)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void set(const bitSet &bitset)
Set specified bits from another bitset.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
void constrainDisplacement(pointVectorField &displacement, const bool overrideValue=false) const
Apply boundary conditions (single-patch constraints),.
Abstract base class for point smoothing methods. Handles parallel communication via reset and average...
virtual void calculate(const labelList &facesToMove, const pointField &oldPoints, const pointField ¤tPoints, const pointField &faceCentres, const vectorField &faceAreas, const pointField &cellCentres, const scalarField &cellVolumes, vectorField &pointDisplacement) const =0
Calculate the point displacement.
bool isInternalOrProcessorFace(const label faceI) const
Test if the given face is internal or on a processor boundary.
static autoPtr< pointSmoother > New(const word &pointSmootherType, const polyMesh &mesh, const dictionary &dict)
Construct given type.
bitSet pointsToMove(const labelList &facesToMove, const bool moveInternalFaces) const
Get list of the points to be moved.
virtual tmp< scalarField > cellQuality(const pointField &points, const pointField &faceCentres, const vectorField &faceAreas, const pointField &cellCentres, const scalarField &cellVolumes) const
Check element quality: 1 = best, 0 = invalid. Topology from mesh, point locations supplied....
const polyMesh & mesh() const noexcept
Access the mesh.
void update(const labelList &facesToMove, const pointField &oldPoints, const pointField ¤tPoints, const pointField &faceCentres, const vectorField &faceAreas, const pointField &cellCentres, const scalarField &cellVolumes, pointVectorField &pointDisplacement, const bool correctBCs=true) const
Update the point displacements and apply constraints.
virtual tmp< scalarField > faceQuality(const pointField &points, const pointField &faceCentres, const vectorField &faceAreas, const pointField &cellCentres, const scalarField &cellVolumes) const
Check element quality: 1 = best, 0 = invalid. (also negative?) Topology from mesh,...
Mesh consisting of general polyhedral cells.
virtual const labelList & faceOwner() const
Return face owner.
virtual const labelList & faceNeighbour() const
Return face neighbour.
label nInternalFaces() const noexcept
Number of internal faces.
A class for managing temporary objects.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere).
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Field< vector > vectorField
Specialisation of Field<T> for vector.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
vectorField pointField
pointField is a vectorField.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
#define forAll(list, i)
Loop across all elements in list.