xref: /honee/qfunctions/newtonian_types.h (revision b0488d1f4fbd28c0723e57e90b4aaf1f2c6d7318)
1 // Copyright (c) 2017-2022, 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 };
42 
43 typedef struct {
44   CeedScalar pressure;
45   CeedScalar velocity[3];
46   CeedScalar temperature;
47 } StatePrimitive;
48 
49 typedef struct SetupContext_ *SetupContext;
50 struct SetupContext_ {
51   StatePrimitive                   reference;
52   struct NewtonianIdealGasContext_ gas;
53   CeedScalar                       lx;
54   CeedScalar                       ly;
55   CeedScalar                       lz;
56   CeedScalar                       time;
57 };
58 
59 #endif  // newtonian_types_h
60