xref: /honee/qfunctions/newtonian_types.h (revision 2b916ea7fa53b5c2584160b9274b1b14ca18ff4f)
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 // For use with PetscOptionsEnum
21 static const char *const StateVariables[] = {"CONSERVATIVE", "PRIMITIVE", "StateVariable", "STATEVAR_", NULL};
22 
23 typedef struct SetupContext_ *SetupContext;
24 struct SetupContext_ {
25   CeedScalar theta0;
26   CeedScalar thetaC;
27   CeedScalar P0;
28   CeedScalar N;
29   CeedScalar cv;
30   CeedScalar cp;
31   CeedScalar g[3];
32   CeedScalar rc;
33   CeedScalar lx;
34   CeedScalar ly;
35   CeedScalar lz;
36   CeedScalar center[3];
37   CeedScalar dc_axis[3];
38   CeedScalar time;
39   int        wind_type;               // See WindType: 0=ROTATION, 1=TRANSLATION
40   int        bubble_type;             // See BubbleType: 0=SPHERE, 1=CYLINDER
41   int        bubble_continuity_type;  // See BubbleContinuityType: 0=SMOOTH, 1=BACK_SHARP 2=THICK
42 };
43 
44 typedef struct NewtonianIdealGasContext_ *NewtonianIdealGasContext;
45 struct NewtonianIdealGasContext_ {
46   CeedScalar        lambda;
47   CeedScalar        mu;
48   CeedScalar        k;
49   CeedScalar        cv;
50   CeedScalar        cp;
51   CeedScalar        g[3];
52   CeedScalar        c_tau;
53   CeedScalar        Ctau_t;
54   CeedScalar        Ctau_v;
55   CeedScalar        Ctau_C;
56   CeedScalar        Ctau_M;
57   CeedScalar        Ctau_E;
58   CeedScalar        dt;
59   CeedScalar        ijacobian_time_shift;
60   CeedScalar        P0;
61   bool              is_implicit;
62   StateVariable     state_var;
63   StabilizationType stabilization;
64 };
65 
66 #endif  // newtonian_types_h
67