mesh_conv::implicit::MC_potential_sphere Class Reference

#include <MC_potential_sphere.hpp>

Inheritance diagram for mesh_conv::implicit::MC_potential_sphere:
Inheritance graph
[legend]
Collaboration diagram for mesh_conv::implicit::MC_potential_sphere:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MC_potential_sphere ()
 empty constructor
 MC_potential_sphere (const MC_sphere_geometry &sphere)
 direct constructor
virtual ~MC_potential_sphere ()
 destructor
virtual void clear ()
 clear the internal sphere
virtual double operator() (const MC_v3d &x) const
 get potential on a given position
const MC_sphere_geometrysphere () const
 get internal sphere geometry
MC_sphere_geometrysphere ()
 get internal sphere geometry

Private Attributes

MC_sphere_geometry sphere_internal
 store internaly a sphere

Detailed Description

Definition at line 12 of file MC_potential_sphere.hpp.


Constructor & Destructor Documentation

mesh_conv::implicit::MC_potential_sphere::MC_potential_sphere (  ) 

empty constructor

Definition at line 8 of file MC_potential_sphere.cpp.

00008 {}

mesh_conv::implicit::MC_potential_sphere::MC_potential_sphere ( const MC_sphere_geometry sphere  ) 

direct constructor

Definition at line 9 of file MC_potential_sphere.cpp.

00010                 :sphere_internal(sphere)
00011         {}

mesh_conv::implicit::MC_potential_sphere::~MC_potential_sphere (  )  [virtual]

destructor

Definition at line 12 of file MC_potential_sphere.cpp.

00012 {}


Member Function Documentation

void mesh_conv::implicit::MC_potential_sphere::clear (  )  [virtual]

clear the internal sphere

Implements mesh_conv::implicit::MC_potential_implicit.

Definition at line 20 of file MC_potential_sphere.cpp.

References sphere_internal.

00021         {
00022             sphere_internal=MC_sphere_geometry();
00023         }

double mesh_conv::implicit::MC_potential_sphere::operator() ( const MC_v3d x  )  const [virtual]

get potential on a given position

Implements mesh_conv::implicit::MC_potential_implicit.

Definition at line 13 of file MC_potential_sphere.cpp.

References mesh_conv::MC_sphere_geometry::center(), mesh_conv::MC_v3d::norm(), mesh_conv::MC_sphere_geometry::radius(), and sphere_internal.

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         }

Here is the call graph for this function:

MC_sphere_geometry & mesh_conv::implicit::MC_potential_sphere::sphere (  ) 

get internal sphere geometry

Definition at line 28 of file MC_potential_sphere.cpp.

References sphere_internal.

00029         {return sphere_internal;}

const MC_sphere_geometry & mesh_conv::implicit::MC_potential_sphere::sphere (  )  const

get internal sphere geometry

Definition at line 26 of file MC_potential_sphere.cpp.

References sphere_internal.

Referenced by mesh_conv::MC_grid_3d_scalar::add_potential().

00027         {return sphere_internal;}

Here is the caller graph for this function:


Member Data Documentation

store internaly a sphere

Definition at line 56 of file MC_potential_sphere.hpp.

Referenced by clear(), operator()(), and sphere().


The documentation for this class was generated from the following files:

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