VectorFunction Class Reference

#include <sfunctions.h>

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

List of all members.

Public Member Functions

 VectorFunction (GeneralFunctionInterface *f1, GeneralFunctionInterface *f2, bool del=false)
virtual bool isInDomain (const VecDouble &p, unsigned component=0)
virtual double operator() (const VecDouble &p, unsigned int component=0) const
virtual ~VectorFunction ()

Private Attributes

std::vector
< GeneralFunctionInterface * > 
vFunctions
int m_nComponents
bool m_delete

Detailed Description

Definition at line 16 of file sfunctions.h.


Constructor & Destructor Documentation

VectorFunction::VectorFunction ( GeneralFunctionInterface f1,
GeneralFunctionInterface f2,
bool  del = false 
) [inline]

Definition at line 23 of file sfunctions.h.

00024     :GeneralFunctionInterface(f1->getDomainDim(),2)
00025   {
00026     assert(f1->getDomainDim() == f2->getDomainDim());
00027     assert(f1->getImageDim() ==1);
00028     assert(f2->getImageDim() ==1);
00029     vFunctions.push_back(f1);
00030     vFunctions.push_back(f2);
00031     m_nComponents=2;
00032     m_delete=del;
00033   }

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

Definition at line 46 of file sfunctions.h.

00047     {
00048       for (unsigned i=0;i<vFunctions.size();i++)
00049       {
00050         delete vFunctions[i];
00051       }
00052     }


Member Function Documentation

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

Definition at line 36 of file sfunctions.h.

00037     {
00038       assert(component < getImageDim());
00039       return vFunctions[component]->isInDomain(p);
00040     }

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

Implements GeneralFunctionInterface.

Definition at line 41 of file sfunctions.h.

00042     {
00043       assert(component < getImageDim());
00044       return (*(vFunctions[component]))(p);
00045     }


Member Data Documentation

bool VectorFunction::m_delete [private]

Definition at line 20 of file sfunctions.h.

Definition at line 19 of file sfunctions.h.

Definition at line 18 of file sfunctions.h.


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