motionSmootherAlgo.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::motionSmootherAlgo
26 
27 Description
28  Given a displacement moves the mesh by scaling the displacement back
29  until there are no more mesh errors.
30 
31  Holds displacement field (read upon construction since need boundary
32  conditions) and scaling factor and optional patch number on which to
33  scale back displacement.
34 
35  E.g.
36  \verbatim
37  // Construct iterative mesh mover.
38  motionSmoother meshMover(mesh, labelList(1, patchI));
39 
40  // Set desired displacement:
41  meshMover.displacement() = ..
42 
43  for (label iter = 0; iter < maxIter; iter++)
44  {
45  if (meshMover.scaleMesh(true))
46  {
47  Info<< "Successfully moved mesh" << endl;
48  return true;
49  }
50  }
51  \endverbatim
52 
53 Note
54  - Shared points (parallel): a processor can have points which are part of
55  pp on another processor but have no pp itself (i.e. it has points
56  and/or edges but no faces of pp). Hence we have to be careful when e.g.
57  synchronising displacements that the value from the processor which has
58  faces of pp get priority. This is currently handled in setDisplacement
59  by resetting the internal displacement to zero on coupled points
60  that are coupled to patch points before doing anything
61  else. The combine operator used will give preference to non-zero
62  values.
63 
64  - Various routines take baffles. These are sets of boundary faces that
65  are treated as a single internal face. This is a hack used to apply
66  movement to internal faces.
67 
68  - Mesh constraints are looked up from the supplied dictionary. (uses
69  recursive lookup)
70 
71 SourceFiles
72  motionSmootherAlgo.C
73  motionSmootherAlgoTemplates.C
74 
75 \*---------------------------------------------------------------------------*/
76 
77 #ifndef motionSmootherAlgo_H
78 #define motionSmootherAlgo_H
79 
80 #include "pointFields.H"
81 #include "HashSet.H"
82 #include "PackedBoolList.H"
83 #include "indirectPrimitivePatch.H"
84 #include "className.H"
85 
86 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
87 
88 namespace Foam
89 {
90 
91 class polyMeshGeometry;
92 class faceSet;
93 
94 /*---------------------------------------------------------------------------*\
95  Class motionSmootherAlgo Declaration
96 \*---------------------------------------------------------------------------*/
97 
99 {
100  // Private class
101 
102  //- To synchronise displacements. We want max displacement since
103  // this is what is specified on pp and internal mesh will have
104  // zero displacement.
105  class maxMagEqOp
106  {
107 
108  public:
109 
110  void operator()(vector& x, const vector& y) const
111  {
112  for (direction i = 0; i < vector::nComponents; i++)
113  {
114  scalar magX = mag(x[i]);
115  scalar magY = mag(y[i]);
116 
117  if (magX < magY)
118  {
119  x[i] = y[i];
120  }
121  else if (magX == magY)
122  {
123  if (y[i] > x[i])
124  {
125  x[i] = y[i];
126  }
127  }
128  }
129  }
130  };
131 
132 
133  // Private data
134 
135  //- Reference to polyMesh. Non-const since we move mesh.
136  polyMesh& mesh_;
137 
138  //- Reference to pointMesh
139  pointMesh& pMesh_;
140 
141  //- Reference to face subset of all adaptPatchIDs
143 
144  //- Displacement field
146 
147  //- Scale factor for displacement
149 
150  //- Starting mesh position
152 
153 
154  // Internal data
155 
156  //- Indices of fixedValue patches that we're allowed to modify the
157  // displacement on.
159 
160  // Smoothing and checking parameters
162 
163  //- Is mesh point on boundary or not
165 
166  //- Is edge master (always except if on coupled boundary and on
167  // lower processor)
169 
170 
171  // Private Member Functions
172 
173  //- Average of connected points.
174  template<class Type>
176  (
178  const scalarField& edgeWeight
179  ) const;
180 
181  //- Average postion of connected points.
182  template<class Type>
184  (
186  const scalarField& edgeWeight
187  ) const;
188 
189  //- Check constraints
190  template<class Type>
191  static void checkConstraints
192  (
194  );
195 
196  //- Test synchronisation of generic field (not positions!) on points
197  template<class Type, class CombineOp>
198  void testSyncField
199  (
200  const Field<Type>&,
201  const CombineOp& cop,
202  const Type& zero,
203  const scalar maxMag
204  ) const;
205 
206  //- Test synchronisation of points
207  void testSyncPositions(const pointField&, const scalar maxMag) const;
208 
209  static void checkFld(const pointScalarField&);
210 
211  //- Get points used by given faces
212  labelHashSet getPoints(const labelHashSet&) const;
213 
214  //- Calculate per-edge weight
216 
217  //- Explicit smoothing and min on all affected internal points
218  void minSmooth
219  (
220  const scalarField& edgeWeights,
221  const PackedBoolList& isAffectedPoint,
222  const pointScalarField& fld,
223  pointScalarField& newFld
224  ) const;
225 
226  //- Same but only on selected points (usually patch points)
227  void minSmooth
228  (
229  const scalarField& edgeWeights,
230  const PackedBoolList& isAffectedPoint,
231  const labelList& meshPoints,
232  const pointScalarField& fld,
233  pointScalarField& newFld
234  ) const;
235 
236  //- Scale certain (internal) points of a field
237  void scaleField
238  (
239  const labelHashSet& pointLabels,
240  const scalar scale,
242  ) const;
243 
244  //- As above but points have to be in meshPoints as well
245  // (usually to scale patch points)
246  void scaleField
247  (
248  const labelList& meshPoints,
249  const labelHashSet& pointLabels,
250  const scalar scale,
252  ) const;
253 
254  //- Lower on internal points
255  void subtractField
256  (
257  const labelHashSet& pointLabels,
258  const scalar f,
260  ) const;
261 
262  //- As above but points have to be in meshPoints as well
263  // (usually to scale patch points)
264  void subtractField
265  (
266  const labelList& meshPoints,
267  const labelHashSet& pointLabels,
268  const scalar scale,
270  ) const;
271 
272  //- Helper function. Is point internal?
273  bool isInternalPoint(const label pointI) const;
274 
275  //- Given a set of faces that cause smoothing and a number of
276  // iterations determine the maximum set of points who are affected
277  // and the accordingly affected faces.
279  (
280  const label nPointIter,
281  const faceSet& wrongFaces,
282 
283  labelList& affectedFaces,
284  PackedBoolList& isAffectedPoint
285  ) const;
286 
287  //- Disallow default bitwise copy construct
289 
290  //- Disallow default bitwise assignment
291  void operator=(const motionSmootherAlgo&);
292 
293 
294 public:
295 
296  ClassName("motionSmootherAlgo");
297 
298  // Constructors
299 
300  //- Construct from mesh, patches to work on and smoothing parameters.
302  (
303  polyMesh&,
304  pointMesh&,
305  indirectPrimitivePatch& pp, // 'outside' points
306  pointVectorField& displacement,
307  pointScalarField& scale,
308  pointField& oldPoints,
309  const labelList& adaptPatchIDs, // patches forming 'outside'
310  const dictionary& paramDict
311  );
312 
313 
314  //- Destructor
316 
317 
318  // Member Functions
319 
320  // Access
321 
322  //- Reference to mesh
323  const polyMesh& mesh() const;
324 
325  //- Reference to pointMesh
326  const pointMesh& pMesh() const;
327 
328  //- Reference to patch
329  const indirectPrimitivePatch& patch() const;
330 
331  //- Patch labels that are being adapted
332  const labelList& adaptPatchIDs() const;
333 
334  const dictionary& paramDict() const;
335 
336  //- Return reference to the point motion displacement field
338  {
339  return displacement_;
340  }
341 
342  //- Return const reference to the point motion displacement field
343  const pointVectorField& pointDisplacement() const
344  {
345  return displacement_;
346  }
347 
348 
349  // Edit
350 
351  //- Take over existing mesh position.
352  void correct();
353 
354  //- Set patch fields on patchIDs to be consistent with
355  // all other boundary conditions
356  static void setDisplacementPatchFields
357  (
358  const labelList& patchIDs,
360  );
361 
362  //- Set patch fields on displacement to be consistent with
363  // internal values.
365 
366  //- Set displacement field from displacement on patch points.
367  // Modify provided displacement to be consistent with actual
368  // boundary conditions on displacement. Note: resets the
369  // displacement to be 0 on coupled patches beforehand
370  // to make sure shared points
371  // partially on pp (on some processors) and partially not
372  // (on other processors) get the value from pp.
373  static void setDisplacement
374  (
375  const labelList& patchIDs,
376  const indirectPrimitivePatch& pp,
377  pointField& patchDisp,
378  pointVectorField& displacement
379  );
380 
381  void setDisplacement(pointField& patchDisp);
382 
383  //- Special correctBoundaryConditions which evaluates fixedValue
384  // patches first so they get overwritten with any constraint
385  // bc's.
387 
388  //- Apply optional point constraint (2d correction)
389  void modifyMotionPoints(pointField& newPoints) const;
390 
391  //- Get the current points (oldPoints+scale*displacement)
392  tmp<pointField> curPoints() const;
393 
394  //- Set the errorReduction (by how much to scale the displacement
395  // at error locations) parameter. Returns the old value.
396  // Set to 0 (so revert to old mesh) grows out one cell layer
397  // from error faces.
398  scalar setErrorReduction(const scalar);
399 
400  //- Move mesh with given scale. Return true if mesh ok or has
401  // less than nAllow errors, false
402  // otherwise and locally update scale. Smoothmesh=false means only
403  // patch points get moved.
404  // Parallel ok (as long as displacement field is consistent
405  // across patches)
406  bool scaleMesh
407  (
408  labelList& checkFaces,
409  const bool smoothMesh = true,
410  const label nAllow = 0
411  );
412 
413  //- Move mesh (with baffles) with given scale.
414  bool scaleMesh
415  (
416  labelList& checkFaces,
417  const List<labelPair>& baffles,
418  const bool smoothMesh = true,
419  const label nAllow = 0
420  );
421 
422  //- Move mesh with externally provided mesh constraints
423  bool scaleMesh
424  (
425  labelList& checkFaces,
426  const List<labelPair>& baffles,
427  const dictionary& paramDict,
428  const dictionary& meshQualityDict,
429  const bool smoothMesh = true,
430  const label nAllow = 0
431  );
432 
433 
434  //- Update for new mesh geometry
435  void movePoints();
436 
437  //- Update for new mesh topology
438  void updateMesh();
439 
440 
441  //- Check mesh with mesh settings in dict. Collects incorrect faces
442  // in set. Returns true if one or more faces in error.
443  // Parallel ok.
444  static bool checkMesh
445  (
446  const bool report,
447  const polyMesh& mesh,
448  const dictionary& dict,
449  labelHashSet& wrongFaces
450  );
451 
452  //- Check (subset of mesh) with mesh settings in dict.
453  // Collects incorrect faces in set. Returns true if one
454  // or more faces in error. Parallel ok.
455  static bool checkMesh
456  (
457  const bool report,
458  const polyMesh& mesh,
459  const dictionary& dict,
460  const labelList& checkFaces,
461  labelHashSet& wrongFaces
462  );
463 
464  //- Check (subset of mesh including baffles) with mesh settings
465  // in dict. Collects incorrect faces in set. Returns true if one
466  // or more faces in error. Parallel ok.
467  static bool checkMesh
468  (
469  const bool report,
470  const polyMesh& mesh,
471  const dictionary& dict,
472  const labelList& checkFaces,
473  const List<labelPair>& baffles,
474  labelHashSet& wrongFaces
475  );
476 
477  //- Check part of mesh with mesh settings in dict.
478  // Collects incorrect faces in set. Returns true if one or
479  // more faces in error. Parallel ok.
480  static bool checkMesh
481  (
482  const bool report,
483  const dictionary& dict,
484  const polyMeshGeometry&,
485  const pointField&,
486  const labelList& checkFaces,
487  labelHashSet& wrongFaces
488  );
489 
490  //- Check part of mesh including baffles with mesh settings in dict.
491  // Collects incorrect faces in set. Returns true if one or
492  // more faces in error. Parallel ok.
493  static bool checkMesh
494  (
495  const bool report,
496  const dictionary& dict,
497  const polyMeshGeometry&,
498  const pointField&,
499  const labelList& checkFaces,
500  const List<labelPair>& baffles,
501  labelHashSet& wrongFaces
502  );
503 
504  // Helper functions to manipulate displacement vector.
505 
506  //- Fully explicit smoothing of fields (not positions)
507  // of internal points with varying diffusivity.
508  template<class Type>
509  void smooth
510  (
512  const scalarField& edgeWeight,
514  ) const;
515 };
516 
517 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
518 
519 } // End namespace Foam
520 
521 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
522 
523 #ifdef NoRepository
525 #endif
526 
527 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
528 
529 #endif
530 
531 // ************************************************************************* //
Foam::motionSmootherAlgo::avg
tmp< GeometricField< Type, pointPatchField, pointMesh > > avg(const GeometricField< Type, pointPatchField, pointMesh > &fld, const scalarField &edgeWeight) const
Average of connected points.
Foam::PackedBoolList
A bit-packed bool list.
Definition: PackedBoolList.H:63
Foam::motionSmootherAlgo::setErrorReduction
scalar setErrorReduction(const scalar)
Set the errorReduction (by how much to scale the displacement.
Definition: motionSmootherAlgo.C:719
Foam::motionSmootherAlgo::modifyMotionPoints
void modifyMotionPoints(pointField &newPoints) const
Apply optional point constraint (2d correction)
Definition: motionSmootherAlgo.C:659
Foam::motionSmootherAlgo::isInternalPoint_
PackedBoolList isInternalPoint_
Is mesh point on boundary or not.
Definition: motionSmootherAlgo.H:163
Foam::motionSmootherAlgo::getPoints
labelHashSet getPoints(const labelHashSet &) const
Get points used by given faces.
Definition: motionSmootherAlgo.C:94
Foam::motionSmootherAlgo::correctBoundaryConditions
void correctBoundaryConditions(pointVectorField &) const
Special correctBoundaryConditions which evaluates fixedValue.
Definition: motionSmootherAlgo.C:595
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::motionSmootherAlgo::ClassName
ClassName("motionSmootherAlgo")
Foam::motionSmootherAlgo::correct
void correct()
Take over existing mesh position.
Definition: motionSmootherAlgo.C:413
Foam::motionSmootherAlgo::updateMesh
void updateMesh()
Update for new mesh topology.
Definition: motionSmootherAlgo.C:1049
Foam::motionSmootherAlgo::patch
const indirectPrimitivePatch & patch() const
Reference to patch.
Definition: motionSmootherAlgo.C:395
Foam::motionSmootherAlgo::adaptPatchIDs
const labelList & adaptPatchIDs() const
Patch labels that are being adapted.
Definition: motionSmootherAlgo.C:401
Foam::motionSmootherAlgo::checkFld
static void checkFld(const pointScalarField &)
Definition: motionSmootherAlgo.C:75
Foam::motionSmootherAlgo::isMasterEdge_
PackedBoolList isMasterEdge_
Is edge master (always except if on coupled boundary and on.
Definition: motionSmootherAlgo.H:167
Foam::motionSmootherAlgo::curPoints
tmp< pointField > curPoints() const
Get the current points (oldPoints+scale*displacement)
Definition: motionSmootherAlgo.C:770
Foam::motionSmootherAlgo::avgPositions
tmp< GeometricField< Type, pointPatchField, pointMesh > > avgPositions(const GeometricField< Type, pointPatchField, pointMesh > &fld, const scalarField &edgeWeight) const
Average postion of connected points.
Foam::motionSmootherAlgo::testSyncField
void testSyncField(const Field< Type > &, const CombineOp &cop, const Type &zero, const scalar maxMag) const
Test synchronisation of generic field (not positions!) on points.
Definition: motionSmootherAlgoTemplates.C:263
Foam::motionSmootherAlgo::scaleMesh
bool scaleMesh(labelList &checkFaces, const bool smoothMesh=true, const label nAllow=0)
Move mesh with given scale. Return true if mesh ok or has.
Definition: motionSmootherAlgo.C:733
Foam::VectorSpace< Vector< scalar >, scalar, 3 >::nComponents
@ nComponents
Number of components in this vector space.
Definition: VectorSpace.H:88
Foam::faceSet
A list of face labels.
Definition: faceSet.H:48
Foam::motionSmootherAlgo::mesh_
polyMesh & mesh_
Reference to polyMesh. Non-const since we move mesh.
Definition: motionSmootherAlgo.H:135
Foam::motionSmootherAlgo::setDisplacementPatchFields
void setDisplacementPatchFields()
Set patch fields on displacement to be consistent with.
Definition: motionSmootherAlgo.C:485
Foam::mag
dimensioned< scalar > mag(const dimensioned< Type > &)
Foam::motionSmootherAlgo::operator=
void operator=(const motionSmootherAlgo &)
Disallow default bitwise assignment.
Foam::HashSet< label, Hash< label > >
Foam::motionSmootherAlgo::subtractField
void subtractField(const labelHashSet &pointLabels, const scalar f, pointScalarField &) const
Lower on internal points.
Definition: motionSmootherAlgo.C:245
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
motionSmootherAlgoTemplates.C
Foam::motionSmootherAlgo::oldPoints_
pointField & oldPoints_
Starting mesh position.
Definition: motionSmootherAlgo.H:150
Foam::motionSmootherAlgo::pMesh_
pointMesh & pMesh_
Reference to pointMesh.
Definition: motionSmootherAlgo.H:138
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::motionSmootherAlgo::~motionSmootherAlgo
~motionSmootherAlgo()
Destructor.
Definition: motionSmootherAlgo.C:377
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::motionSmootherAlgo
Given a displacement moves the mesh by scaling the displacement back until there are no more mesh err...
Definition: motionSmootherAlgo.H:97
Foam::motionSmootherAlgo::isInternalPoint
bool isInternalPoint(const label pointI) const
Helper function. Is point internal?
Definition: motionSmootherAlgo.C:285
PackedBoolList.H
Foam::motionSmootherAlgo::testSyncPositions
void testSyncPositions(const pointField &, const scalar maxMag) const
Test synchronisation of points.
Definition: motionSmootherAlgo.C:47
className.H
Macro definitions for declaring ClassName(), NamespaceName(), etc.
Foam::motionSmootherAlgo::checkConstraints
static void checkConstraints(GeometricField< Type, pointPatchField, pointMesh > &)
Check constraints.
Definition: motionSmootherAlgoTemplates.C:37
Foam::motionSmootherAlgo::pointDisplacement
const pointVectorField & pointDisplacement() const
Return const reference to the point motion displacement field.
Definition: motionSmootherAlgo.H:342
HashSet.H
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::motionSmootherAlgo::paramDict_
dictionary paramDict_
Definition: motionSmootherAlgo.H:160
fld
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Foam::motionSmootherAlgo::scale_
pointScalarField & scale_
Scale factor for displacement.
Definition: motionSmootherAlgo.H:147
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::pointMesh
Mesh representing a set of points created from polyMesh.
Definition: pointMesh.H:48
Foam::motionSmootherAlgo::motionSmootherAlgo
motionSmootherAlgo(const motionSmootherAlgo &)
Disallow default bitwise copy construct.
Foam::motionSmootherAlgo::paramDict
const dictionary & paramDict() const
Definition: motionSmootherAlgo.C:407
Foam::motionSmootherAlgo::displacement_
pointVectorField & displacement_
Displacement field.
Definition: motionSmootherAlgo.H:144
Foam::motionSmootherAlgo::getAffectedFacesAndPoints
void getAffectedFacesAndPoints(const label nPointIter, const faceSet &wrongFaces, labelList &affectedFaces, PackedBoolList &isAffectedPoint) const
Given a set of faces that cause smoothing and a number of.
Definition: motionSmootherAlgo.C:292
f
labelList f(nPoints)
Foam::motionSmootherAlgo::checkMesh
static bool checkMesh(const bool report, const polyMesh &mesh, const dictionary &dict, labelHashSet &wrongFaces)
Check mesh with mesh settings in dict. Collects incorrect faces.
Definition: motionSmootherAlgoCheck.C:415
Foam::Vector< scalar >
Foam::motionSmootherAlgo::maxMagEqOp::operator()
void operator()(vector &x, const vector &y) const
Definition: motionSmootherAlgo.H:109
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::motionSmootherAlgo::mesh
const polyMesh & mesh() const
Reference to mesh.
Definition: motionSmootherAlgo.C:383
Foam::motionSmootherAlgo::pointDisplacement
pointVectorField & pointDisplacement()
Return reference to the point motion displacement field.
Definition: motionSmootherAlgo.H:336
Foam::motionSmootherAlgo::setDisplacement
static void setDisplacement(const labelList &patchIDs, const indirectPrimitivePatch &pp, pointField &patchDisp, pointVectorField &displacement)
Set displacement field from displacement on patch points.
Definition: motionSmootherAlgo.C:492
Foam::motionSmootherAlgo::smooth
void smooth(const GeometricField< Type, pointPatchField, pointMesh > &fld, const scalarField &edgeWeight, GeometricField< Type, pointPatchField, pointMesh > &newFld) const
Fully explicit smoothing of fields (not positions)
Definition: motionSmootherAlgoTemplates.C:238
x
x
Definition: LISASMDCalcMethod2.H:52
Foam::motionSmootherAlgo::maxMagEqOp
To synchronise displacements. We want max displacement since.
Definition: motionSmootherAlgo.H:104
Foam::direction
unsigned char direction
Definition: direction.H:43
Foam::motionSmootherAlgo::movePoints
void movePoints()
Update for new mesh geometry.
Definition: motionSmootherAlgo.C:709
Foam::motionSmootherAlgo::pMesh
const pointMesh & pMesh() const
Reference to pointMesh.
Definition: motionSmootherAlgo.C:389
Foam::polyMeshGeometry
Updateable mesh geometry and checking routines.
Definition: polyMeshGeometry.H:52
Foam::motionSmootherAlgo::adaptPatchIDs_
const labelList adaptPatchIDs_
Indices of fixedValue patches that we're allowed to modify the.
Definition: motionSmootherAlgo.H:157
Foam::motionSmootherAlgo::scaleField
void scaleField(const labelHashSet &pointLabels, const scalar scale, pointScalarField &) const
Scale certain (internal) points of a field.
Definition: motionSmootherAlgo.C:203
Foam::motionSmootherAlgo::pp_
indirectPrimitivePatch & pp_
Reference to face subset of all adaptPatchIDs.
Definition: motionSmootherAlgo.H:141
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::motionSmootherAlgo::minSmooth
void minSmooth(const scalarField &edgeWeights, const PackedBoolList &isAffectedPoint, const pointScalarField &fld, pointScalarField &newFld) const
Explicit smoothing and min on all affected internal points.
Definition: motionSmootherAlgo.C:169
pointLabels
labelList pointLabels(nPoints, -1)
Foam::motionSmootherAlgo::calcEdgeWeights
tmp< scalarField > calcEdgeWeights(const pointField &) const
Calculate per-edge weight.
Definition: motionSmootherAlgo.C:115
pointFields.H
y
scalar y
Definition: LISASMDCalcMethod1.H:14
Foam::PrimitivePatch
A list of faces which address into the list of points.
Definition: PrimitivePatchTemplate.H:88
Foam::zero
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
Definition: zero.H:47