FixedValueCondition Class Reference

#include <fixedvaluecondition.h>

Collaboration diagram for FixedValueCondition:
Collaboration graph
[legend]

List of all members.

Classes

class  Node

Public Member Functions

 FixedValueCondition ()
 ~FixedValueCondition ()
void applyConditions (VecDouble &v)
void applyConditions (ArrayOfVecDouble &v)
void addFixedCondition (OrthoMesh &mesh, Point3D &p, double value)
void addFixedCondition (unsigned index, double value)
void addTransportFixedCondition (OrthoMesh &mesh, const VecWellInfo &wells)

Private Attributes

std::vector< Nodedata

Detailed Description

FixedValueCondition

Definition at line 10 of file fixedvaluecondition.h.


Constructor & Destructor Documentation

FixedValueCondition::FixedValueCondition (  ) 

Definition at line 51 of file fixedvaluecondition.cpp.

00052 {
00053 
00054 }

FixedValueCondition::~FixedValueCondition (  )  [inline]

Definition at line 23 of file fixedvaluecondition.h.

00023 {}


Member Function Documentation

void FixedValueCondition::addFixedCondition ( unsigned  index,
double  value 
)

Definition at line 41 of file fixedvaluecondition.cpp.

00042 {
00043   Node node;
00044   node.index = index;
00045   node.values.reinit(1);
00046   node.values(0)= value;
00047   data.push_back(node);
00048 }

void FixedValueCondition::addFixedCondition ( OrthoMesh mesh,
Point3D p,
double  value 
)

Definition at line 29 of file fixedvaluecondition.cpp.

00030 {
00031   OrthoMesh::Cell_It cell = mesh.getCellAt(p);
00032   Node node;
00033   node.index = cell->index();
00034   node.values.reinit(1);
00035   node.values(0)= value;
00036   data.push_back(node);
00037   
00038 }

void FixedValueCondition::addTransportFixedCondition ( OrthoMesh mesh,
const VecWellInfo wells 
)

Definition at line 57 of file fixedvaluecondition.cpp.

00058 {
00059   OrthoMesh::Cell_It cell = mesh.begin_cell();
00060   OrthoMesh::Cell_It endc = mesh.end_cell();
00061   Node node;
00062   for(;cell!=endc;cell++)
00063   {
00064     Point3D p;
00065     cell->barycenter(p);
00066     for (unsigned i=0;i<wells.size();i++)
00067     {
00068       if (wells[i].isPointInWell(p))
00069       {
00070           node.index=cell->index();
00071           node.values=wells[i].getTransportBC();
00072       }
00073     }
00074   }
00075 }  

void FixedValueCondition::applyConditions ( ArrayOfVecDouble v  ) 

Definition at line 13 of file fixedvaluecondition.cpp.

00014 {
00015   for (unsigned i=0;i<data.size();i++)
00016   {
00017     assert(v.vecs_size() == data[i].values.size());
00018     for (unsigned j=0;j<v.vecs_size();j++)
00019     {
00020       v(data[i].index,j)=data[i].values(j);
00021     }
00022   }
00023   
00024 }

void FixedValueCondition::applyConditions ( VecDouble v  ) 

Definition at line 4 of file fixedvaluecondition.cpp.

00005 {
00006   
00007   for (unsigned i=0;i<data.size();i++)
00008   {
00009     v(data[i].index)=data[i].values(0);
00010   }
00011 }


Member Data Documentation

std::vector<Node> FixedValueCondition::data [private]

Definition at line 18 of file fixedvaluecondition.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:06 2012 for CO2INJECTION by  doxygen 1.6.3