1 // Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors. 2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3 // 4 // SPDX-License-Identifier: BSD-2-Clause 5 // 6 // This file is part of CEED: http://github.com/ceed 7 #pragma once 8 9 #include <ceed/types.h> 10 #ifndef CEED_RUNNING_JIT_PASS 11 #include <stdbool.h> 12 #endif 13 14 #include "stabilization_types.h" 15 16 typedef enum { 17 STATEVAR_CONSERVATIVE = 0, 18 STATEVAR_PRIMITIVE = 1, 19 STATEVAR_ENTROPY = 2, 20 } StateVariable; 21 22 typedef struct NewtonianIdealGasContext_ *NewtonianIdealGasContext; 23 struct NewtonianIdealGasContext_ { 24 CeedScalar lambda; 25 CeedScalar mu; 26 CeedScalar k; 27 CeedScalar cv; 28 CeedScalar cp; 29 CeedScalar g[3]; 30 CeedScalar c_tau; 31 CeedScalar Ctau_t; 32 CeedScalar Ctau_v; 33 CeedScalar Ctau_C; 34 CeedScalar Ctau_M; 35 CeedScalar Ctau_E; 36 CeedScalar dt; 37 CeedScalar time; 38 CeedScalar ijacobian_time_shift; 39 bool is_implicit; 40 StateVariable state_var; 41 StabilizationType stabilization; 42 bool idl_enable; 43 CeedScalar idl_pressure; 44 CeedScalar idl_amplitude; 45 CeedScalar idl_start; 46 CeedScalar idl_length; 47 }; 48 49 typedef struct { 50 CeedScalar pressure; 51 CeedScalar velocity[3]; 52 CeedScalar temperature; 53 } StatePrimitive; 54 55 typedef struct { 56 CeedScalar S_density; 57 CeedScalar S_momentum[3]; 58 CeedScalar S_energy; 59 } StateEntropy; 60 61 typedef struct SetupContext_ *SetupContext; 62 struct SetupContext_ { 63 StatePrimitive reference; 64 struct NewtonianIdealGasContext_ gas; 65 CeedScalar lx; 66 CeedScalar ly; 67 CeedScalar lz; 68 CeedScalar time; 69 }; 70