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 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
33See also
34 Foam::patchDistMethod::meshWave
35 Foam::wallDist
36
37SourceFiles
38 exactPatchDistMethod.C
39
40\*---------------------------------------------------------------------------*/
41
42#ifndef exactPatchDistMethod_H
43#define exactPatchDistMethod_H
44
45#include "patchDistMethod.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52class distributedTriSurfaceMesh;
53
54namespace patchDistMethods
55{
56
57/*---------------------------------------------------------------------------*\
58 Class exact Declaration
59\*---------------------------------------------------------------------------*/
61class exact
62:
63 public patchDistMethod
64{
65 // Private Member Data
66
67 //- Cache surface+searching of patch
68 mutable autoPtr<distributedTriSurfaceMesh> patchSurfPtr_;
69
70
71 // Private Member Functions
72
73 const distributedTriSurfaceMesh& patchSurface() const;
74
75 //- No copy construct
76 exact(const exact&) = delete;
77
78 //- No copy assignment
79 void operator=(const exact&) = delete;
80
81
82public:
83
84 //- Runtime type information
85 TypeName("exactDistance");
86
87
88 // Constructors
89
90 //- Construct from coefficients dictionary, mesh
91 // and fixed-value patch set
92 exact
93 (
94 const dictionary& dict,
95 const fvMesh& mesh,
97 );
98
99 //- Construct from mesh and fixed-value patch set
100 exact
101 (
102 const fvMesh& mesh,
104 );
105
106
107 // Member Functions
108
109 //- Update cached geometry when the mesh moves
110 virtual bool movePoints()
111 {
112 // ? Reconstruct patch surface?
113 //patchSurfPtr_.clear();
114 return true;
115 }
116
117 //- Update cached topology and geometry when the mesh changes
118 virtual void updateMesh(const mapPolyMesh&)
119 {
120 // ? Reconstruct patch surface?
121 //patchSurfPtr_.clear();
122 }
123
124 //- Correct the given distance-to-patch field
125 virtual bool correct(volScalarField& y);
126
127 //- Correct the given distance-to-patch and normal-to-patch fields
128 virtual bool correct(volScalarField& y, volVectorField& n);
129};
130
131
132// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133
134} // End namespace patchDistMethods
135} // End namespace Foam
136
137// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138
139#endif
140
141// ************************************************************************* //
scalar y
label n
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
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:91
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:162
Specialisation of patchDist for wall distance calculation.
const labelHashSet & patchIDs() const
Return the patchIDs.
Calculation of exact distance to nearest patch for all cells and boundary by constructing a search tr...
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.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73