1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM 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 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Radial basis function motion solver
32 Frank Bos, TU Delft. All rights reserved.
37 \*---------------------------------------------------------------------------*/
39 #ifndef RBFMotionSolver_H
40 #define RBFMotionSolver_H
42 #include "motionSolver.H"
44 #include "RBFInterpolation.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 /*---------------------------------------------------------------------------*\
52 Class RBFMotionSolver Declaration
53 \*---------------------------------------------------------------------------*/
61 //- Moving patch names
62 wordList movingPatches_;
64 //- Static patch names
65 wordList staticPatches_;
68 label coarseningRatio_;
70 //- Include zero motion of static patches in RBF interpolation
71 Switch includeStaticPatches_;
73 //- Frozen interpolation
74 Switch frozenInterpolation_;
79 //- Moving points on the boundary
80 mutable vectorField movingPoints_;
86 labelList controlIDs_;
88 //- Control points on the boundary
89 mutable vectorField controlPoints_;
91 //- Internal point IDs
92 labelList internalIDs_;
95 vectorField internalPoints_;
97 //- Prescribed motion on control points
100 //- RBF interpolation
101 RBFInterpolation interpolation_;
104 // Private Member Functions
106 //- Disallow default bitwise copy construct
107 RBFMotionSolver(const RBFMotionSolver&);
109 //- Disallow default bitwise assignment
110 void operator=(const RBFMotionSolver&);
113 //- Make control point IDs. Constructor helper
114 void makeControlIDs();
116 //- Set location of points
117 void setMovingPoints() const;
122 //- Runtime type information
123 TypeName("RBFMotionSolver");
128 //- Construct from polyMesh
131 const polyMesh& mesh,
138 virtual ~RBFMotionSolver();
143 //- Return moving point indices in mesh points
144 const labelList& movingIDs() const
149 //- Return moving points
150 const vectorField& movingPoints() const;
152 //- Set motion of moving points
153 void setMotion(const vectorField&);
156 //- Return point location obtained from the current motion field
157 virtual tmp<pointField> curPoints() const;
160 virtual void solve();
162 //- Update the mesh corresponding to given map
163 virtual void updateMesh(const mapPolyMesh&);
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 } // End namespace Foam
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 // ************************************************************************* //