Loading...
Searching...
No Matches
meshWaveAddressingPatchDistMethod.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) 2023 OpenCFD Ltd.
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::patchDistMethods::meshWaveAddressing
28
29Description
30 Variant of patchDistMethods::meshWave that stores nearest-wall addressing
31 instead of directly transporting wall information.
32
33 Example of the wallDist specification in fvSchemes:
34 \verbatim
35 wallDist
36 {
37 method meshWaveAddressing;
38
39 // Optional entry enabling the calculation
40 // of the normal-to-wall field
41 nRequired true;
42 }
43 \endverbatim
44
45See also
46 Foam::patchDistMethod::meshWave
47 Foam::wallDist
48
49SourceFiles
50 meshWaveAddressingPatchDistMethod.C
51
52\*---------------------------------------------------------------------------*/
53
54#ifndef Foam_meshWaveAddressingPatchDistMethod_H
55#define Foam_meshWaveAddressingPatchDistMethod_H
56
57#include "patchDistMethod.H"
58
59// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60
61namespace Foam
62{
63namespace patchDistMethods
64{
66/*---------------------------------------------------------------------------*\
67 Class meshWaveAddressing Declaration
68\*---------------------------------------------------------------------------*/
69
71:
72 public patchDistMethod
73{
74protected:
75
76 // Protected Member Data
77
78 //- Do accurate distance calculation for near-wall cells.
79 const bool correctWalls_;
80
81
82 // Protected Member Functions
83
84 //- No copy construct
86
87 //- No copy assignment
88 void operator=(const meshWaveAddressing&) = delete;
90
91public:
92
93 //- Runtime type information
94 TypeName("meshWaveAddressing");
95
96
97 // Constructors
98
99 //- Construct from coefficients dictionary, mesh
100 //- and fixed-value patch set
102 (
103 const dictionary& dict,
104 const fvMesh& mesh,
106 );
107
108 //- Construct from mesh, fixed-value patch set and flag specifying
109 //- whether or not to correct wall.
110 // Calculate for all cells. correctWalls : correct wall (face&point)
111 // cells for correct distance, searching neighbours.
113 (
114 const fvMesh& mesh,
115 const labelHashSet& patchIDs,
116 const bool correctWalls = true
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// ************************************************************************* //
scalar y
label n
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
patchDistMethod(const patchDistMethod &)=delete
No copy construct.
const labelHashSet & patchIDs() const
Return the patchIDs.
TypeName("meshWaveAddressing")
Runtime type information.
const bool correctWalls_
Do accurate distance calculation for near-wall cells.
void operator=(const meshWaveAddressing &)=delete
No copy assignment.
meshWaveAddressing(const meshWaveAddressing &)=delete
No copy construct.
thermo correct()
dynamicFvMesh & mesh
Namespace for OpenFOAM.
GeometricField< vector, fvPatchField, volMesh > volVectorField
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
Definition HashSet.H:85
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68