Newer
Older
#ifndef eulerPROBLEM_H_
#define eulerPROBLEM_H_
#include <problems/tnlPDEProblem.h>
#include <functions/tnlMeshFunction.h>
template< typename Mesh,
typename BoundaryCondition,
typename RightHandSide,
typename DifferentialOperator >
class eulerProblem:
public tnlPDEProblem< Mesh,
typename DifferentialOperator::RealType,
typename Mesh::DeviceType,
typename DifferentialOperator::IndexType >
{
public:
typedef typename DifferentialOperator::RealType RealType;
typedef typename Mesh::DeviceType DeviceType;
typedef typename DifferentialOperator::IndexType IndexType;
typedef tnlMeshFunction< Mesh > MeshFunctionType;
typedef tnlPDEProblem< Mesh, RealType, DeviceType, IndexType > BaseType;
using typename BaseType::MeshType;
using typename BaseType::DofVectorType;
using typename BaseType::MeshDependentDataType;
typedef tnlMeshFunction<Mesh,Mesh::getMeshDimensions(),RealType>MeshFunction;
//definition
tnlVector< RealType, DeviceType, IndexType > _uRho;
tnlVector< RealType, DeviceType, IndexType > _uRhoVelocity;
tnlVector< RealType, DeviceType, IndexType > _uEnergy;
tnlVector< RealType, DeviceType, IndexType > _fuRho;
tnlVector< RealType, DeviceType, IndexType > _fuRhoVelocity;
tnlVector< RealType, DeviceType, IndexType > _fuEnergy;
static tnlString getTypeStatic();
tnlVector< RealType, DeviceType, IndexType > rho;
tnlVector< RealType, DeviceType, IndexType > rhoVel;
tnlVector< RealType, DeviceType, IndexType > energy;
tnlVector< RealType, DeviceType, IndexType > data;
tnlVector< RealType, DeviceType, IndexType > pressure;
tnlVector< RealType, DeviceType, IndexType > velocity;
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
double gamma;
tnlString getPrologHeader() const;
void writeProlog( tnlLogger& logger,
const tnlParameterContainer& parameters ) const;
bool setup( const tnlParameterContainer& parameters );
bool setInitialCondition( const tnlParameterContainer& parameters,
const MeshType& mesh,
DofVectorType& dofs,
MeshDependentDataType& meshDependentData );
template< typename Matrix >
bool setupLinearSystem( const MeshType& mesh,
Matrix& matrix );
bool makeSnapshot( const RealType& time,
const IndexType& step,
const MeshType& mesh,
DofVectorType& dofs,
MeshDependentDataType& meshDependentData );
IndexType getDofs( const MeshType& mesh ) const;
void bindDofs( const MeshType& mesh,
DofVectorType& dofs );
void getExplicitRHS( const RealType& time,
const RealType& tau,
const MeshType& mesh,
DofVectorType& _u,
DofVectorType& _fu,
MeshDependentDataType& meshDependentData );
template< typename Matrix >
void assemblyLinearSystem( const RealType& time,
const RealType& tau,
const MeshType& mesh,
DofVectorType& dofs,
Matrix& matrix,
DofVectorType& rightHandSide,
MeshDependentDataType& meshDependentData );
bool postIterate( const RealType& time,
const RealType& tau,
const MeshType& mesh,
DofVectorType& dofs,
MeshDependentDataType& meshDependentData );