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-------------------------------------------------------------------------------
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::fvGeometryScheme
28
29Description
30 Abstract base class for geometry calculation schemes.
31
32SourceFiles
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"
44#include "pointField.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51class fvMesh;
52
53/*---------------------------------------------------------------------------*\
54 Class fvGeometryScheme Declaration
55\*---------------------------------------------------------------------------*/
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
70protected:
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
84public:
85
86 //- Runtime type information
87 TypeName("fvGeometryScheme");
88
89
90 // Declare run-time constructor selection tables
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
109 :
110 mesh_(mesh)
111 {}
112
113
114 // Selectors
115
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;
145
146 //- Return cell-centre difference coefficients
147 virtual tmp<surfaceScalarField> deltaCoeffs() const = 0;
148
149 //- Return non-orthogonal cell-centre difference coefficients
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// ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Abstract base class for geometry calculation schemes.
TypeName("fvGeometryScheme")
Runtime type information.
const fvMesh & mesh_
Hold reference to mesh.
virtual tmp< surfaceScalarField > weights() const =0
Return linear difference weighting factors.
virtual tmp< surfaceScalarField > nonOrthDeltaCoeffs() const =0
Return non-orthogonal cell-centre difference coefficients.
virtual tmp< surfaceScalarField > deltaCoeffs() const =0
Return cell-centre difference coefficients.
bool setMeshPhi() const
Set the mesh motion flux.
virtual void movePoints()
Update basic geometric properties from provided points.
virtual tmp< surfaceVectorField > nonOrthCorrectionVectors() const =0
Return non-orthogonality correction vectors.
virtual void updateMesh(const mapPolyMesh &mpm)
Update mesh for topology changes.
virtual ~fvGeometryScheme()=default
Destructor.
const fvMesh & mesh() const
Return mesh reference.
static tmp< fvGeometryScheme > New(const fvMesh &mesh, const dictionary &dict, const word &defaultScheme)
Return new tmp interpolation scheme.
declareRunTimeSelectionTable(tmp, fvGeometryScheme, dict,(const fvMesh &mesh, const dictionary &dict),(mesh, dict))
fvGeometryScheme(const fvMesh &mesh, const dictionary &dict)
Construct from mesh.
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
Reference counter for various OpenFOAM components.
Definition: refCount.H:51
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73