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 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  //- Hold reference to mesh
73  const fvMesh& mesh_;
74 
75 
76 public:
77 
78  //- Runtime type information
79  TypeName("fvGeometryScheme");
80 
81 
82  // Declare run-time constructor selection tables
83 
85  (
86  tmp,
88  dict,
89  (
90  const fvMesh& mesh,
91  const dictionary& dict
92  ),
93  (mesh, dict)
94  );
95 
96 
97  // Constructors
98 
99  //- Construct from mesh
100  fvGeometryScheme(const fvMesh& mesh, const dictionary& dict)
101  :
102  mesh_(mesh)
103  {}
104 
105 
106  // Selectors
107 
108  //- Return new tmp interpolation scheme
110  (
111  const fvMesh& mesh,
112  const dictionary& dict,
113  const word& defaultScheme
114  );
115 
116 
117  //- Destructor
118  virtual ~fvGeometryScheme() = default;
119 
120 
121  // Member Functions
122 
123  //- Return mesh reference
124  const fvMesh& mesh() const
125  {
126  return mesh_;
127  }
128 
129  //- Update basic geometric properties from provided points
130  virtual void movePoints()
131  {}
132 
133  //- Return linear difference weighting factors
134  virtual tmp<surfaceScalarField> weights() const = 0;
135 
136  //- Return cell-centre difference coefficients
137  virtual tmp<surfaceScalarField> deltaCoeffs() const = 0;
138 
139  //- Return non-orthogonal cell-centre difference coefficients
140  virtual tmp<surfaceScalarField> nonOrthDeltaCoeffs() const = 0;
141 
142  //- Return non-orthogonality correction vectors
144 
147  //virtual autoPtr<patchDistMethod> newPatchDistMethod
148  //(
149  // const dictionary& dict,
150  // const labelHashSet& patchIDs,
151  // const word& defaultPatchDistMethod
152  //) const = 0;
153 };
154 
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 } // End namespace Foam
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 #endif
163 
164 // ************************************************************************* //
Foam::fvGeometryScheme::deltaCoeffs
virtual tmp< surfaceScalarField > deltaCoeffs() const =0
Return cell-centre difference coefficients.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
typeInfo.H
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::refCount
Reference counter for various OpenFOAM components.
Definition: refCount.H:50
Foam::fvGeometryScheme::weights
virtual tmp< surfaceScalarField > weights() const =0
Return linear difference weighting factors.
Foam::fvGeometryScheme::fvGeometryScheme
fvGeometryScheme(const fvMesh &mesh, const dictionary &dict)
Construct from mesh.
Definition: fvGeometryScheme.H:99
Foam::fvGeometryScheme::nonOrthCorrectionVectors
virtual tmp< surfaceVectorField > nonOrthCorrectionVectors() const =0
Return non-orthogonality correction vectors.
Foam::fvGeometryScheme::mesh
const fvMesh & mesh() const
Return mesh reference.
Definition: fvGeometryScheme.H:123
Foam::fvGeometryScheme
Abstract base class for geometry calculation schemes.
Definition: fvGeometryScheme.H:56
Foam::fvGeometryScheme::~fvGeometryScheme
virtual ~fvGeometryScheme()=default
Destructor.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
pointField.H
Foam::fvGeometryScheme::declareRunTimeSelectionTable
declareRunTimeSelectionTable(tmp, fvGeometryScheme, dict,(const fvMesh &mesh, const dictionary &dict),(mesh, dict))
tmp.H
Foam::fvGeometryScheme::TypeName
TypeName("fvGeometryScheme")
Runtime type information.
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::fvGeometryScheme::movePoints
virtual void movePoints()
Update basic geometric properties from provided points.
Definition: fvGeometryScheme.H:129
surfaceFieldsFwd.H
Foam::fvGeometryScheme::New
static tmp< fvGeometryScheme > New(const fvMesh &mesh, const dictionary &dict, const word &defaultScheme)
Return new tmp interpolation scheme.
Definition: fvGeometryScheme.C:44
Foam::fvGeometryScheme::nonOrthDeltaCoeffs
virtual tmp< surfaceScalarField > nonOrthDeltaCoeffs() const =0
Return non-orthogonal cell-centre difference coefficients.
Foam::fvGeometryScheme::mesh_
const fvMesh & mesh_
Hold reference to mesh.
Definition: fvGeometryScheme.H:72