motionDiffusivity.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) 2011-2015 OpenFOAM Foundation
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::motionDiffusivity
28 
29 Description
30  Abstract base class for cell-centre mesh motion diffusivity.
31 
32 SourceFiles
33  motionDiffusivity.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef motionDiffusivity_H
38 #define motionDiffusivity_H
39 
40 #include "surfaceFieldsFwd.H"
41 #include "fvMesh.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class motionDiffusivity Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 {
54  // Private data
55 
56  //- Mesh reference
57  const fvMesh& mesh_;
58 
59 public:
60 
61  //- Runtime type information
62  TypeName("motionDiffusivity");
63 
64 
65  // Declare run-time constructor selection tables
66 
68  (
69  autoPtr,
71  Istream,
72  (
73  const fvMesh& mesh,
74  Istream& mdData
75  ),
76  (mesh, mdData)
77  );
78 
79 
80  // Selectors
81 
82  //- Select null constructed
84  (
85  const fvMesh& mesh,
86  Istream& mdData
87  );
88 
89 
90  // Constructors
91 
92  //- Construct for the given fvMesh
94 
95 
96  //- Destructor
97  virtual ~motionDiffusivity();
98 
99 
100  // Member Functions
101 
102  //- Return reference to the mesh
103  const fvMesh& mesh() const
104  {
105  return mesh_;
106  }
107 
108  //- Return diffusivity field
109  virtual tmp<surfaceScalarField> operator()() const = 0;
110 
111  //- Correct the motion diffusivity
112  virtual void correct() = 0;
113 };
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #endif
123 
124 // ************************************************************************* //
Foam::motionDiffusivity::TypeName
TypeName("motionDiffusivity")
Runtime type information.
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::motionDiffusivity
Abstract base class for cell-centre mesh motion diffusivity.
Definition: motionDiffusivity.H:51
Foam::motionDiffusivity::correct
virtual void correct()=0
Correct the motion diffusivity.
Foam::motionDiffusivity::~motionDiffusivity
virtual ~motionDiffusivity()
Destructor.
Definition: motionDiffusivity.C:79
Foam::motionDiffusivity::mesh
const fvMesh & mesh() const
Return reference to the mesh.
Definition: motionDiffusivity.H:102
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::motionDiffusivity::New
static autoPtr< motionDiffusivity > New(const fvMesh &mesh, Istream &mdData)
Select null constructed.
Definition: motionDiffusivity.C:51
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::motionDiffusivity::operator()
virtual tmp< surfaceScalarField > operator()() const =0
Return diffusivity field.
surfaceFieldsFwd.H
Foam::motionDiffusivity::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, motionDiffusivity, Istream,(const fvMesh &mesh, Istream &mdData),(mesh, mdData))
Foam::motionDiffusivity::motionDiffusivity
motionDiffusivity(const fvMesh &mesh)
Construct for the given fvMesh.
Definition: motionDiffusivity.C:42