36 static const std::string
name;
43 template<
int direction>
53 template<
int direction>
65 }
else if (direction == 0) {
66 F[0] =
bar(leftZ[1], rightZ[1]) *
ln(leftZ[4], rightZ[4]);
67 F[1] =
bar(leftZ[4], rightZ[4]) /
bar(leftZ[0], rightZ[0]) +
bar(leftZ[1],
68 rightZ[1]) /
bar(leftZ[0], rightZ[0]) * F[0];
69 F[2] =
bar(leftZ[2], rightZ[2]) /
bar(leftZ[0], rightZ[0]) * F[0];
71 F[4] = 1.0 / (2 *
bar(leftZ[0],
72 rightZ[0])) * ((gamma + 1) / (gamma - 1) *
divLn(leftZ[0], rightZ[0],
73 (F[0])) +
bar(leftZ[1], rightZ[1]) * F[1] +
bar(leftZ[2], rightZ[2]) * F[2]);
74 }
else if (direction == 1) {
75 F[0] =
bar(leftZ[2], rightZ[2]) *
ln(leftZ[4], rightZ[4]);
76 F[1] =
bar(leftZ[1], rightZ[1]) /
bar(leftZ[0], rightZ[0]) * F[0];
77 F[2] =
bar(leftZ[4], rightZ[4]) /
bar(leftZ[0], rightZ[0]) +
bar(leftZ[2],
78 rightZ[2]) /
bar(leftZ[0], rightZ[0]) * F[0];
80 F[4] = 1.0 / (2 *
bar(leftZ[0],
81 rightZ[0])) * ((gamma + 1) / (gamma - 1) *
divLn(leftZ[0], rightZ[0],
82 (F[0])) +
bar(leftZ[1], rightZ[1]) * F[1] +
bar(leftZ[2], rightZ[2]) * F[2]);
85 real leftSpeed = 0, rightSpeed = 0;
89 return fmax(fabs(leftSpeed), fabs(rightSpeed));
95 template<
int direction>
107 }
else if (direction == 0) {
108 F[0] =
bar(leftZ[1], rightZ[1]) *
ln(leftZ[3], rightZ[3]);
109 F[1] =
bar(leftZ[3], rightZ[3]) /
bar(leftZ[0], rightZ[0]) +
bar(leftZ[1],
110 rightZ[1]) /
bar(leftZ[0], rightZ[0]) * F[0];
111 F[2] =
bar(leftZ[2], rightZ[2]) /
bar(leftZ[0], rightZ[0]) * F[0];
112 F[3] = 1.0 / (2 *
bar(leftZ[0],
113 rightZ[0])) * ((gamma + 1) / (gamma - 1) *
divLn(leftZ[0], rightZ[0],
114 (F[0])) +
bar(leftZ[1], rightZ[1]) * F[1] +
bar(leftZ[2], rightZ[2]) * F[2]);
115 }
else if (direction == 1) {
116 F[0] =
bar(leftZ[2], rightZ[2]) *
ln(leftZ[3], rightZ[3]);
117 F[1] =
bar(leftZ[1], rightZ[1]) /
bar(leftZ[0], rightZ[0]) * F[0];
118 F[2] =
bar(leftZ[3], rightZ[3]) /
bar(leftZ[0], rightZ[0]) +
bar(leftZ[2],
119 rightZ[2]) /
bar(leftZ[0], rightZ[0]) * F[0];
120 F[3] = 1.0 / (2 *
bar(leftZ[0],
121 rightZ[0])) * ((gamma + 1) / (gamma - 1) *
divLn(leftZ[0], rightZ[0],
122 (F[0])) +
bar(leftZ[1], rightZ[1]) * F[1] +
bar(leftZ[2], rightZ[2]) * F[2]);
125 real leftSpeed = 0, rightSpeed = 0;
129 return fmax(fabs(leftSpeed), fabs(rightSpeed));
137 template<
int direction>
149 }
else if (direction == 0) {
150 F[0] =
bar(leftZ[1], rightZ[1]) *
ln(leftZ[2], rightZ[2]);
151 F[1] =
bar(leftZ[2], rightZ[2]) /
bar(leftZ[0], rightZ[0]) +
bar(leftZ[1],
152 rightZ[1]) /
bar(leftZ[0], rightZ[0]) * F[0];
153 F[2] = 1.0 / (2 *
bar(leftZ[0],
154 rightZ[0])) * ((gamma + 1) / (gamma - 1) *
divLn(leftZ[0], rightZ[0],
155 (F[0])) +
bar(leftZ[1], rightZ[1]) * F[1]);
158 real leftSpeed = 0, rightSpeed = 0;
162 return fmax(fabs(leftSpeed), fabs(rightSpeed));
Definition: types.hpp:104
Types< nsd+2 >::rvec state_vector
Definition: Tecno1.hpp:39
__device__ __host__ real getGamma() const
Definition: Euler.hpp:299
__device__ __host__ void computePointFlux(const AllVariables &u, ConservedVariables &F) const
Definition: Euler.hpp:173
static const std::string name
name is "tecno1"
Definition: Tecno1.hpp:36
#define __host__
Definition: types.hpp:46
Definition: ConservedVariables.hpp:30
double real
Definition: types.hpp:65
__device__ __host__ TecnoVariables computeTecnoVariables(const ConservedVariables &conserved) const
Definition: Euler.hpp:311
__device__ __host__ real bar(real left, real right)
Definition: tecno_utils.hpp:22
Definition: Tecno1.hpp:31
#define __device__
Definition: types.hpp:45
Definition: AllVariables.hpp:27
Various utility functions to implement the tecno flux.
Definition: types.hpp:30
Types< nsd >::rvec rvec
Definition: Tecno1.hpp:38
__device__ __host__ real divLn(real left, real right, real F)
Definition: tecno_utils.hpp:39
__device__ __host__ real ln(real left, real right)
Definition: tecno_utils.hpp:29
__device__ static __host__ real computeFlux(const equation::euler::Euler< nsd > &eq, const equation::euler::AllVariables< nsd > &left, const equation::euler::AllVariables< nsd > &right, equation::euler::ConservedVariables< nsd > &F)