displacementMotionSolver.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) 2012-2016 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::displacementMotionSolver
28 
29 Description
30  Virtual base class for displacement motion solver
31 
32  The boundary displacement is set as a boundary condition
33  on the pointDisplacement pointVectorField.
34 
35 SourceFiles
36  displacementMotionSolver.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef Foam_displacementMotionSolver_H
41 #define Foam_displacementMotionSolver_H
42 
43 #include "points0MotionSolver.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class displacementMotionSolver Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
56  public points0MotionSolver
57 {
58 protected:
59 
60  // Protected Data
61 
62  //- Point motion field
64 
65 
66  // Protected Member Functions
67 
68  //- No copy construct
70 
71  //- No copy assignment
72  void operator=(const displacementMotionSolver&) = delete;
73 
74 
75 public:
76 
77  //- Runtime type information
78  TypeName("displacementMotionSolver");
79 
80 
81  // Declare run-time constructor selection tables
82 
84  (
85  autoPtr,
87  displacement,
88  (
89  const polyMesh& mesh,
90  const IOdictionary& dict,
92  const pointIOField& points0
93  ),
95  );
96 
97 
98  // Selectors
99 
100  //- Select constructed from polyMesh, dictionary and components.
101  // If dictionary was registered this will 'steal' that registration.
103  (
104  const word& solverTypeName,
105  const polyMesh&,
106  const IOdictionary&,
108  const pointIOField& points0
109  );
110 
111 
112  // Constructors
113 
114  //- Construct from mesh and dictionary
116  (
117  const polyMesh&,
118  const IOdictionary&,
119  const word& type
120  );
121 
122  //- Construct from mesh and dictionary
124  (
125  const polyMesh&,
126  const IOdictionary&,
128  const pointIOField& points0,
129  const word& type
130  );
131 
132 
133  //- Destructor
134  virtual ~displacementMotionSolver() = default;
135 
136 
137  // Member Functions
138 
139  //- Return reference to the point motion displacement field
141  {
142  return pointDisplacement_;
143  }
144 
145  //- Return const reference to the point motion displacement field
147  {
148  return pointDisplacement_;
149  }
150 };
151 
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 } // End namespace Foam
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 #endif
160 
161 // ************************************************************************* //
dictionary dict
Virtual base class for displacement motion solver.
TypeName("displacementMotionSolver")
Runtime type information.
pointVectorField pointDisplacement_
Point motion field.
displacementMotionSolver(const displacementMotionSolver &)=delete
No copy construct.
pointVectorField & pointDisplacement() noexcept
Return reference to the point motion displacement field.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:50
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: POSIX.C:799
A class for handling words, derived from Foam::string.
Definition: word.H:63
void operator=(const displacementMotionSolver &)=delete
No copy assignment.
virtual ~displacementMotionSolver()=default
Destructor.
const direction noexcept
Definition: Scalar.H:258
Virtual base class for displacement motion solvers, where the point motion is relative to a set of fi...
static autoPtr< displacementMotionSolver > New(const word &solverTypeName, const polyMesh &, const IOdictionary &, const pointVectorField &pointDisplacement, const pointIOField &points0)
Select constructed from polyMesh, dictionary and components.
pointField & points0() noexcept
Return reference to the reference (&#39;0&#39;) pointField.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
const polyMesh & mesh() const
Return reference to mesh.
Definition: motionSolver.H:165
A primitive field of type <T> with automated input and output.
declareRunTimeSelectionTable(autoPtr, displacementMotionSolver, displacement,(const polyMesh &mesh, const IOdictionary &dict, const pointVectorField &pointDisplacement, const pointIOField &points0),(mesh, dict, pointDisplacement, points0))
Namespace for OpenFOAM.