1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
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.
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.
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/>.
28 Radial basis function motion solver
31 Frank Bos, TU Delft. All rights reserved.
36 \*---------------------------------------------------------------------------*/
38 #ifndef RBFMotionSolver_H
39 #define RBFMotionSolver_H
41 #include "motionSolver.H"
43 #include "RBFInterpolation.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class RBFMotionSolver Declaration
52 \*---------------------------------------------------------------------------*/
60 //- Moving patch names
61 wordList movingPatches_;
63 //- Static patch names
64 wordList staticPatches_;
67 label coarseningRatio_;
69 //- Include zero motion of static patches in RBF interpolation
70 Switch includeStaticPatches_;
72 //- Frozen interpolation
73 Switch frozenInterpolation_;
78 //- Moving points on the boundary
79 mutable vectorField movingPoints_;
85 labelList controlIDs_;
87 //- Control points on the boundary
88 mutable vectorField controlPoints_;
90 //- Internal point IDs
91 labelList internalIDs_;
94 vectorField internalPoints_;
96 //- Prescribed motion on control points
100 RBFInterpolation interpolation_;
103 // Private Member Functions
105 //- Disallow default bitwise copy construct
106 RBFMotionSolver(const RBFMotionSolver&);
108 //- Disallow default bitwise assignment
109 void operator=(const RBFMotionSolver&);
112 //- Make control point IDs. Constructor helper
113 void makeControlIDs();
115 //- Set location of points
116 void setMovingPoints() const;
121 //- Runtime type information
122 TypeName("RBFMotionSolver");
127 //- Construct from polyMesh
130 const polyMesh& mesh,
137 virtual ~RBFMotionSolver();
142 //- Return moving point indices in mesh points
143 const labelList& movingIDs() const
148 //- Return moving points
149 const vectorField& movingPoints() const;
151 //- Set motion of moving points
152 void setMotion(const vectorField&);
155 //- Return point location obtained from the current motion field
156 virtual tmp<pointField> curPoints() const;
159 virtual void solve();
161 //- Update the mesh corresponding to given map
162 virtual void updateMesh(const mapPolyMesh&);
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 } // End namespace Foam
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 // ************************************************************************* //