directionalMeshWavePatchDistMethod.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) 2020 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::patchDistMethods::directionalMeshWave
28 
29 Description
30  Variant of \c meshWave distance-to-patch method.
31 
32  Ignores the component in the specified direction. Can be used e.g. to
33  calculate the distance in the z-direction only.
34 
35 Usage
36  Example of specification in \c fvSchemes.wallDist:
37  \verbatim
38  wallDist
39  {
40  // Mandatory entries (unmodifiable)
41  method directionalMeshWave;
42  n (0 0 1);
43 
44  // Optional (inherited) entries (unmodifiable)
45  ...
46  }
47  \endverbatim
48 
49  where the entries mean:
50  \table
51  Property | Description | Type | Req'd | Dflt
52  method | Method name: directionalMeshWave | word | yes | -
53  n | The direction component to ignore | vector | yes | -
54  \endtable
55 
56  The inherited entries are elaborated in:
57  - \link meshWavePatchDistMethod.H \endlink
58 
59 See also
60  Foam::wallDist
61  Foam::patchDistMethod::meshWave
62  Foam::patchDistMethod::Poisson
63  Foam::directionalWallPoint
64 
65 SourceFiles
66  directionalMeshWavePatchDistMethod.C
67 
68 \*---------------------------------------------------------------------------*/
69 
70 #ifndef directionalMeshWavePatchDistMethod_H
71 #define directionalMeshWavePatchDistMethod_H
72 
74 
75 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76 
77 namespace Foam
78 {
79 namespace patchDistMethods
80 {
81 
82 /*---------------------------------------------------------------------------*\
83  Class directionalMeshWave Declaration
84 \*---------------------------------------------------------------------------*/
85 
86 class directionalMeshWave
87 :
88  public meshWave
89 {
90  // Private Member Data
91 
92  //- The direction component to ignore
93  const vector n_;
94 
95  //- No copy construct
96  directionalMeshWave(const directionalMeshWave&) = delete;
97 
98  //- No copy assignment
99  void operator=(const directionalMeshWave&) = delete;
100 
101 
102 public:
103 
104  //- Runtime type information
105  TypeName("directionalMeshWave");
106 
107 
108  // Constructors
109 
110  //- Construct from coefficients dictionary, mesh
111  //- and fixed-value patch set
113  (
114  const dictionary& dict,
115  const fvMesh& mesh,
116  const labelHashSet& patchIDs
117  );
118 
119 
120  // Member Functions
121 
122  //- Correct the given distance-to-patch field
123  virtual bool correct(volScalarField& y);
124 
125  //- Correct the given distance-to-patch and normal-to-patch fields
126  virtual bool correct(volScalarField& y, volVectorField& n);
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace patchDistMethods
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
Foam::HashSet< label, Hash< label > >
n
label n
Definition: TABSMDCalcMethod2.H:31
Foam::patchDistMethods::directionalMeshWave::TypeName
TypeName("directionalMeshWave")
Runtime type information.
meshWavePatchDistMethod.H
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::vector
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:51
Foam::Vector< scalar >
Foam::patchDistMethods::directionalMeshWave::correct
virtual bool correct(volScalarField &y)
Correct the given distance-to-patch field.
Definition: directionalMeshWavePatchDistMethod.C:68
Foam::patchDistMethods::directionalMeshWave
Variant of meshWave distance-to-patch method.
Definition: directionalMeshWavePatchDistMethod.H:103
Foam::patchDistMethods::meshWave
Fast topological mesh-wave method for calculating the distance to nearest patch for all cells and bou...
Definition: meshWavePatchDistMethod.H:76
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::patchDistMethod::patchIDs
const labelHashSet & patchIDs() const
Return the patchIDs.
Definition: patchDistMethod.H:143
y
scalar y
Definition: LISASMDCalcMethod1.H:14