points0MotionSolver.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) 2016 OpenFOAM Foundation
9  Copyright (C) 2016-2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::points0MotionSolver
29 
30 Description
31  Virtual base class for displacement motion solvers, where the point
32  motion is relative to a set of fixed points (points0).
33 
34 SourceFiles
35  points0MotionSolver.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef points0MotionSolver_H
40 #define points0MotionSolver_H
41 
42 #include "motionSolver.H"
43 #include "pointFields.H"
44 #include "pointIOField.H"
45 #include "zoneMotion.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 class mapPolyMesh;
53 
54 /*---------------------------------------------------------------------------*\
55  Class points0MotionSolver Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 :
60  public motionSolver,
61  public zoneMotion
62 {
63 protected:
64 
65  // Protected data
66 
67  //- Starting points
69 
70 
71 private:
72 
73  // Private Member Functions
74 
75  //- No copy construct
77 
78  //- No copy assignment
79  void operator=(const points0MotionSolver&) = delete;
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("points0MotionSolver");
86 
87 
88  // Constructors
89 
90  //- Construct from mesh and dictionary
92  (
93  const polyMesh&,
94  const IOdictionary&,
95  const word& type
96  );
97 
98  //- Construct from mesh and dictionary
100  (
101  const polyMesh&,
102  const IOdictionary&,
103  const pointIOField& points0,
104  const word& type
105  );
106 
107 
108  //- Destructor
109  virtual ~points0MotionSolver();
110 
111 
112  // Member Functions
113 
114  //- Return IO object for points0
115  static IOobject points0IO(const polyMesh& mesh);
116 
117  //- Return reference to the reference field
119  {
120  return points0_;
121  }
122 
123  //- Return reference to the reference field
124  const pointField& points0() const
125  {
126  return points0_;
127  }
128 
129  //- Update local data for geometry changes
130  virtual void movePoints(const pointField&);
131 
132  //- Update local data for topology changes
133  virtual void updateMesh(const mapPolyMesh&);
134 };
135 
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 } // End namespace Foam
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #endif
144 
145 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
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::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::IOField
A primitive field of type <T> with automated input and output.
Definition: foamVtkLagrangianWriter.H:61
motionSolver.H
pointIOField.H
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::points0MotionSolver::points0_
pointIOField points0_
Starting points.
Definition: points0MotionSolver.H:67
Foam::points0MotionSolver::points0IO
static IOobject points0IO(const polyMesh &mesh)
Return IO object for points0.
Definition: points0MotionSolver.C:42
Foam::Field< vector >
Foam::points0MotionSolver::~points0MotionSolver
virtual ~points0MotionSolver()
Destructor.
Definition: points0MotionSolver.C:148
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::points0MotionSolver::points0
pointField & points0()
Return reference to the reference field.
Definition: points0MotionSolver.H:117
Foam::zoneMotion
Definition: zoneMotion.H:55
Foam::points0MotionSolver::movePoints
virtual void movePoints(const pointField &)
Update local data for geometry changes.
Definition: points0MotionSolver.C:154
Foam::motionSolver
Virtual base class for mesh motion solver.
Definition: motionSolver.H:58
zoneMotion.H
Foam::points0MotionSolver::updateMesh
virtual void updateMesh(const mapPolyMesh &)
Update local data for topology changes.
Definition: points0MotionSolver.C:158
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::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:160
Foam::points0MotionSolver::TypeName
TypeName("points0MotionSolver")
Runtime type information.
pointFields.H
Foam::points0MotionSolver::points0
const pointField & points0() const
Return reference to the reference field.
Definition: points0MotionSolver.H:123