1 #ifndef newtonian_types_h 2 #define newtonian_types_h 3 4 #include <ceed/ceed.h> 5 #include "stabilization_types.h" 6 7 typedef struct SetupContext_ *SetupContext; 8 struct SetupContext_ { 9 CeedScalar theta0; 10 CeedScalar thetaC; 11 CeedScalar P0; 12 CeedScalar N; 13 CeedScalar cv; 14 CeedScalar cp; 15 CeedScalar g[3]; 16 CeedScalar rc; 17 CeedScalar lx; 18 CeedScalar ly; 19 CeedScalar lz; 20 CeedScalar center[3]; 21 CeedScalar dc_axis[3]; 22 CeedScalar time; 23 int wind_type; // See WindType: 0=ROTATION, 1=TRANSLATION 24 int bubble_type; // See BubbleType: 0=SPHERE, 1=CYLINDER 25 int bubble_continuity_type; // See BubbleContinuityType: 0=SMOOTH, 1=BACK_SHARP 2=THICK 26 }; 27 28 typedef struct NewtonianIdealGasContext_ *NewtonianIdealGasContext; 29 struct NewtonianIdealGasContext_ { 30 CeedScalar lambda; 31 CeedScalar mu; 32 CeedScalar k; 33 CeedScalar cv; 34 CeedScalar cp; 35 CeedScalar g[3]; 36 CeedScalar c_tau; 37 CeedScalar Ctau_t; 38 CeedScalar Ctau_v; 39 CeedScalar Ctau_C; 40 CeedScalar Ctau_M; 41 CeedScalar Ctau_E; 42 CeedScalar dt; 43 CeedScalar ijacobian_time_shift; 44 CeedScalar P0; 45 bool is_implicit; 46 StabilizationType stabilization; 47 }; 48 49 CEED_QFUNCTION_HELPER CeedScalar Square(CeedScalar x) { return x*x; } 50 CEED_QFUNCTION_HELPER CeedScalar Dot3(const CeedScalar u[3], 51 const CeedScalar v[3]) { 52 return u[0]*v[0] + u[1]*v[1] + u[2]*v[2]; 53 } 54 55 #endif // newtonian_types_h 56