FWellCondition Class Reference

#include <fwellcondition.h>

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

List of all members.

Public Member Functions

 FWellCondition (VecWellInfo &wells, double value)
 FWellCondition (VecWellInfo &wells, const VecDouble &values)
virtual ~FWellCondition ()
virtual bool isInDomain (const VecDouble &p, unsigned component=0) const
virtual double operator() (const VecDouble &p, const unsigned int component=0) const

Private Attributes

VecWellInfo m_wells
VecDouble m_values

Detailed Description

This function specifies well conditions for the transport, and dynamic modules. Is a function whose domain is the wells' regions.

Definition at line 12 of file fwellcondition.h.


Constructor & Destructor Documentation

FWellCondition::FWellCondition ( VecWellInfo wells,
double  value 
)

Definition at line 5 of file fwellcondition.cpp.

00006   :m_wells(wells)
00007 {
00008   m_values.reinit(m_wells.size());
00009   m_values=value;
00010 }

FWellCondition::FWellCondition ( VecWellInfo wells,
const VecDouble values 
)

Definition at line 12 of file fwellcondition.cpp.

00013    :m_wells(wells),m_values(values)
00014  {
00015 
00016 }

FWellCondition::~FWellCondition (  )  [virtual]

Definition at line 42 of file fwellcondition.cpp.

00043 {
00044 
00045 }


Member Function Documentation

bool FWellCondition::isInDomain ( const VecDouble p,
unsigned  component = 0 
) const [virtual]

Reimplemented from GeneralFunctionInterface.

Definition at line 19 of file fwellcondition.cpp.

00020 {
00021   assert(component==0);
00022   for (unsigned i=0;i<m_wells.size();i++)
00023   {
00024     if (m_wells[i].isPointInWell(p))
00025       return true;
00026   }
00027   return false;
00028 }

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

Implements GeneralFunctionInterface.

Definition at line 30 of file fwellcondition.cpp.

00031 {
00032   assert(component==0);
00033   for (unsigned i=0;i<m_wells.size();i++)
00034   {
00035     if (m_wells[i].isPointInWell(p))
00036       return m_values(i);
00037   }
00038   throw new Exception("FWellCondition: Point <%g,%g,%g> is outside the function domain",p(0),p(1),p(2));
00039 }


Member Data Documentation

Definition at line 16 of file fwellcondition.h.

Definition at line 15 of file fwellcondition.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:10 2012 for CO2INJECTION by  doxygen 1.6.3