45 if (
mesh().isInternalFace(faceI))
56 faceI -
mesh().nInternalFaces()
71 const bool moveInternalFaces
74 autoPtr<PackedBoolList> markerPtr
81 forAll(facesToMove, faceToMoveI)
83 const label faceI(facesToMove[faceToMoveI]);
85 if (moveInternalFaces || !isInternalOrProcessorFace(faceI))
87 const face& fPoints(
mesh().faces()[faceI]);
91 const label pointI(fPoints[fPointI]);
93 marker[pointI] =
true;
102 orEqOp<unsigned int>(),
112 Foam::pointSmoother::pointSmoother
122 if (isA<processorPolyPatch>(
pp))
124 processorPatchIDs_.
insert(
pp.index());
135 const word& pointSmootherType,
140 Info<<
"Selecting pointSmoother type " << pointSmootherType <<
endl;
142 auto cstrIter = dictionaryConstructorTablePtr_->find(pointSmootherType);
144 if (cstrIter == dictionaryConstructorTablePtr_->end())
147 <<
"Unknown " << typeName <<
" type " 148 << pointSmootherType <<
endl <<
endl 149 <<
"Valid " << typeName <<
" types are : " <<
endl 150 << dictionaryConstructorTablePtr_->sortedToc()
189 const bool correctBCs
202 pointDisplacement.
ref()
240 tmp<scalarField> tortho
276 const auto& faceOrtho = tfaceOrtho();
280 auto& ortho = tortho.
ref();
287 auto& o = ortho[own[facei]];
288 o =
min(o, faceOrtho[facei]);
292 auto& o = ortho[nei[facei]];
293 o =
min(o, faceOrtho[facei]);
const polyMesh & mesh() const
ITstream & lookup(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return an entry data stream. FatalIOError if not found, or not a stream. ...
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Abstract base class for point smoothing methods. Handles parallel communication via reset and average...
virtual const labelList & faceNeighbour() const
Return face neighbour.
static const pointConstraints & New(const pointMesh &mesh, Args &&... args)
Get existing or create MeshObject registered with typeName.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
void constrainDisplacement(pointVectorField &displacement, const bool overrideValue=false) const
Apply boundary conditions (single-patch constraints),.
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
#define forAll(list, i)
Loop across all elements in list.
vectorField pointField
pointField is a vectorField.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static autoPtr< pointSmoother > New(const word &pointSmootherType, const polyMesh &mesh, const dictionary &dict)
Construct given type.
virtual const labelList & faceOwner() const
Return face owner.
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.
label nInternalFaces() const noexcept
Number of internal faces.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
virtual ~pointSmoother()
Destructor.
autoPtr< PackedBoolList > pointsToMove(const labelList &facesToMove, const bool moveInternalFaces) const
Get a boolean list of the points to be moved.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
defineTypeNameAndDebug(combustionModel, 0)
bool isInternalOrProcessorFace(const label faceI) const
Test if the given face is internal or on a processor boundary.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Internal & ref(const bool updateAccessTime=true)
Same as internalFieldRef()
Field< vector > vectorField
Specialisation of Field<T> for vector.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Mesh consisting of general polyhedral cells.
List< label > labelList
A List of labels.
A class for managing temporary objects.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
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...
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
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, point locations supplied. Move to motionSolver level?