MC_potential_sphere.cpp

Go to the documentation of this file.
00001 
00002 #include <MC_potential_sphere.hpp>
00003 
00004 namespace mesh_conv
00005 {
00006     namespace implicit
00007     {
00008         MC_potential_sphere::MC_potential_sphere(){}
00009         MC_potential_sphere::MC_potential_sphere(const MC_sphere_geometry& sphere)
00010                 :sphere_internal(sphere)
00011         {}
00012         MC_potential_sphere::~MC_potential_sphere(){}
00013         double MC_potential_sphere::operator()(const MC_v3d& x) const
00014         {
00015             MC_v3d u=sphere_internal.center()-x;
00016             double d=u.norm()/sphere_internal.radius();
00017 
00018             return 10.0/(d*d);
00019         }
00020         void MC_potential_sphere::clear()
00021         {
00022             sphere_internal=MC_sphere_geometry();
00023         }
00024 
00025 
00026         const MC_sphere_geometry& MC_potential_sphere::sphere() const
00027         {return sphere_internal;}
00028         MC_sphere_geometry& MC_potential_sphere::sphere()
00029         {return sphere_internal;}
00030     }
00031 }

Generated on Sun Apr 18 20:24:47 2010 by  doxygen 1.6.1