motionInterpolation.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) 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::motionInterpolation
28 
29 Description
30  Base class for interpolation of cell displacement fields, generated by
31  fvMotionSolvers, to the points. This base class implements the default
32  method which applies volPointInterpolation only.
33 
34 SourceFiles
35  motionInterpolation.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef motionInterpolation_H
40 #define motionInterpolation_H
41 
42 #include "fvMesh.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class motionInterpolation Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55  // Private data
56 
57  //- Reference to the FV mesh
58  const fvMesh& mesh_;
59 
60 
61  // Private Member Functions
62 
63  //- No copy construct
65 
66  //- No copy assignment
67  void operator=(const motionInterpolation&) = delete;
68 
69 
70 public:
71 
72  //- Runtime type information
73  TypeName("motionInterpolation");
74 
75 
76  // Declare run-time constructor selection tables
77 
79  (
80  autoPtr,
82  Istream,
83  (
84  const fvMesh& mesh,
85  Istream& entry
86  ),
87  (mesh, entry)
88  );
89 
90 
91  // Selectors
92 
93  //- Select default
95 
96  //- Select from stream
98  (
99  const fvMesh& mesh,
100  Istream& entry
101  );
102 
103 
104  // Constructors
105 
106  //- Construct from an fvMesh
108 
109  //- Construct from an fvMesh and an Istream
111 
112 
113  //- Destructor
114  virtual ~motionInterpolation();
115 
116 
117  // Member Functions
118 
119  //- Return const-reference to the mesh
120  const fvMesh& mesh() const
121  {
122  return mesh_;
123  }
124 
125  //- Interpolate the given scalar cell displacement
126  virtual void interpolate
127  (
128  const volScalarField&,
130  ) const;
131 
132  //- Interpolate the given vector cell displacement
133  virtual void interpolate
134  (
135  const volVectorField&,
137  ) const;
138 };
139 
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 } // End namespace Foam
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 #endif
148 
149 // ************************************************************************* //
Foam::entry
A keyword and a list of tokens is an 'entry'.
Definition: entry.H:67
Foam::motionInterpolation::~motionInterpolation
virtual ~motionInterpolation()
Destructor.
Definition: motionInterpolation.C:98
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::motionInterpolation::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, motionInterpolation, Istream,(const fvMesh &mesh, Istream &entry),(mesh, entry))
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::motionInterpolation::interpolate
virtual void interpolate(const volScalarField &, pointScalarField &) const
Interpolate the given scalar cell displacement.
Definition: motionInterpolation.C:105
Foam::motionInterpolation
Base class for interpolation of cell displacement fields, generated by fvMotionSolvers,...
Definition: motionInterpolation.H:52
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::motionInterpolation::mesh
const fvMesh & mesh() const
Return const-reference to the mesh.
Definition: motionInterpolation.H:119
Foam::motionInterpolation::TypeName
TypeName("motionInterpolation")
Runtime type information.
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::motionInterpolation::New
static autoPtr< motionInterpolation > New(const fvMesh &mesh)
Select default.
Definition: motionInterpolation.C:66