fieldSmoother.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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2015 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::fieldSmoother
28
29Description
30 Utility functions for mesh motion solvers
31
32SourceFiles
33 fieldSmoother.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef fieldSmoother_H
38#define fieldSmoother_H
39
40#include "meshRefinement.H"
41
42// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44namespace Foam
45{
46
47/*---------------------------------------------------------------------------*\
48 Class fieldSmoother Declaration
49\*---------------------------------------------------------------------------*/
51class fieldSmoother
52{
53 // Private data
54
55 //- Reference to the poly mesh
56 const polyMesh& mesh_;
57
58
59 // Private Member Functions
60
61 //- No copy construct
62 fieldSmoother(const fieldSmoother&) = delete;
63
64 //- No copy assignment
65 void operator=(const fieldSmoother&) = delete;
66
67
68public:
69
70 // Run-time type information
71 TypeName("fieldSmoother");
72
73
74 // Constructors
75
76 //- Construct from a polyMesh
77 fieldSmoother(const polyMesh&);
78
79
80 //- Destructor
81 virtual ~fieldSmoother();
82
83
84 // Member Functions
85
86 //- Smooth interior normals
87 void smoothNormals
88 (
89 const label nIter,
90 const bitSet& isMeshMasterPoint,
91 const bitSet& isMeshMasterEdge,
92 const labelList& fixedPoints,
93 pointVectorField& normals
94 ) const;
95
96 //- Smooth patch normals
98 (
99 const label nIter,
100 const bitSet& isPatchMasterPoint,
101 const bitSet& isPatchMasterEdge,
102 const indirectPrimitivePatch& adaptPatch,
103 pointField& normals
104 ) const;
105
106 //- Smooth a scalar field towards, but not beyond, a minimum value
107 template <class Type>
108 void minSmoothField
109 (
110 const label nIter,
111 const bitSet& isPatchMasterPoint,
112 const bitSet& isPatchMasterEdge,
113 const indirectPrimitivePatch& adaptPatch,
114 const scalarField& fieldMin,
116 ) const;
117
118 //- Smooth and then un-smooth a displacement
120 (
121 const label nIter,
122 const bitSet& isMeshMasterPoint,
123 const bitSet& isMeshMasterEdge,
124 const bitSet& isSmoothable,
125 vectorField& displacement
126 ) const;
127};
128
129// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130
131} // End namespace Foam
132
133// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134
135#ifdef NoRepository
136# include "fieldSmootherTemplates.C"
137#endif
138
139// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141#endif
142
143// ************************************************************************* //
A list of faces which address into the list of points.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Definition: bitSet.H:66
Utility functions for mesh motion solvers.
Definition: fieldSmoother.H:51
void smoothLambdaMuDisplacement(const label nIter, const bitSet &isMeshMasterPoint, const bitSet &isMeshMasterEdge, const bitSet &isSmoothable, vectorField &displacement) const
Smooth and then un-smooth a displacement.
virtual ~fieldSmoother()
Destructor.
Definition: fieldSmoother.C:48
void smoothNormals(const label nIter, const bitSet &isMeshMasterPoint, const bitSet &isMeshMasterEdge, const labelList &fixedPoints, pointVectorField &normals) const
Smooth interior normals.
Definition: fieldSmoother.C:55
void smoothPatchNormals(const label nIter, const bitSet &isPatchMasterPoint, const bitSet &isPatchMasterEdge, const indirectPrimitivePatch &adaptPatch, pointField &normals) const
Smooth patch normals.
void minSmoothField(const label nIter, const bitSet &isPatchMasterPoint, const bitSet &isPatchMasterEdge, const indirectPrimitivePatch &adaptPatch, const scalarField &fieldMin, Field< Type > &field) const
Smooth a scalar field towards, but not beyond, a minimum value.
TypeName("fieldSmoother")
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
rDeltaTY field()
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73