#include <facefluxwithindependentequations.h>
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 |
Definition at line 9 of file facefluxwithindependentequations.h.
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 }
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.
void FaceFluxWithIndependentEquations::maxGlobalCharVelocity | ( | double | vel[3] | ) | [virtual] |
This fucntion return the maximum possible characteristic velocity of the system
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 }
bool FaceFluxWithIndependentEquations::m_deleteObjs [private] |
Definition at line 14 of file facefluxwithindependentequations.h.
std::vector<Function1D*> FaceFluxWithIndependentEquations::m_Dfs [private] |
Definition at line 13 of file facefluxwithindependentequations.h.
std::vector<Function1D*> FaceFluxWithIndependentEquations::m_fs [private] |
Definition at line 12 of file facefluxwithindependentequations.h.
Definition at line 15 of file facefluxwithindependentequations.h.