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 displacementMotionSolver_H
41 #define 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 private:
67 
68  // Private Member Functions
69 
70  //- No copy construct
72 
73  //- No copy assignment
74  void operator=(const displacementMotionSolver&) = delete;
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("displacementMotionSolver");
81 
82 
83  // Declare run-time constructor selection tables
84 
86  (
87  autoPtr,
89  displacement,
90  (
91  const polyMesh& mesh,
92  const IOdictionary& dict,
94  const pointIOField& points0
95  ),
97  );
98 
99 
100  // Selectors
101 
102  //- Select constructed from polyMesh, dictionary and components.
103  // If dictionary was registered this will 'steal' that registration.
105  (
106  const word& solverTypeName,
107  const polyMesh&,
108  const IOdictionary&,
110  const pointIOField& points0
111  );
112 
113 
114  // Constructors
115 
116  //- Construct from mesh and dictionary
118  (
119  const polyMesh&,
120  const IOdictionary&,
121  const word& type
122  );
123 
124  //- Construct from mesh and dictionary
126  (
127  const polyMesh&,
128  const IOdictionary&,
130  const pointIOField& points0,
131  const word& type
132  );
133 
134 
135  //- Destructor
136  virtual ~displacementMotionSolver();
137 
138 
139  // Member Functions
140 
141  //- Return reference to the point motion displacement field
143  {
144  return pointDisplacement_;
145  }
146 
147  //- Return const reference to the point motion displacement field
148  const pointVectorField& pointDisplacement() const
149  {
150  return pointDisplacement_;
151  }
152 };
153 
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 } // End namespace Foam
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 #endif
162 
163 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
Foam::points0MotionSolver
Virtual base class for displacement motion solvers, where the point motion is relative to a set of fi...
Definition: points0MotionSolver.H:57
Foam::displacementMotionSolver::New
static autoPtr< displacementMotionSolver > New(const word &solverTypeName, const polyMesh &, const IOdictionary &, const pointVectorField &pointDisplacement, const pointIOField &points0)
Select constructed from polyMesh, dictionary and components.
Definition: displacementMotionSolver.C:87
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::IOField
A primitive field of type <T> with automated input and output.
Definition: foamVtkLagrangianWriter.H:61
Foam::displacementMotionSolver::pointDisplacement
pointVectorField & pointDisplacement()
Return reference to the point motion displacement field.
Definition: displacementMotionSolver.H:141
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::displacementMotionSolver::pointDisplacement
const pointVectorField & pointDisplacement() const
Return const reference to the point motion displacement field.
Definition: displacementMotionSolver.H:147
Foam::displacementMotionSolver::~displacementMotionSolver
virtual ~displacementMotionSolver()
Destructor.
Definition: displacementMotionSolver.C:139
points0MotionSolver.H
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::displacementMotionSolver::pointDisplacement_
pointVectorField pointDisplacement_
Point motion field.
Definition: displacementMotionSolver.H:62
Foam::displacementMotionSolver
Virtual base class for displacement motion solver.
Definition: displacementMotionSolver.H:53
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::displacementMotionSolver::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, displacementMotionSolver, displacement,(const polyMesh &mesh, const IOdictionary &dict, const pointVectorField &pointDisplacement, const pointIOField &points0),(mesh, dict, pointDisplacement, points0))
Foam::points0MotionSolver::points0
pointField & points0()
Return reference to the reference field.
Definition: points0MotionSolver.H:117
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
Foam::motionSolver::mesh
const polyMesh & mesh() const
Return reference to mesh.
Definition: motionSolver.H:144
Foam::displacementMotionSolver::TypeName
TypeName("displacementMotionSolver")
Runtime type information.
Foam::GeometricField< vector, pointPatchField, pointMesh >