Loading...
Searching...
No Matches
exactPatchDistMethod.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) 2018-2019,2024 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::exact
28
29Description
30 Calculation of exact distance to nearest patch for all cells and
31 boundary by constructing a search tree for all patch faces.
32
33Usage
34
35 \begin{verbatim}
36 wallDist
37 {
38 method exactDistance;
39
40 // Optional entries (currently for distributedTriSurfaceMesh)
41 exactDistanceCoeffs
42 {
43 // Optional decomposition method. If not supplied will use the
44 // system/decomposeParDict.
45 method hierarchical;
46 numberOfSubdomains 8;
47 n (2 2 2);
48
49 // (not)add fill-in triangles
50 decomposeUsingBbs false;
51 }
52 }
53 \end{verbatim}
54
55See also
56 Foam::patchDistMethod::meshWave
57 Foam::wallDist
58 Foam::distributedTriSurfaceMesh
59
60SourceFiles
61 exactPatchDistMethod.C
62
63\*---------------------------------------------------------------------------*/
64
65#ifndef exactPatchDistMethod_H
66#define exactPatchDistMethod_H
67
68#include "patchDistMethod.H"
69
70// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71
72namespace Foam
73{
74
76
77namespace patchDistMethods
78{
80/*---------------------------------------------------------------------------*\
81 Class exact Declaration
82\*---------------------------------------------------------------------------*/
83
84class exact
85:
86 public patchDistMethod
87{
88 // Private Member Data
89
90 //- Dictionary contents from the dictionary constructor
91 mutable dictionary dict_;
92
93 //- Cache surface+searching of patch
94 mutable autoPtr<distributedTriSurfaceMesh> patchSurfPtr_;
95
96
97 // Private Member Functions
98
99 const distributedTriSurfaceMesh& patchSurface() const;
100
101 //- No copy construct
102 exact(const exact&) = delete;
103
104 //- No copy assignment
105 void operator=(const exact&) = delete;
106
107
108public:
109
110 //- Runtime type information
111 TypeName("exactDistance");
112
113
114 // Constructors
115
116 //- Construct from coefficients dictionary, mesh
117 // and fixed-value patch set
118 exact
119 (
120 const dictionary& dict,
121 const fvMesh& mesh,
123 );
124
125 //- Construct from mesh and fixed-value patch set
126 exact
127 (
128 const fvMesh& mesh,
130 );
131
132
133 // Member Functions
134
135 //- Update cached geometry when the mesh moves
136 virtual bool movePoints()
137 {
138 // ? Reconstruct patch surface?
139 //patchSurfPtr_.clear();
140 return true;
141 }
142
143 //- Update cached topology and geometry when the mesh changes
144 virtual void updateMesh(const mapPolyMesh&)
145 {
146 // ? Reconstruct patch surface?
147 //patchSurfPtr_.clear();
149
150 //- Correct the given distance-to-patch field
151 virtual bool correct(volScalarField& y);
152
153 //- Correct the given distance-to-patch and normal-to-patch fields
154 virtual bool correct(volScalarField& y, volVectorField& n);
155};
156
157
158// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159
160} // End namespace patchDistMethods
161} // End namespace Foam
162
163// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164
165#endif
166
167// ************************************************************************* //
scalar y
label n
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
IOoject and searching on distributed triSurface. All processor hold (possibly overlapping) part of th...
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
patchDistMethod(const patchDistMethod &)=delete
No copy construct.
const labelHashSet & patchIDs() const
Return the patchIDs.
TypeName("exactDistance")
Runtime type information.
virtual bool movePoints()
Update cached geometry when the mesh moves.
virtual void updateMesh(const mapPolyMesh &)
Update cached topology and geometry when the mesh changes.
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