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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::componentDisplacementMotionSolver
28
29Description
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
35SourceFiles
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
48namespace Foam
49{
50
51class mapPolyMesh;
52
53/*---------------------------------------------------------------------------*\
54 Class componentDisplacementMotionSolver Declaration
55\*---------------------------------------------------------------------------*/
58:
59 public motionSolver
60{
61protected:
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
78private:
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
95public:
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// ************************************************************************* //
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
Virtual base class for displacement motion solver.
scalarField points0_
Reference point field for this component.
pointScalarField pointDisplacement_
Point motion field.
scalarField & points0()
Return reference to the reference field.
const scalarField & points0() const
Return reference to the reference field.
TypeName("componentDisplacementMotionSolver")
Runtime type information.
virtual void movePoints(const pointField &)
Update local data for geometry changes.
virtual void updateMesh(const mapPolyMesh &)
Update local data for topology changes.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:162
Virtual base class for mesh motion solver.
Definition: motionSolver.H:61
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
uint8_t direction
Definition: direction.H:56
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73