InvCapPress Class Reference

#include <pcinvfunc.h>

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

List of all members.

Public Member Functions

 InvCapPress (Function1D &P, double a, double b, double smax, unsigned N, double Tol)
virtual double operator() (double P, unsigned cmp) const
virtual ~InvCapPress ()

Private Attributes

Function1D_P
double _a
double _b
double _Pmax
double _smax
unsigned _N
double _Tol
OPointer< BSInversePInv
OPointer< BSInversePInvL
OPointer< FInterpolatePInvInt

Detailed Description

Definition at line 10 of file pcinvfunc.h.


Constructor & Destructor Documentation

InvCapPress::InvCapPress ( Function1D P,
double  a,
double  b,
double  smax,
unsigned  N,
double  Tol 
)

Definition at line 3 of file pcinvfunc.cpp.

00004 :_P(P)
00005 {
00006         _a=a;
00007         _b=b;
00008         assert(_a < _b);
00009         _N=N;
00010         _Tol=Tol;
00011         _smax=smax;
00012         _Pmax=_P(_smax);
00013         // build appropriate bisection inverse and its linear interpolate for p on [0,Pmax]
00014         PInv = new BSInverse(_P,_smax,_b,_Tol);
00015         PInvInt =  new FInterpolate((*PInv),0.0,_Pmax,_N);
00016         // build bisection inverse for p on (Pmax,infty)
00017         PInvL = new BSInverse(_P,_a,_smax,_Tol);
00018 }

InvCapPress::~InvCapPress (  )  [virtual]

Definition at line 29 of file pcinvfunc.cpp.

00029 {}


Member Function Documentation

double InvCapPress::operator() ( double  P,
unsigned  cmp = 0 
) const [virtual]

Implements Function1D.

Definition at line 20 of file pcinvfunc.cpp.

00021 {
00022         assert(isInDomain(P,cmp));
00023         // use interpolation if P <= Pmax
00024         if (P <= _Pmax) return (*PInvInt)(P,cmp);
00025         // use bisection of P > Pmax
00026         return (*PInvL)(P,cmp);
00027 }


Member Data Documentation

double InvCapPress::_a [private]

Definition at line 17 of file pcinvfunc.h.

double InvCapPress::_b [private]

Definition at line 17 of file pcinvfunc.h.

unsigned InvCapPress::_N [private]

Definition at line 21 of file pcinvfunc.h.

Definition at line 13 of file pcinvfunc.h.

double InvCapPress::_Pmax [private]

Definition at line 18 of file pcinvfunc.h.

double InvCapPress::_smax [private]

Definition at line 20 of file pcinvfunc.h.

double InvCapPress::_Tol [private]

Definition at line 22 of file pcinvfunc.h.

Definition at line 24 of file pcinvfunc.h.

Definition at line 29 of file pcinvfunc.h.

Definition at line 24 of file pcinvfunc.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:12 2012 for CO2INJECTION by  doxygen 1.6.3