xref: /honee/qfunctions/newtonian_types.h (revision 20bd4f36636b78bf8d16c55c905ef3a1f3f71a6d)
1 // Copyright (c) 2017-2024, 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 
8 #ifndef newtonian_types_h
9 #define newtonian_types_h
10 
11 #include <ceed.h>
12 
13 #include "stabilization_types.h"
14 
15 typedef enum {
16   STATEVAR_CONSERVATIVE = 0,
17   STATEVAR_PRIMITIVE    = 1,
18 } StateVariable;
19 
20 typedef struct NewtonianIdealGasContext_ *NewtonianIdealGasContext;
21 struct NewtonianIdealGasContext_ {
22   CeedScalar        lambda;
23   CeedScalar        mu;
24   CeedScalar        k;
25   CeedScalar        cv;
26   CeedScalar        cp;
27   CeedScalar        g[3];
28   CeedScalar        c_tau;
29   CeedScalar        Ctau_t;
30   CeedScalar        Ctau_v;
31   CeedScalar        Ctau_C;
32   CeedScalar        Ctau_M;
33   CeedScalar        Ctau_E;
34   CeedScalar        dt;
35   CeedScalar        time;
36   CeedScalar        ijacobian_time_shift;
37   CeedScalar        P0;
38   bool              is_implicit;
39   StateVariable     state_var;
40   StabilizationType stabilization;
41   bool              idl_enable;
42   CeedScalar        idl_amplitude;
43   CeedScalar        idl_start;
44   CeedScalar        idl_length;
45 };
46 
47 typedef struct {
48   CeedScalar pressure;
49   CeedScalar velocity[3];
50   CeedScalar temperature;
51 } StatePrimitive;
52 
53 typedef struct SetupContext_ *SetupContext;
54 struct SetupContext_ {
55   StatePrimitive                   reference;
56   struct NewtonianIdealGasContext_ gas;
57   CeedScalar                       lx;
58   CeedScalar                       ly;
59   CeedScalar                       lz;
60   CeedScalar                       time;
61 };
62 
63 #endif  // newtonian_types_h
64