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