#include <constvelocitymodule.h>
Public Member Functions | |
ConstVelocityModule (OrthoMesh &mesh, Function3D &f) | |
ConstVelocityModule (OrthoMesh &mesh, Function3D &f, Function3D &fPressure) | |
virtual | ~ConstVelocityModule () |
virtual void | getVelocitiesAtFaces (Matrix &vel) |
virtual void | iterate (TransportBase &trans) |
virtual void | getNormalVelocityAtFaces (VecDouble &vNormal) |
virtual void | printOutput () |
virtual const VecDouble & | getPressureAtCells () |
virtual void | setDt (double dt) |
Private Attributes | |
OrthoMesh & | m_mesh |
Function3D & | m_velFunction |
VecDouble | m_vPressure |
Definition at line 13 of file constvelocitymodule.h.
ConstVelocityModule::ConstVelocityModule | ( | OrthoMesh & | mesh, | |
Function3D & | f | |||
) |
Definition at line 9 of file constvelocitymodule.cpp.
00010 :m_mesh(mesh),m_velFunction(f),m_vPressure(m_mesh.numCells()) 00011 { 00012 assert(f.n_components() == 3); 00013 m_vPressure=0.0; 00014 }
ConstVelocityModule::ConstVelocityModule | ( | OrthoMesh & | mesh, | |
Function3D & | f, | |||
Function3D & | fPressure | |||
) |
Definition at line 16 of file constvelocitymodule.cpp.
00017 :m_mesh(mesh),m_velFunction(f),m_vPressure(m_mesh.numCells()) 00018 { 00019 assert(f.n_components() == 3); 00020 mesh.setCentralValuesFromFunction(fPressure,m_vPressure); 00021 }
ConstVelocityModule::~ConstVelocityModule | ( | ) | [virtual] |
Definition at line 26 of file constvelocitymodule.cpp.
void ConstVelocityModule::getNormalVelocityAtFaces | ( | VecDouble & | vNormal | ) | [virtual] |
Reimplemented from DynamicBase.
Definition at line 57 of file constvelocitymodule.cpp.
00058 { 00059 assert(vNormal.size()==m_mesh.numFaces()); 00060 OrthoMesh::Face_It face = m_mesh.begin_face(); 00061 OrthoMesh::Face_It endFace = m_mesh.end_face(); 00062 00063 for (;face!=endFace;face++) 00064 { 00065 00066 Point<3> P = face->barycenter(); 00067 unsigned faceIndex = face->index(); 00068 for (unsigned deg=0;deg<m_velFunction.n_components();deg++) 00069 { 00070 vNormal(faceIndex) = m_velFunction(P,face->getNormalOrientation()); 00071 } 00072 } 00073 }
const VecDouble & ConstVelocityModule::getPressureAtCells | ( | ) | [virtual] |
Reimplemented from DynamicBase.
Definition at line 76 of file constvelocitymodule.cpp.
00077 { 00078 return m_vPressure; 00079 }
void ConstVelocityModule::getVelocitiesAtFaces | ( | Matrix & | vel | ) | [virtual] |
Reimplemented from DynamicBase.
Definition at line 32 of file constvelocitymodule.cpp.
00033 { 00034 m_mesh.setFacesValuesFromFunction(m_velFunction,vel); 00035 }
void ConstVelocityModule::iterate | ( | TransportBase & | trans | ) | [virtual] |
Implements DynamicBase.
Definition at line 40 of file constvelocitymodule.cpp.
virtual void ConstVelocityModule::printOutput | ( | ) | [inline, virtual] |
void ConstVelocityModule::setDt | ( | double | dt | ) | [virtual] |
Definition at line 82 of file constvelocitymodule.cpp.
OrthoMesh& ConstVelocityModule::m_mesh [private] |
Definition at line 15 of file constvelocitymodule.h.
Function3D& ConstVelocityModule::m_velFunction [private] |
Definition at line 16 of file constvelocitymodule.h.
VecDouble ConstVelocityModule::m_vPressure [private] |
Definition at line 17 of file constvelocitymodule.h.