1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors. 2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause 3 #pragma once 4 5 #include <ceed.h> 6 #include "stabilization_types.h" 7 8 typedef enum { 9 STATEVAR_CONSERVATIVE = 0, 10 STATEVAR_PRIMITIVE = 1, 11 STATEVAR_ENTROPY = 2, 12 } StateVariable; 13 14 typedef struct NewtonianIdealGasContext_ *NewtonianIdealGasContext; 15 struct NewtonianIdealGasContext_ { 16 CeedScalar lambda; 17 CeedScalar mu; 18 CeedScalar k; 19 CeedScalar cv; 20 CeedScalar cp; 21 CeedScalar g[3]; 22 CeedScalar c_tau; 23 CeedScalar Ctau_t; 24 CeedScalar Ctau_v; 25 CeedScalar Ctau_C; 26 CeedScalar Ctau_M; 27 CeedScalar Ctau_E; 28 CeedScalar dt; 29 CeedScalar time; 30 CeedScalar ijacobian_time_shift; 31 bool is_implicit; 32 StateVariable state_var; 33 StabilizationType stabilization; 34 bool idl_enable; 35 CeedScalar idl_pressure; 36 CeedScalar idl_amplitude; 37 CeedScalar idl_start; 38 CeedScalar idl_length; 39 40 DivDiffFluxProjectionMethod divFdiff_method; 41 }; 42 43 typedef struct { 44 CeedScalar pressure; 45 CeedScalar velocity[3]; 46 CeedScalar temperature; 47 } StatePrimitive; 48 49 typedef struct { 50 CeedScalar S_density; 51 CeedScalar S_momentum[3]; 52 CeedScalar S_energy; 53 } StateEntropy; 54 55 typedef struct SetupContext_ *SetupContext; 56 struct SetupContext_ { 57 StatePrimitive reference; 58 struct NewtonianIdealGasContext_ gas; 59 CeedScalar lx; 60 CeedScalar ly; 61 CeedScalar lz; 62 CeedScalar time; 63 }; 64