fvGeometryScheme.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-2021 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::fvGeometryScheme
28 
29 Description
30  Abstract base class for geometry calculation schemes.
31 
32 SourceFiles
33  fvGeometryScheme.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef fvGeometryScheme_H
38 #define fvGeometryScheme_H
39 
40 #include "tmp.H"
41 #include "surfaceFieldsFwd.H"
42 #include "typeInfo.H"
43 #include "runTimeSelectionTables.H"
44 #include "pointField.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 class fvMesh;
52 
53 /*---------------------------------------------------------------------------*\
54  Class fvGeometryScheme Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 class fvGeometryScheme
58 :
59  public refCount
60 {
61  // Private Member Functions
62 
63  //- No copy construct
64  fvGeometryScheme(const fvGeometryScheme&) = delete;
65 
66  //- No copy assignment
67  void operator=(const fvGeometryScheme&) = delete;
68 
69 
70 protected:
71 
72  // Protected Data
73 
74  //- Hold reference to mesh
75  const fvMesh& mesh_;
76 
77 
78  // Protected Member Functions
79 
80  //- Set the mesh motion flux
81  bool setMeshPhi() const;
82 
83 
84 public:
85 
86  //- Runtime type information
87  TypeName("fvGeometryScheme");
88 
89 
90  // Declare run-time constructor selection tables
91 
93  (
94  tmp,
96  dict,
97  (
98  const fvMesh& mesh,
99  const dictionary& dict
100  ),
101  (mesh, dict)
102  );
103 
104 
105  // Constructors
106 
107  //- Construct from mesh
108  fvGeometryScheme(const fvMesh& mesh, const dictionary& dict)
109  :
110  mesh_(mesh)
111  {}
112 
113 
114  // Selectors
116  //- Return new tmp interpolation scheme
118  (
119  const fvMesh& mesh,
120  const dictionary& dict,
121  const word& defaultScheme
122  );
123 
124 
125  //- Destructor
126  virtual ~fvGeometryScheme() = default;
127 
128 
129  // Member Functions
130 
131  //- Return mesh reference
132  const fvMesh& mesh() const
133  {
134  return mesh_;
135  }
136 
137  //- Update basic geometric properties from provided points
138  virtual void movePoints();
139 
140  //- Update mesh for topology changes
141  virtual void updateMesh(const mapPolyMesh& mpm);
142 
143  //- Return linear difference weighting factors
144  virtual tmp<surfaceScalarField> weights() const = 0;
146  //- Return cell-centre difference coefficients
147  virtual tmp<surfaceScalarField> deltaCoeffs() const = 0;
148 
149  //- Return non-orthogonal cell-centre difference coefficients
150  virtual tmp<surfaceScalarField> nonOrthDeltaCoeffs() const = 0;
151 
152  //- Return non-orthogonality correction vectors
154 
157  //virtual autoPtr<patchDistMethod> newPatchDistMethod
158  //(
159  // const dictionary& dict,
160  // const labelHashSet& patchIDs,
161  // const word& defaultPatchDistMethod
162  //) const = 0;
163 };
164 
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 } // End namespace Foam
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 #endif
173 
174 // ************************************************************************* //
virtual ~fvGeometryScheme()=default
Destructor.
dictionary dict
const fvMesh & mesh_
Hold reference to mesh.
Reference counter for various OpenFOAM components.
Definition: refCount.H:44
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual tmp< surfaceScalarField > deltaCoeffs() const =0
Return cell-centre difference coefficients.
bool setMeshPhi() const
Set the mesh motion flux.
virtual tmp< surfaceScalarField > nonOrthDeltaCoeffs() const =0
Return non-orthogonal cell-centre difference coefficients.
virtual tmp< surfaceVectorField > nonOrthCorrectionVectors() const =0
Return non-orthogonality correction vectors.
virtual void updateMesh(const mapPolyMesh &mpm)
Update mesh for topology changes.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:157
A class for handling words, derived from Foam::string.
Definition: word.H:63
static tmp< fvGeometryScheme > New(const fvMesh &mesh, const dictionary &dict, const word &defaultScheme)
Return new tmp interpolation scheme.
const fvMesh & mesh() const
Return mesh reference.
TypeName("fvGeometryScheme")
Runtime type information.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual void movePoints()
Update basic geometric properties from provided points.
Macros to ease declaration of run-time selection tables.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
declareRunTimeSelectionTable(tmp, fvGeometryScheme, dict,(const fvMesh &mesh, const dictionary &dict),(mesh, dict))
Abstract base class for geometry calculation schemes.
virtual tmp< surfaceScalarField > weights() const =0
Return linear difference weighting factors.
Namespace for OpenFOAM.