volumetricBSplinesMotionSolver.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) 2007-2020 PCOpt/NTUA
9  Copyright (C) 2013-2020 FOSS GP
10  Copyright (C) 2019 OpenCFD Ltd.
11 -------------------------------------------------------------------------------
12 License
13  This file is part of OpenFOAM.
14 
15  OpenFOAM is free software: you can redistribute it and/or modify it
16  under the terms of the GNU General Public License as published by
17  the Free Software Foundation, either version 3 of the License, or
18  (at your option) any later version.
19 
20  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
21  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23  for more details.
24 
25  You should have received a copy of the GNU General Public License
26  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
27 
28 
29 Class
30  Foam::volumetricBSplinesMotionSolver
31 
32 Description
33  A mesh motion solver based on volumetric B-Splines
34 
35 SourceFiles
36  volumetricBSplinesMotionSolver.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef volumetricBSplinesMotionSolver_H
41 #define volumetricBSplinesMotionSolver_H
42 
43 #include "motionSolver.H"
44 #include "volBSplinesBase.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 class mapPolyMesh;
52 
53 /*---------------------------------------------------------------------------*\
54  Class volumetricBSplinesMotionSolver Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 :
59  public motionSolver
60 {
61 protected:
62 
63  // Protected data
64 
65  //- Reference to the underlaying volumetric B-Splines base
67 
68  //- Movement of the control points
70 
71  //- Number of control boxes
73 
74  //- List with volumetric B-splines boxes. No overlapping is supported
76 
77  //- Number of control boxes
78  label nBoxes_;
79 
80 
81 private:
82 
83  // Private Member Functions
84 
85  //- No copy construct
87  (
89  ) = delete;
90 
91  //- No copy assignment
92  void operator=(const volumetricBSplinesMotionSolver&) = delete;
93 
94 
95 public:
96 
97  //- Runtime type information
98  TypeName("volumetricBSplinesMotionSolver");
99 
100 
101  // Constructors
102 
103  //- Construct from mesh and dictionary
105  (
106  const polyMesh& mesh,
107  const IOdictionary& dict
108  );
109 
110 
111  //- Destructor
112  virtual ~volumetricBSplinesMotionSolver() = default;
113 
114 
115  // Member Functions
116 
117  //- Return point location obtained from the current motion field
118  virtual tmp<pointField> curPoints() const;
119 
120  //- Solve for motion/ Does nothing
121  virtual void solve();
122 
123  //- Update local data for geometry changes
124  virtual void movePoints(const pointField&);
125 
126  //- Update the mesh corresponding to given map
127  virtual void updateMesh(const mapPolyMesh&);
128 
129  //- Set control points movement
130  void setControlPointsMovement(const vectorField& controlPointsMovement);
131 
132  //- Bound control points movement
133  void boundControlPointMovement(vectorField& controlPointsMovement);
134 };
135 
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 } // End namespace Foam
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #endif
144 
145 // ************************************************************************* //
Foam::volumetricBSplinesMotionSolver::updateMesh
virtual void updateMesh(const mapPolyMesh &)
Update the mesh corresponding to given map.
Definition: volumetricBSplinesMotionSolver.C:123
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
Foam::volumetricBSplinesMotionSolver::controlBoxes_
wordList controlBoxes_
Number of control boxes.
Definition: volumetricBSplinesMotionSolver.H:71
Foam::volumetricBSplinesMotionSolver::curPoints
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
Definition: volumetricBSplinesMotionSolver.C:75
Foam::volumetricBSplinesMotionSolver::controlPointsMovement_
vectorField controlPointsMovement_
Movement of the control points.
Definition: volumetricBSplinesMotionSolver.H:68
Foam::volBSplinesBase
Class constructing a number of volumetric B-Splines boxes, read from dynamicMeshDict....
Definition: volBSplinesBase.H:59
motionSolver.H
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::volumetricBSplinesMotionSolver::movePoints
virtual void movePoints(const pointField &)
Update local data for geometry changes.
Definition: volumetricBSplinesMotionSolver.C:117
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::Field< vector >
Foam::volumetricBSplinesMotionSolver::TypeName
TypeName("volumetricBSplinesMotionSolver")
Runtime type information.
Foam::volumetricBSplinesMotionSolver::setControlPointsMovement
void setControlPointsMovement(const vectorField &controlPointsMovement)
Set control points movement.
Definition: volumetricBSplinesMotionSolver.C:130
Foam::volumetricBSplinesMotionSolver::volume_
List< autoPtr< NURBS3DVolume > > volume_
List with volumetric B-splines boxes. No overlapping is supported.
Definition: volumetricBSplinesMotionSolver.H:74
Foam::volumetricBSplinesMotionSolver::nBoxes_
label nBoxes_
Number of control boxes.
Definition: volumetricBSplinesMotionSolver.H:77
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::volumetricBSplinesMotionSolver
A mesh motion solver based on volumetric B-Splines.
Definition: volumetricBSplinesMotionSolver.H:56
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::volumetricBSplinesMotionSolver::~volumetricBSplinesMotionSolver
virtual ~volumetricBSplinesMotionSolver()=default
Destructor.
volBSplinesBase.H
Foam::volumetricBSplinesMotionSolver::solve
virtual void solve()
Solve for motion/ Does nothing.
Definition: volumetricBSplinesMotionSolver.C:111
Foam::motionSolver
Virtual base class for mesh motion solver.
Definition: motionSolver.H:58
Foam::List< word >
Foam::volumetricBSplinesMotionSolver::volBSplinesBase_
volBSplinesBase & volBSplinesBase_
Reference to the underlaying volumetric B-Splines base.
Definition: volumetricBSplinesMotionSolver.H:65
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:161
Foam::volumetricBSplinesMotionSolver::boundControlPointMovement
void boundControlPointMovement(vectorField &controlPointsMovement)
Bound control points movement.
Definition: volumetricBSplinesMotionSolver.C:146