Loading...
Searching...
No Matches
RBFMotionSolver.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 4.0
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7-------------------------------------------------------------------------------
8License
9 This file is part of foam-extend.
10
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
15
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
23
24Class
25 RBFMotionSolver
26
27Description
28 Radial basis function motion solver
29
30Author
31 Frank Bos, TU Delft. All rights reserved.
32
33SourceFiles
34 RBFMotionSolver.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef RBFMotionSolver_H
39#define RBFMotionSolver_H
40
41#include "displacementMotionSolver.H"
42#include "polyMesh.H"
43#include "RBFInterpolation.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50/*---------------------------------------------------------------------------*\
51 Class RBFMotionSolver Declaration
52\*---------------------------------------------------------------------------*/
53
55 :
56 public displacementMotionSolver
57{
58 // Private data
59
60 //- Moving patch names
61 wordList movingPatches_;
62
63 //- Static patch names
64 wordList staticPatches_;
65
66 //- Coarsening ratio
67 label coarseningRatio_;
68
69 //- Include zero motion of static patches in RBF interpolation
70 Switch includeStaticPatches_;
71
72 //- Frozen interpolation
73 Switch frozenInterpolation_;
74
75 //- Moving point IDs
76 labelList movingIDs_;
77
78 //- Moving points on the boundary
79 mutable vectorField movingPoints_;
80
81 //- Static point IDs
82 labelList staticIDs_;
83
84 //- Control point IDs
85 labelList controlIDs_;
86
87 //- Control points on the boundary
88 mutable vectorField controlPoints_;
89
90 //- Internal point IDs
91 labelList internalIDs_;
92
93 //- Internal points
94 vectorField internalPoints_;
95
96 //- Prescribed motion on control points
97 vectorField motion_;
98
99 //- RBF interpolation
100 RBFInterpolation interpolation_;
101
102
103 // Private Member Functions
104
105 //- Disallow default bitwise copy construct
107
108 //- Disallow default bitwise assignment
109 void operator=(const RBFMotionSolver&);
110
111 //- Update local data for geometry changes
112 virtual void movePoints(const pointField&);
113
114
115 //- Make control point IDs. Constructor helper
116 void makeControlIDs();
117
118 //- Set location of points
119 void setMovingPoints() const;
120
121
122 public:
123
124 //- Runtime type information
125 TypeName("RBFMotionSolver");
126
127 // Constructors
128
129 //- Construct from polyMesh
131 (
132 const polyMesh&,
133 const IOdictionary& dict
134 );
135
136
137 // Destructor
138
139 virtual ~RBFMotionSolver();
140
141
142 // Member Functions
143
144 //- Return moving point indices in mesh points
145 const labelList& movingIDs() const
146 {
147 return movingIDs_;
148 }
149
150 //- Return moving points
151 const vectorField& movingPoints() const;
152
153 //- Set motion of moving points
154 void setMotion(const vectorField&);
155
156
157 //- Return point location obtained from the current motion field
158 virtual tmp<pointField> curPoints() const;
159
160 //- Solve for motion
161 virtual void solve();
162
163 //- Update the mesh corresponding to given map
164 virtual void updateMesh(const mapPolyMesh&);
165};
166
167
168// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169
170} // End namespace Foam
171
172// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173
174#endif
175
176// ************************************************************************* //
TypeName("RBFMotionSolver")
virtual void updateMesh(const mapPolyMesh &)
const vectorField & movingPoints() const
const labelList & movingIDs() const
void setMotion(const vectorField &)
virtual tmp< pointField > curPoints() const