$extrastylesheet
00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00003 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public 00006 // License as published by the Free Software Foundation; either 00007 // version 2.1 of the License, or (at your option) any later version. 00008 00009 // This library is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // Lesser General Public License for more details. 00013 00014 // You should have received a copy of the GNU Lesser General Public 00015 // License along with this library; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 00019 00020 #ifndef LIBMESH_RADIAL_BASIS_INTERPOLATION_H 00021 #define LIBMESH_RADIAL_BASIS_INTERPOLATION_H 00022 00023 // Local includes 00024 #include "libmesh/libmesh_config.h" 00025 #include "libmesh/libmesh_common.h" 00026 #include "libmesh/meshfree_interpolation.h" 00027 #include "libmesh/radial_basis_functions.h" 00028 #include "libmesh/mesh_tools.h" 00029 00030 00031 00032 namespace libMesh 00033 { 00037 template <unsigned int KDDim, class RBF = WendlandRBF<KDDim, 2> > 00038 class RadialBasisInterpolation : public InverseDistanceInterpolation<KDDim> 00039 { 00043 using InverseDistanceInterpolation<KDDim>::_src_pts; 00044 using InverseDistanceInterpolation<KDDim>::_src_vals; 00045 using InverseDistanceInterpolation<KDDim>::_names; 00046 00047 protected: 00048 00052 MeshTools::BoundingBox _src_bbox; 00053 00057 std::vector<Number> _weights; 00058 00062 Real _r_bbox; 00063 00067 Real _r_override; 00068 00069 public: 00070 00074 RadialBasisInterpolation (const libMesh::Parallel::Communicator &comm_in, 00075 Real radius=-1) : 00076 InverseDistanceInterpolation<KDDim> (comm_in,8,2), 00077 _r_bbox(0.), 00078 _r_override(radius) 00079 { libmesh_experimental(); } 00080 00085 virtual void clear(); 00086 00090 virtual void prepare_for_use (); 00091 00096 virtual void interpolate_field_data (const std::vector<std::string> &field_names, 00097 const std::vector<Point> &tgt_pts, 00098 std::vector<Number> &tgt_vals) const; 00099 00100 }; 00101 00102 } // namespace libMesh 00103 00104 00105 #endif // #define LIBMESH_RADIAL_BASIS_INTERPOLATION_H