xref: /honee/qfunctions/newtonian_types.h (revision c7ece6efd17014bd7b01fc517a8c82707db4fa34)
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 } StateVariable;
17 
18 typedef struct NewtonianIdealGasContext_ *NewtonianIdealGasContext;
19 struct NewtonianIdealGasContext_ {
20   CeedScalar        lambda;
21   CeedScalar        mu;
22   CeedScalar        k;
23   CeedScalar        cv;
24   CeedScalar        cp;
25   CeedScalar        g[3];
26   CeedScalar        c_tau;
27   CeedScalar        Ctau_t;
28   CeedScalar        Ctau_v;
29   CeedScalar        Ctau_C;
30   CeedScalar        Ctau_M;
31   CeedScalar        Ctau_E;
32   CeedScalar        dt;
33   CeedScalar        time;
34   CeedScalar        ijacobian_time_shift;
35   CeedScalar        P0;
36   bool              is_implicit;
37   StateVariable     state_var;
38   StabilizationType stabilization;
39   bool              idl_enable;
40   CeedScalar        idl_amplitude;
41   CeedScalar        idl_start;
42   CeedScalar        idl_length;
43 };
44 
45 typedef struct {
46   CeedScalar pressure;
47   CeedScalar velocity[3];
48   CeedScalar temperature;
49 } StatePrimitive;
50 
51 typedef struct SetupContext_ *SetupContext;
52 struct SetupContext_ {
53   StatePrimitive                   reference;
54   struct NewtonianIdealGasContext_ gas;
55   CeedScalar                       lx;
56   CeedScalar                       ly;
57   CeedScalar                       lz;
58   CeedScalar                       time;
59 };
60