8#include <compile_time_options.h>
19#include <deal.II/base/memory_space.h>
20#include <deal.II/base/parameter_acceptor.h>
21#include <deal.II/base/tensor.h>
31 typename MemorySpace = dealii::MemorySpace::Host>
32 class HyperbolicSystemView;
51 "Compressible Euler equations (polytropic gas EOS, optimized)";
100 typename Number = double,
101 typename MemorySpace = dealii::MemorySpace::Host>
113 typename MemorySpace = dealii::MemorySpace::Host>
127 template <
typename MemorySpace = dealii::MemorySpace::Host,
129 typename ScalarNumber>
134 const bool skip_constrained_dofs =
true)
const;
148 void update_parameters();
154 template <
int,
typename,
typename>
182 template <
int dim,
typename Number,
typename MemorySpace>
187 std::is_same_v<MemorySpace, dealii::MemorySpace::Host> ||
188 std::is_same_v<MemorySpace, dealii::MemorySpace::Default>,
189 "Unexpected memory space");
209 using state_type = dealii::Tensor<1, problem_dimension, Number>;
215 dealii::Tensor<1, problem_dimension, dealii::Tensor<1, dim, Number>>;
227 []() -> std::array<std::string, problem_dimension> {
228 if constexpr (dim == 1)
229 return {
"rho",
"m",
"E"};
230 else if constexpr (dim == 2)
231 return {
"rho",
"m_1",
"m_2",
"E"};
232 else if constexpr (dim == 3)
233 return {
"rho",
"m_1",
"m_2",
"m_3",
"E"};
242 []() -> std::array<std::string, problem_dimension> {
243 if constexpr (dim == 1)
244 return {
"rho",
"v",
"p"};
245 else if constexpr (dim == 2)
246 return {
"rho",
"v_1",
"v_2",
"p"};
247 else if constexpr (dim == 3)
248 return {
"rho",
"v_1",
"v_2",
"v_3",
"p"};
266 std::array<std::string, n_precomputed_values>{
"s",
"eta_h"};
277 std::array<Number, n_initial_precomputed_values>;
283 std::array<std::string, n_initial_precomputed_values>{};
289 StateVector<ScalarNumber, problem_dimension, n_precomputed_values>;
310 dealii::VectorizedArray<ScalarNumber>::size(),
329 dealii::VectorizedArray<ScalarNumber>::size(),
345 hyperbolic_system.parameters_.template view<MemorySpace>())
444 static DEAL_II_HOST_DEVICE dealii::Tensor<1, dim, Number>
520 DEAL_II_HOST_DEVICE Number
549 template <
int component>
552 const dealii::Tensor<1, dim, Number> &normal)
const;
560 template <
int component>
564 const dealii::Tensor<1, dim, Number> &normal)
const;
584 template <
typename Lambda>
588 const dealii::Tensor<1, dim, Number> &normal,
589 const Lambda &get_dirichlet_data)
const;
632 const unsigned int i,
639 const unsigned int *js,
650 const dealii::Tensor<1, dim, Number> &c_ij)
const;
659 const dealii::Tensor<1, dim, Number> &c_ij)
const =
delete;
672 const unsigned int i,
678 const unsigned int *js,
698 template <
typename ST>
714 template <
typename ST>
737 template <
typename Lambda>
739 const state_type &state,
const Lambda &lambda)
const;
761 : ParameterAcceptor(subsection)
762 , parameters_(
"euler_hyperbolic_system_parameters",
773 auto ¶meters = *parameters_.view();
775 parameters.gamma = 7. / 5.;
776 add_parameter(
"gamma", parameters.gamma,
"The ratio of specific heats");
778 parameters.reference_density = 1.;
779 add_parameter(
"reference density",
780 parameters.reference_density,
781 "Problem specific density reference");
783 parameters.vacuum_state_relaxation_small = 1.e2;
784 add_parameter(
"vacuum state relaxation small",
785 parameters.vacuum_state_relaxation_small,
786 "Problem specific vacuum relaxation parameter");
788 parameters.vacuum_state_relaxation_large = 1.e4;
789 add_parameter(
"vacuum state relaxation large",
790 parameters.vacuum_state_relaxation_large,
791 "Problem specific vacuum relaxation parameter");
793 ParameterAcceptor::parse_parameters_call_back.connect(
794 [
this] { update_parameters(); });
800 inline void HyperbolicSystem::update_parameters()
802 auto ¶meters = *parameters_.view();
808 const auto gamma = parameters.gamma;
809 parameters.gamma_inverse = 1. / gamma;
810 parameters.gamma_plus_one_inverse = 1. / (gamma + 1.);
811 parameters.gamma_minus_one_inverse = 1. / (gamma - 1.);
812 parameters.gamma_minus_one_over_gamma_plus_one =
813 (gamma - 1.) / (gamma + 1.);
817 template <
typename MemorySpace,
int dim,
typename ScalarNumber>
822 const bool skip_constrained_dofs)
const
827 const auto sparsity_simd_view =
832 std::get<0>(std::as_const(state_vector)).template view<MemorySpace>();
833 const auto precomputed_view =
834 std::get<1>(state_vector).template view<MemorySpace>();
836 const auto hyperbolic_system_views =
837 make_select_view<dim, ScalarNumber, MemorySpace>(*
this);
839 const auto body = [=](
auto sentinel,
unsigned int i) {
840 using T =
decltype(sentinel);
844 const unsigned int row_length = sparsity_simd_view.row_length(i);
845 if (skip_constrained_dofs && row_length == 1)
848 const auto view = hyperbolic_system_views.template view<T>();
850 const auto U_i = U_view.template read_tensor<T>(i);
851 const precomputed_type prec_i{
view.specific_entropy(U_i),
852 view.harten_entropy(U_i)};
853 precomputed_view.template write_tensor<T>(prec_i, i);
856 loop<MemorySpace, ScalarNumber>(
857 "hyperbolic_kernel_01b", body, 0, n_internal, n_owned);
861 template <
int dim,
typename Number,
typename MemorySpace>
862 DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number
869 template <
int dim,
typename Number,
typename MemorySpace>
870 DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number
872 const Number &rho)
const
874 constexpr ScalarNumber eps = std::numeric_limits<ScalarNumber>::epsilon();
875 const Number rho_cutoff_large =
876 reference_density() * vacuum_state_relaxation_large() * eps;
878 return ryujin::compare_and_apply_mask<dealii::SIMDComparison::less_than>(
879 std::abs(rho), rho_cutoff_large, Number(0.), rho);
883 template <
int dim,
typename Number,
typename MemorySpace>
884 DEAL_II_HOST_DEVICE_ALWAYS_INLINE dealii::Tensor<1, dim, Number>
888 dealii::Tensor<1, dim, Number> result;
889 for (
unsigned int i = 0; i < dim; ++i)
890 result[i] = U[1 + i];
895 template <
int dim,
typename Number,
typename MemorySpace>
896 DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number
904 template <
int dim,
typename Number,
typename MemorySpace>
905 DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number
912 const Number rho_inverse =
ScalarNumber(1.) / density(U);
913 const auto m = momentum(U);
914 const Number E = total_energy(U);
915 return E -
ScalarNumber(0.5) * m.norm_square() * rho_inverse;
919 template <
int dim,
typename Number,
typename MemorySpace>
920 DEAL_II_HOST_DEVICE_ALWAYS_INLINE
auto
931 const Number rho_inverse =
ScalarNumber(1.) / density(U);
932 const auto u = momentum(U) * rho_inverse;
937 for (
unsigned int i = 0; i < dim; ++i) {
938 result[1 + i] = -u[i];
946 template <
int dim,
typename Number,
typename MemorySpace>
947 DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number
952 return (gamma() -
ScalarNumber(1.)) * internal_energy(U);
956 template <
int dim,
typename Number,
typename MemorySpace>
957 DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number
962 const Number rho_inverse =
ScalarNumber(1.) / density(U);
963 const Number p = pressure(U);
964 return std::sqrt(gamma() * p * rho_inverse);
968 template <
int dim,
typename Number,
typename MemorySpace>
969 DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number
975 return internal_energy(U) *
ryujin::pow(rho_inverse, gamma());
979 template <
int dim,
typename Number,
typename MemorySpace>
980 DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number
986 const Number rho = density(U);
987 const auto m = momentum(U);
988 const Number E = total_energy(U);
990 const Number rho_rho_e = rho * E -
ScalarNumber(0.5) * m.norm_square();
991 return ryujin::pow(rho_rho_e, gamma_plus_one_inverse());
995 template <
int dim,
typename Number,
typename MemorySpace>
996 DEAL_II_HOST_DEVICE_ALWAYS_INLINE
auto
1011 const Number rho = density(U);
1012 const auto m = momentum(U);
1013 const Number E = total_energy(U);
1015 const Number rho_rho_e = rho * E -
ScalarNumber(0.5) * m.norm_square();
1018 gamma_plus_one_inverse() *
1019 ryujin::pow(rho_rho_e, -gamma() * gamma_plus_one_inverse());
1023 result[0] = factor * E;
1024 for (
unsigned int i = 0; i < dim; ++i)
1025 result[1 + i] = -factor * m[i];
1026 result[dim + 1] = factor * rho;
1032 template <
int dim,
typename Number,
typename MemorySpace>
1033 DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number
1038 const auto p = pressure(U);
1043 template <
int dim,
typename Number,
typename MemorySpace>
1044 DEAL_II_HOST_DEVICE_ALWAYS_INLINE
auto
1060 const Number rho = density(U);
1062 const auto u = momentum(U) * rho_inverse;
1063 const auto p = pressure(U);
1065 const auto factor = (gamma() -
ScalarNumber(1.0)) * gamma_inverse() *
1070 result[0] = factor *
ScalarNumber(0.5) * u.norm_square();
1071 result[dim + 1] = factor;
1072 for (
unsigned int i = 0; i < dim; ++i) {
1073 result[1 + i] = -factor * u[i];
1080 template <
int dim,
typename Number,
typename MemorySpace>
1081 DEAL_II_HOST_DEVICE_ALWAYS_INLINE
bool
1085 const auto rho_new = density(U);
1086 const auto e_new = internal_energy(U);
1087 const auto s_new = specific_entropy(U);
1089 constexpr auto gt = dealii::SIMDComparison::greater_than;
1092 ryujin::compare_and_apply_mask<gt>(rho_new, T(0.), T(0.), T(-1.)) +
1093 ryujin::compare_and_apply_mask<gt>(e_new, T(0.), T(0.), T(-1.)) +
1094 ryujin::compare_and_apply_mask<gt>(s_new, T(0.), T(0.), T(-1.));
1097 if (!(test == Number(0.))) {
1098 std::cout << std::fixed << std::setprecision(16);
1099 std::cout <<
"Bounds violation: Negative state [rho, e, s] detected!\n";
1100 std::cout <<
"\t\trho: " << rho_new <<
"\n";
1101 std::cout <<
"\t\tint: " << e_new <<
"\n";
1102 std::cout <<
"\t\tent: " << s_new <<
"\n" << std::endl;
1106 return (test == Number(0.));
1110 template <
int dim,
typename Number,
typename MemorySpace>
1111 template <
int component>
1112 DEAL_II_HOST_DEVICE_ALWAYS_INLINE
auto
1114 const state_type &U,
const dealii::Tensor<1, dim, Number> &normal)
const
1115 -> std::array<state_type, 2>
1117 static_assert(component == 1 || component == problem_dimension,
1118 "Only first and last eigenvectors implemented");
1120 const auto rho = density(U);
1121 const auto m = momentum(U);
1122 const auto v = m / rho;
1123 const auto a = speed_of_sound(U);
1124 const auto gamma = this->gamma();
1129 const auto e_k = 0.5 * v.norm_square();
1131 switch (component) {
1133 b[0] = (gamma - 1.) * e_k + a * v * normal;
1134 for (
unsigned int i = 0; i < dim; ++i)
1135 b[1 + i] = (1. - gamma) * v[i] - a * normal[i];
1136 b[dim + 1] = gamma - 1.;
1140 for (
unsigned int i = 0; i < dim; ++i)
1141 c[1 + i] = v[i] - a * normal[i];
1142 c[dim + 1] = a * a / (gamma - 1) + e_k - a * (v * normal);
1146 case problem_dimension:
1147 b[0] = (gamma - 1.) * e_k - a * v * normal;
1148 for (
unsigned int i = 0; i < dim; ++i)
1149 b[1 + i] = (1. - gamma) * v[i] + a * normal[i];
1150 b[dim + 1] = gamma - 1.;
1154 for (
unsigned int i = 0; i < dim; ++i)
1155 c[1 + i] = v[i] + a * normal[i];
1156 c[dim + 1] = a * a / (gamma - 1) + e_k + a * (v * normal);
1161 __builtin_unreachable();
1165 template <
int dim,
typename Number,
typename MemorySpace>
1166 template <
int component>
1167 DEAL_II_HOST_DEVICE_ALWAYS_INLINE
auto
1172 const dealii::Tensor<1, dim, Number> &normal)
const ->
state_type
1174 static_assert(component == 1 || component == 2,
1175 "component has to be 1 or 2");
1177 const auto m = momentum(U);
1178 const auto rho = density(U);
1179 const auto a = speed_of_sound(U);
1180 const auto vn = m * normal / rho;
1182 const auto m_bar = momentum(U_bar);
1183 const auto rho_bar = density(U_bar);
1184 const auto a_bar = speed_of_sound(U_bar);
1185 const auto vn_bar = m_bar * normal / rho_bar;
1189 const auto R_1 = component == 1
1195 const auto R_2 = component == 2
1199 const auto p = pressure(U);
1202 const auto vperp = m / rho - vn * normal;
1204 const auto vn_new = 0.5 * (R_1 + R_2);
1206 auto rho_new = 1. / (gamma() * s) *
1207 ryujin::fixed_power<2>(
ScalarNumber((gamma() - 1.) / 4.) *
1209 rho_new =
ryujin::pow(rho_new, 1. / (gamma() - 1.));
1211 const auto p_new = s * std::pow(rho_new, gamma());
1215 for (
unsigned int d = 0; d < dim; ++d) {
1216 U_new[1 + d] = rho_new * (vn_new * normal + vperp)[d];
1219 0.5 * rho_new * (vn_new * vn_new + vperp.norm_square());
1225 template <
int dim,
typename Number,
typename MemorySpace>
1226 template <
typename Lambda>
1227 DEAL_II_HOST_DEVICE_ALWAYS_INLINE
auto
1229 dealii::types::boundary_id
id,
1231 const dealii::Tensor<1, dim, Number> &normal,
1232 const Lambda &get_dirichlet_data)
const ->
state_type
1237 result = get_dirichlet_data();
1244 const auto m_dirichlet = momentum(get_dirichlet_data());
1245 const auto rho = density(result);
1246 const auto m = momentum(result);
1248 for (
unsigned int k = 0; k < dim; ++k)
1249 result[k + 1] = m_dirichlet[k];
1251 Number(0.5) / rho * (m_dirichlet.norm_square() - m.norm_square());
1258 const auto U_dirichlet = get_dirichlet_data();
1259 const auto rho_dirichlet = density(U_dirichlet);
1260 const auto v_dirichlet = momentum(U_dirichlet) / rho_dirichlet;
1261 const auto rho = density(result);
1262 const auto v = momentum(result) / rho;
1264 for (
unsigned int k = 0; k < dim; ++k)
1265 result[k + 1] = rho * v_dirichlet[k];
1267 Number(0.5) * rho * (v_dirichlet.norm_square() - v.norm_square());
1270 auto m = momentum(U);
1271 m -= 1. * (m * normal) * normal;
1272 for (
unsigned int k = 0; k < dim; ++k)
1273 result[k + 1] = m[k];
1276 for (
unsigned int k = 0; k < dim; ++k)
1277 result[k + 1] = Number(0.);
1292 const auto m = momentum(U);
1293 const auto rho = density(U);
1294 const auto a = speed_of_sound(U);
1295 const auto vn = m * normal / rho;
1299 result = get_dirichlet_data();
1303 if (vn >= -a && vn <= 0.) {
1304 const auto U_dirichlet = get_dirichlet_data();
1305 result = prescribe_riemann_characteristic<2>(U_dirichlet, U, normal);
1309 if (vn > 0. && vn <= a) {
1310 const auto U_dirichlet = get_dirichlet_data();
1311 result = prescribe_riemann_characteristic<1>(U, U_dirichlet, normal);
1317 Assert(
false, dealii::ExcNotImplemented());
1324 template <
int dim,
typename Number,
typename MemorySpace>
1325 DEAL_II_HOST_DEVICE_ALWAYS_INLINE
auto
1329 const auto rho_inverse =
ScalarNumber(1.) / density(U);
1330 const auto m = momentum(U);
1331 const auto p = pressure(U);
1332 const auto E = total_energy(U);
1337 for (
unsigned int i = 0; i < dim; ++i) {
1338 result[1 + i] = m * (m[i] * rho_inverse);
1339 result[1 + i][i] += p;
1341 result[dim + 1] = m * (rho_inverse * (E + p));
1347 template <
int dim,
typename Number,
typename MemorySpace>
1348 DEAL_II_HOST_DEVICE_ALWAYS_INLINE
auto
1352 const unsigned int ,
1359 template <
int dim,
typename Number,
typename MemorySpace>
1360 DEAL_II_HOST_DEVICE_ALWAYS_INLINE
auto
1364 const unsigned int * ,
1371 template <
int dim,
typename Number,
typename MemorySpace>
1372 DEAL_II_HOST_DEVICE_ALWAYS_INLINE
auto
1376 const dealii::Tensor<1, dim, Number> &c_ij)
const ->
state_type
1382 template <
int dim,
typename Number,
typename MemorySpace>
1383 template <
typename ST>
1384 DEAL_II_HOST_DEVICE_ALWAYS_INLINE
auto
1388 using T =
typename ST::value_type;
1389 static_assert(std::is_same_v<Number, T>,
"template mismatch");
1391 constexpr auto dim2 = ST::dimension - 2;
1392 static_assert(dim >= dim2,
1393 "the space dimension of the argument state must not be "
1394 "larger than the one of the target state");
1397 result[0] = state[0];
1398 result[dim + 1] = state[dim2 + 1];
1399 for (
unsigned int i = 1; i < dim2 + 1; ++i)
1400 result[i] = state[i];
1406 template <
int dim,
typename Number,
typename MemorySpace>
1407 template <
typename ST>
1408 DEAL_II_HOST_DEVICE_ALWAYS_INLINE
auto
1412 const auto primitive_state = expand_state(initial_state);
1413 return from_primitive_state(primitive_state);
1417 template <
int dim,
typename Number,
typename MemorySpace>
1418 DEAL_II_HOST_DEVICE_ALWAYS_INLINE
auto
1422 const auto &rho = primitive_state[0];
1424 const auto u = momentum(primitive_state);
1425 const auto &p = primitive_state[dim + 1];
1427 auto state = primitive_state;
1429 for (
unsigned int i = 1; i < dim + 1; ++i)
1433 p / (
ScalarNumber(gamma() - 1.)) + Number(0.5) * rho * u * u;
1439 template <
int dim,
typename Number,
typename MemorySpace>
1440 DEAL_II_HOST_DEVICE_ALWAYS_INLINE
auto
1444 const auto &rho = state[0];
1445 const auto rho_inverse = Number(1.) / rho;
1446 const auto p = pressure(state);
1448 auto primitive_state = state;
1450 for (
unsigned int i = 1; i < dim + 1; ++i)
1451 primitive_state[i] *= rho_inverse;
1453 primitive_state[dim + 1] = p;
1455 return primitive_state;
1459 template <
int dim,
typename Number,
typename MemorySpace>
1460 template <
typename Lambda>
1461 DEAL_II_HOST_DEVICE_ALWAYS_INLINE
auto
1465 auto result = state;
1466 const auto M = lambda(momentum(state));
1467 for (
unsigned int d = 0; d < dim; ++d)
1468 result[1 + d] = M[d];
static constexpr bool have_covolume_constant
DEAL_II_HOST_DEVICE state_type mathematical_entropy_derivative(const state_type &U) const
DEAL_II_HOST_DEVICE Number filter_vacuum_density(const Number &rho) const
DEAL_II_HOST_DEVICE state_type apply_galilei_transform(const state_type &state, const Lambda &lambda) const
DEAL_II_HOST_DEVICE Number pressure(const state_type &U) const
DEAL_II_HOST_DEVICE state_type from_primitive_state(const state_type &primitive_state) const
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber gamma_minus_one_inverse() const
static constexpr bool have_gamma
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber reference_density() const
DEAL_II_HOST_DEVICE state_type prescribe_riemann_characteristic(const state_type &U, const state_type &U_bar, const dealii::Tensor< 1, dim, Number > &normal) const
static const auto precomputed_names
DEAL_II_HOST_DEVICE state_type from_initial_state(const ST &initial_state) const
DEAL_II_HOST_DEVICE_ALWAYS_INLINE state_type apply_boundary_conditions(const dealii::types::boundary_id id, const state_type &U, const dealii::Tensor< 1, dim, Number > &normal, const Lambda &get_dirichlet_data) const
static const auto primitive_component_names
DEAL_II_HOST_DEVICE state_type flux_divergence(const flux_contribution_type &flux_i, const flux_contribution_type &flux_j, const dealii::Tensor< 1, dim, Number > &c_ij) const
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber vacuum_state_relaxation_large() const
DEAL_II_HOST_DEVICE std::array< state_type, 2 > linearized_eigenvector(const state_type &U, const dealii::Tensor< 1, dim, Number > &normal) const
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber gamma_minus_one_over_gamma_plus_one() const
static constexpr bool have_source_terms
dealii::Tensor< 1, problem_dimension, Number > state_type
DEAL_II_HOST_DEVICE Number mathematical_entropy(const state_type &U) const
DEAL_II_HOST_DEVICE bool is_admissible(const state_type &U) const
DEAL_II_HOST_DEVICE state_type nodal_source(const PrecomputedVectorView &pv, const unsigned int i, const state_type &U_i, const ScalarNumber tau) const =delete
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber gamma_inverse() const
std::array< Number, n_precomputed_values > precomputed_type
DEAL_II_HOST_DEVICE flux_contribution_type flux_contribution(const PrecomputedVectorView &pv, const InitialPrecomputedVectorView &ipv, const unsigned int i, const state_type &U_i) const
static DEAL_II_HOST_DEVICE dealii::Tensor< 1, dim, Number > momentum(const state_type &U)
DEAL_II_HOST_DEVICE state_type harten_entropy_derivative(const state_type &U) const
HyperbolicSystemView(const HyperbolicSystem &hyperbolic_system)
static DEAL_II_HOST_DEVICE Number density(const state_type &U)
DEAL_II_HOST_DEVICE flux_type f(const state_type &U) const
static constexpr unsigned int problem_dimension
DEAL_II_HOST_DEVICE state_type nodal_source(const PrecomputedVectorView &pv, const unsigned int *js, const state_type &U_j, const ScalarNumber tau) const =delete
DEAL_II_HOST_DEVICE Number speed_of_sound(const state_type &U) const
DEAL_II_HOST_DEVICE state_type expand_state(const ST &state) const
static DEAL_II_HOST_DEVICE Number internal_energy(const state_type &U)
Vectors::StateVector< ScalarNumber, problem_dimension, n_precomputed_values > StateVector
static const auto component_names
static constexpr unsigned int n_precomputed_values
static constexpr bool have_high_order_flux
static DEAL_II_HOST_DEVICE state_type internal_energy_derivative(const state_type &U)
flux_type flux_contribution_type
typename get_value_type< Number >::type ScalarNumber
dealii::Tensor< 1, problem_dimension, dealii::Tensor< 1, dim, Number > > flux_type
DEAL_II_HOST_DEVICE state_type high_order_flux_divergence(const flux_contribution_type &flux_i, const flux_contribution_type &flux_j, const dealii::Tensor< 1, dim, Number > &c_ij) const =delete
std::array< Number, n_initial_precomputed_values > initial_precomputed_type
DEAL_II_HOST_DEVICE state_type to_primitive_state(const state_type &state) const
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber gamma() const
static constexpr bool have_energy_equation
DEAL_II_HOST_DEVICE Number harten_entropy(const state_type &U) const
static DEAL_II_HOST_DEVICE Number total_energy(const state_type &U)
DEAL_II_HOST_DEVICE Number specific_entropy(const state_type &U) const
static const auto initial_precomputed_names
static constexpr unsigned int n_initial_precomputed_values
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber vacuum_state_relaxation_small() const
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber gamma_plus_one_inverse() const
HyperbolicSystem(const std::string &subsection="/HyperbolicSystem")
static const std::string problem_name
void fill_precomputed_values(const OfflineData< dim, ScalarNumber > &offline_data, typename HyperbolicSystemView< dim, ScalarNumber >::StateVector &state_vector, const bool skip_constrained_dofs=true) const
const auto & n_locally_owned() const
const auto & sparsity_pattern_simd() const
const auto & n_locally_internal() const
@ implicit_transfers_host_resident
DEAL_II_HOST_DEVICE_ALWAYS_INLINE dealii::Tensor< 1, problem_dim, T > contract(const FT &flux_ij, const TT &c_ij)
DEAL_II_HOST_DEVICE_ALWAYS_INLINE FT add(const FT &flux_left_ij, const FT &flux_right_ij)
DEAL_II_HOST_DEVICE T pow(const T x, const T b)
double gamma_plus_one_inverse
double vacuum_state_relaxation_large
double vacuum_state_relaxation_small
double gamma_minus_one_inverse
double gamma_minus_one_over_gamma_plus_one