#include <cudaktmethod.h>
Public Member Functions | |
CUDAKTMethod (OrthoMesh &mesh, Function3D &fInitU, const VecDouble &cPor, Function3D &fPrescribedU, double v1, double v2, double theta, double rs1, double rs2, double CFL) | |
virtual void | updateVelocities (DynamicBase &dynMod) |
virtual void | iterateN (unsigned n, double dt) |
virtual double | getDt (double t, double tEnd) |
virtual ArrayOfVecDouble & | getSolutionAtCells () |
virtual void | printOutput () |
virtual void | updateDataForDynamicModule () |
Private Attributes | |
ArrayOfVecDouble | m_vSol |
VecDouble | m_vFluxes |
VecDouble | m_fValues |
VecDouble | m_vNV |
OrthoMesh & | m_mesh |
double * | m_vX |
double * | m_vY |
double * | m_vZ |
VecDouble | m_vX0 |
VecDouble | m_vX1 |
VecDouble | m_vY0 |
VecDouble | m_vY1 |
VecDouble | m_vZ0 |
VecDouble | m_vZ1 |
double | m_CFL |
unsigned | m_nX |
unsigned | m_nY |
unsigned | m_nZ |
Point3D | m_Q |
double | m_rs1 |
double | m_rs2 |
double | m_theta |
double | m_v1 |
double | m_v2 |
double | m_por |
Definition at line 8 of file cudaktmethod.h.
CUDAKTMethod::CUDAKTMethod | ( | OrthoMesh & | mesh, | |
Function3D & | fInitU, | |||
const VecDouble & | cPor, | |||
Function3D & | fPrescribedU, | |||
double | v1, | |||
double | v2, | |||
double | theta, | |||
double | rs1, | |||
double | rs2, | |||
double | CFL | |||
) |
Definition at line 8 of file cudaktmethod.cpp.
00009 :m_mesh(mesh) 00010 { 00011 00012 //Set the initial values for the saturation; 00013 m_vSol.reinit(mesh.numCells(),1); 00014 mesh.setCentralValuesFromFunction(fInitU,m_vSol); 00015 m_vFluxes.reinit(mesh.numFaces()); 00016 m_fValues.reinit(mesh.numFaces()); 00017 VecIndex vIX0,vIX1,vIY0,vIY1,vIZ0,vIZ1; 00018 m_CFL = CFL; 00019 00020 mesh.getFacesInSlab(mesh.getP()[0],vIX0,0); 00021 mesh.getFacesInSlab(mesh.getQ()[0],vIX1,0); 00022 mesh.getFacesInSlab(mesh.getP()[1],vIY0,1); 00023 mesh.getFacesInSlab(mesh.getQ()[1],vIY1,1); 00024 mesh.getFacesInSlab(mesh.getP()[2],vIZ0,2); 00025 mesh.getFacesInSlab(mesh.getQ()[2],vIZ1,2); 00026 00027 NumericMethods::fillVector(m_fValues,INFINITY); 00028 mesh.setFacesValuesFromFunction(fPrescribedU,m_fValues,0,true); 00029 00030 00031 NumericMethods::getSubVector(m_fValues,vIX0,m_vX0); 00032 NumericMethods::getSubVector(m_fValues,vIX1,m_vX1); 00033 NumericMethods::getSubVector(m_fValues,vIY0,m_vY0); 00034 NumericMethods::getSubVector(m_fValues,vIY1,m_vY1); 00035 NumericMethods::getSubVector(m_fValues,vIZ0,m_vZ0); 00036 NumericMethods::getSubVector(m_fValues,vIZ1,m_vZ1); 00037 00038 // 00039 //mesh.setFacesValuesFromFunction(fPrescribedU,m_fValues,0,true); 00040 m_nX = mesh.numElemX(); 00041 m_nY = mesh.numElemY(); 00042 m_nZ = mesh.numElemZ(); 00043 00044 m_Q = mesh.getQ(); 00045 00046 m_rs1=rs1; 00047 m_rs2=rs2; 00048 m_theta=theta; 00049 m_v1 = v1; 00050 m_v2=v2; 00051 m_por = cPor(0); 00052 }
double CUDAKTMethod::getDt | ( | double | t, | |
double | tEnd | |||
) | [virtual] |
Implements TransportBase.
Definition at line 106 of file cudaktmethod.cpp.
00107 { 00108 return NAN; 00109 throw new Exception("Cuda not working for now\n"); 00110 00111 }
ArrayOfVecDouble & CUDAKTMethod::getSolutionAtCells | ( | ) | [virtual] |
Implements TransportBase.
Definition at line 69 of file cudaktmethod.cpp.
00070 { 00071 return m_vSol; 00072 00073 }
void CUDAKTMethod::iterateN | ( | unsigned | n, | |
double | dt | |||
) | [virtual] |
Implements TransportBase.
Definition at line 88 of file cudaktmethod.cpp.
00089 { 00090 throw new Exception("Cuda not working for now\n"); 00091 00092 00093 //m_vSol has the initial value parameter 00094 //m_vX0, m_vX1 LEFT AND RIGHT FACE 00095 //m_vZ0, m_vZ1 BOTTOM AND UP FACE 00096 //m_vY0, m_vY1 FRONT AND BACK FACE 00097 //m_vX, m_vY, m_vZ normal components of the velocities at the faces 00098 00099 //To avoid linking problems this line of code was commented. 00100 //integrate_hyperbolic_code(m_CFL, t, tEnd, &(m_vSol(0)), &(m_vX0(0)), &(m_vX1(0)), &(m_vY0(0)), &(m_vY1(0)), &(m_vZ0(0)), &(m_vZ1(0)), m_vX, m_vY, m_vZ); 00101 }
void CUDAKTMethod::printOutput | ( | ) | [virtual] |
void CUDAKTMethod::updateDataForDynamicModule | ( | ) | [virtual] |
Event that runs imediately before the Dynamic Module
Reimplemented from TransportBase.
Definition at line 82 of file cudaktmethod.cpp.
void CUDAKTMethod::updateVelocities | ( | DynamicBase & | dynMod | ) | [virtual] |
Implements TransportBase.
Definition at line 55 of file cudaktmethod.cpp.
00056 { 00057 //Get normal velocities 00058 dynMod.getNormalVelocityAtFaces(m_vNV); 00059 00060 //split the velocity vector field at faces in three parts 00061 //one corresponding to each dimension 00062 m_vX = &(m_vNV(0)); 00063 m_vY = m_vX+m_mesh.getFacesInYOffset(); 00064 m_vZ = m_vX+m_mesh.getFacesInZOffset(); 00065 00066 //Store the velocitieson GPU 00067 }
double CUDAKTMethod::m_CFL [private] |
Definition at line 18 of file cudaktmethod.h.
VecDouble CUDAKTMethod::m_fValues [private] |
Definition at line 13 of file cudaktmethod.h.
OrthoMesh& CUDAKTMethod::m_mesh [private] |
Definition at line 15 of file cudaktmethod.h.
unsigned CUDAKTMethod::m_nX [private] |
Definition at line 19 of file cudaktmethod.h.
unsigned CUDAKTMethod::m_nY [private] |
Definition at line 19 of file cudaktmethod.h.
unsigned CUDAKTMethod::m_nZ [private] |
Definition at line 19 of file cudaktmethod.h.
double CUDAKTMethod::m_por [private] |
Definition at line 21 of file cudaktmethod.h.
Point3D CUDAKTMethod::m_Q [private] |
Definition at line 20 of file cudaktmethod.h.
double CUDAKTMethod::m_rs1 [private] |
Definition at line 21 of file cudaktmethod.h.
double CUDAKTMethod::m_rs2 [private] |
Definition at line 21 of file cudaktmethod.h.
double CUDAKTMethod::m_theta [private] |
Definition at line 21 of file cudaktmethod.h.
double CUDAKTMethod::m_v1 [private] |
Definition at line 21 of file cudaktmethod.h.
double CUDAKTMethod::m_v2 [private] |
Definition at line 21 of file cudaktmethod.h.
VecDouble CUDAKTMethod::m_vFluxes [private] |
Definition at line 12 of file cudaktmethod.h.
VecDouble CUDAKTMethod::m_vNV [private] |
Definition at line 14 of file cudaktmethod.h.
ArrayOfVecDouble CUDAKTMethod::m_vSol [private] |
Definition at line 11 of file cudaktmethod.h.
double* CUDAKTMethod::m_vX [private] |
Definition at line 16 of file cudaktmethod.h.
VecDouble CUDAKTMethod::m_vX0 [private] |
Definition at line 17 of file cudaktmethod.h.
VecDouble CUDAKTMethod::m_vX1 [private] |
Definition at line 17 of file cudaktmethod.h.
double * CUDAKTMethod::m_vY [private] |
Definition at line 16 of file cudaktmethod.h.
VecDouble CUDAKTMethod::m_vY0 [private] |
Definition at line 17 of file cudaktmethod.h.
VecDouble CUDAKTMethod::m_vY1 [private] |
Definition at line 17 of file cudaktmethod.h.
double * CUDAKTMethod::m_vZ [private] |
Definition at line 16 of file cudaktmethod.h.
VecDouble CUDAKTMethod::m_vZ0 [private] |
Definition at line 17 of file cudaktmethod.h.
VecDouble CUDAKTMethod::m_vZ1 [private] |
Definition at line 17 of file cudaktmethod.h.