FaceFluxWithIndependentEquations Class Reference

#include <facefluxwithindependentequations.h>

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

List of all members.

Public Member Functions

 FaceFluxWithIndependentEquations (OrthoMesh &mesh, Function1D *f1, Function1D *Df1, Function1D *f2, Function1D *Df2, bool deleteObjs)
virtual ~FaceFluxWithIndependentEquations ()
virtual void fluxAtFace (VecDouble &vFlux, const FaceInfo &face, const VecDouble &Q1, const VecDouble &Q2)
virtual double maxLocalCharVelocity (const FaceInfo &face, const VecDouble &Q1, const VecDouble &Q2)
virtual void maxGlobalCharVelocity (double vel[3])
void updateDynamicData (DynamicBase &dynMod)

Private Attributes

std::vector< Function1D * > m_fs
std::vector< Function1D * > m_Dfs
bool m_deleteObjs
Matrix m_Vel

Detailed Description

Definition at line 9 of file facefluxwithindependentequations.h.


Constructor & Destructor Documentation

FaceFluxWithIndependentEquations::FaceFluxWithIndependentEquations ( OrthoMesh mesh,
Function1D f1,
Function1D Df1,
Function1D f2,
Function1D Df2,
bool  deleteObjs 
)

Definition at line 5 of file facefluxwithindependentequations.cpp.

00006    :FaceFluxFunction(2),m_Vel(mesh.numFaces(),3)
00007  {
00008    m_fs.push_back(f1);
00009    m_fs.push_back(f2);
00010    m_Dfs.push_back(Df1);
00011    m_Dfs.push_back(Df2);
00012 
00013 
00014    m_deleteObjs = deleteObjs;
00015  }

FaceFluxWithIndependentEquations::~FaceFluxWithIndependentEquations (  )  [virtual]

Definition at line 17 of file facefluxwithindependentequations.cpp.

00018 {
00019   if (m_deleteObjs)
00020   {
00021     for (unsigned i = 0;i<m_fs.size();i++)
00022     {
00023       delete m_fs[i]; 
00024     }
00025   }
00026  }


Member Function Documentation

void FaceFluxWithIndependentEquations::fluxAtFace ( VecDouble vFlux,
const FaceInfo face,
const VecDouble Q1,
const VecDouble Q2 
) [virtual]

Reimplemented from FaceFluxFunction.

Definition at line 74 of file facefluxwithindependentequations.cpp.

00075 {
00076   assert((unsigned) face.index < m_Vel.m());
00077 
00078     
00079   vFlux(0)=  (*(m_fs[0]))(Q1(0)) + (*(m_fs[0]))(Q2(0));
00080   vFlux(1)=  (*(m_fs[1]))(Q1(1)) + (*(m_fs[1]))(Q2(1));
00081   vFlux*=m_Vel(face.index,face.normal)/2.0;
00082 
00083 }

void FaceFluxWithIndependentEquations::maxGlobalCharVelocity ( double  vel[3]  )  [virtual]

This fucntion return the maximum possible characteristic velocity of the system

Parameters:
vel To contain the maximum characteristic velocity

Reimplemented from FaceFluxFunction.

Definition at line 45 of file facefluxwithindependentequations.cpp.

00046 {
00047   VecDouble minVel(3);
00048   VecDouble maxVel(3);
00049   double maxGrad=0.0;
00050   for (unsigned i=0;i<m_fs.size();i++)
00051   {
00052     double maxGradCmp = m_Dfs[i]->getMaxNorm(0,1);
00053     if (maxGradCmp > maxGrad)
00054       maxGrad = maxGradCmp;
00055   }
00056   NumericMethods::getMinMaxValueByColumn(m_Vel,minVel,maxVel);
00057   vel[X]= NumericMethods::maxMod(minVel(X),maxVel(X))*maxGrad;
00058   vel[Y]= NumericMethods::maxMod(minVel(Y),maxVel(Y))*maxGrad;
00059   vel[Z]= NumericMethods::maxMod(minVel(Z),maxVel(Z))*maxGrad;
00060 
00061 }

double FaceFluxWithIndependentEquations::maxLocalCharVelocity ( const FaceInfo face,
const VecDouble Q1,
const VecDouble Q2 
) [virtual]

Reimplemented from FaceFluxFunction.

Definition at line 85 of file facefluxwithindependentequations.cpp.

00086 {
00087   assert(Q1.size() == numComponents());
00088   assert(Q2.size() == numComponents());
00089   double a1,a2;
00090   if (Q1(0) <= Q2(0))
00091     a1=m_Vel(face.index,face.normal) * m_Dfs[0]->getMaxNorm(Q1(0),Q2(0));
00092   else
00093     a1=m_Vel(face.index,face.normal) * m_Dfs[0]->getMaxNorm(Q2(0),Q1(0));
00094 
00095   if (Q1(1) <= Q2(1))
00096     a2=m_Vel(face.index,face.normal) * m_Dfs[1]->getMaxNorm(Q1(1),Q2(1));
00097   else
00098     a2=m_Vel(face.index,face.normal) * m_Dfs[1]->getMaxNorm(Q2(1),Q1(1));
00099   return std::max(a1,a2);
00100   
00101 }

void FaceFluxWithIndependentEquations::updateDynamicData ( DynamicBase dynMod  )  [virtual]

Reimplemented from FaceFluxFunction.

Definition at line 65 of file facefluxwithindependentequations.cpp.

00066 {
00067     dynMod.getVelocitiesAtFaces(m_Vel);
00068 }


Member Data Documentation

Definition at line 14 of file facefluxwithindependentequations.h.

Definition at line 13 of file facefluxwithindependentequations.h.

Definition at line 12 of file facefluxwithindependentequations.h.

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