componentDisplacementMotionSolver.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::componentDisplacementMotionSolver
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 pointDisplacementX pointScalarField.
34 
35 SourceFiles
36  componentDisplacementMotionSolver.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef componentDisplacementMotionSolver_H
41 #define componentDisplacementMotionSolver_H
42 
43 #include "motionSolver.H"
44 #include "pointFields.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 class mapPolyMesh;
52 
53 /*---------------------------------------------------------------------------*\
54  Class componentDisplacementMotionSolver Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 :
59  public motionSolver
60 {
61 protected:
62 
63  // Protected data
64 
65  //- The component name to solve for
67 
68  //- The component to solve for
70 
71  //- Reference point field for this component
73 
74  //- Point motion field
76 
77 
78 private:
79 
80  // Private Member Functions
81 
82  //- Return the component corresponding to the given component name
83  direction cmpt(const word& cmptName) const;
84 
85  //- No copy construct
87  (
89  ) = delete;
90 
91  //- No copy assignment
92  void operator=(const componentDisplacementMotionSolver&) = delete;
93 
94 
95 public:
96 
97  //- Runtime type information
98  TypeName("componentDisplacementMotionSolver");
99 
100 
101  // Constructors
102 
103  //- Construct from polyMesh and dictionary and type
105  (
106  const polyMesh&,
107  const IOdictionary&,
108  const word& type
109  );
110 
111 
112  //- Destructor
114 
115 
116  // Member Functions
117 
118  //- Return reference to the reference field
120  {
121  return points0_;
122  }
123 
124  //- Return reference to the reference field
125  const scalarField& points0() const
126  {
127  return points0_;
128  }
129 
130  //- Update local data for geometry changes
131  virtual void movePoints(const pointField&);
132 
133  //- Update local data for topology changes
134  virtual void updateMesh(const mapPolyMesh&);
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
motionSolver.H
Foam::componentDisplacementMotionSolver
Virtual base class for displacement motion solver.
Definition: componentDisplacementMotionSolver.H:56
Foam::componentDisplacementMotionSolver::movePoints
virtual void movePoints(const pointField &)
Update local data for geometry changes.
Definition: componentDisplacementMotionSolver.C:143
Foam::componentDisplacementMotionSolver::points0
const scalarField & points0() const
Return reference to the reference field.
Definition: componentDisplacementMotionSolver.H:124
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::componentDisplacementMotionSolver::pointDisplacement_
pointScalarField pointDisplacement_
Point motion field.
Definition: componentDisplacementMotionSolver.H:74
Foam::componentDisplacementMotionSolver::updateMesh
virtual void updateMesh(const mapPolyMesh &)
Update local data for topology changes.
Definition: componentDisplacementMotionSolver.C:149
Foam::Field< scalar >
Foam::componentDisplacementMotionSolver::cmptName_
word cmptName_
The component name to solve for.
Definition: componentDisplacementMotionSolver.H:65
Foam::componentDisplacementMotionSolver::~componentDisplacementMotionSolver
virtual ~componentDisplacementMotionSolver()
Destructor.
Definition: componentDisplacementMotionSolver.C:137
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::componentDisplacementMotionSolver::points0_
scalarField points0_
Reference point field for this component.
Definition: componentDisplacementMotionSolver.H:71
Foam::componentDisplacementMotionSolver::cmpt_
direction cmpt_
The component to solve for.
Definition: componentDisplacementMotionSolver.H:68
Foam::componentDisplacementMotionSolver::TypeName
TypeName("componentDisplacementMotionSolver")
Runtime type information.
Foam::motionSolver
Virtual base class for mesh motion solver.
Definition: motionSolver.H:58
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::direction
uint8_t direction
Definition: direction.H:52
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:161
Foam::GeometricField< scalar, pointPatchField, pointMesh >
pointFields.H
Foam::componentDisplacementMotionSolver::points0
scalarField & points0()
Return reference to the reference field.
Definition: componentDisplacementMotionSolver.H:118