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