FConstSphereRegion Class Reference

#include <fconstsphereregion.h>

Inheritance diagram for FConstSphereRegion:
Inheritance graph
[legend]
Collaboration diagram for FConstSphereRegion:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FConstSphereRegion (double constValue, double outsideValue, double radius, double center1, double center2, double center3)
virtual double operator() (const VecDouble &p, const unsigned int component=0) const
virtual ~FConstSphereRegion ()

Private Attributes

double m_constValue
double m_radius
double m_center1
double m_center2
double m_center3
double m_outsideValue

Detailed Description

Implements the following function

x = constValue for |x-centerPoint| < radius 0 otherwise.

Where constValue, the centerPoint and the radius are passes as argumentos to the constructor of the class

Definition at line 17 of file fconstsphereregion.h.


Constructor & Destructor Documentation

FConstSphereRegion::FConstSphereRegion ( double  constValue,
double  outsideValue,
double  radius,
double  center1,
double  center2,
double  center3 
)

Definition at line 5 of file fconstsphereregion.cpp.

00006 {
00007   m_constValue = constValue;
00008   m_outsideValue = outsideValue;
00009   m_radius = radius;
00010   m_center1 = center1;
00011   m_center2 = center2;
00012   m_center3 = center3;
00013 }

virtual FConstSphereRegion::~FConstSphereRegion (  )  [inline, virtual]

Definition at line 28 of file fconstsphereregion.h.

00028 {}


Member Function Documentation

double FConstSphereRegion::operator() ( const VecDouble p,
const unsigned int  component = 0 
) const [virtual]

Implements GeneralFunctionInterface.

Definition at line 15 of file fconstsphereregion.cpp.

00016 { 
00017   Point3D P;
00018   P[0] = p(0) - m_center1;
00019   P[1] = p(1) - m_center2;
00020   P[2] = p(2) - m_center3;
00021 
00022   if (sqrt(P[0]*P[0] + P[1]*P[1] + P[2]*P[2]) < m_radius)
00023   {
00024     return m_constValue;
00025   }
00026   else
00027     return m_outsideValue;
00028 }


Member Data Documentation

Definition at line 21 of file fconstsphereregion.h.

Definition at line 21 of file fconstsphereregion.h.

Definition at line 21 of file fconstsphereregion.h.

Definition at line 21 of file fconstsphereregion.h.

Definition at line 21 of file fconstsphereregion.h.

double FConstSphereRegion::m_radius [private]

Definition at line 21 of file fconstsphereregion.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Sun Apr 8 23:13:05 2012 for CO2INJECTION by  doxygen 1.6.3