xref: /honee/qfunctions/stg_shur14_type.h (revision 20bd4f36636b78bf8d16c55c905ef3a1f3f71a6d)
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 
8 #ifndef stg_shur14_type_h
9 #define stg_shur14_type_h
10 
11 #include <ceed.h>
12 
13 #include "newtonian_types.h"
14 
15 /* Access data arrays via:
16  *  CeedScalar (*sigma)[ctx->nmodes] = (CeedScalar (*)[ctx->nmodes])&ctx->data[ctx->offsets.sigma];
17  *  CeedScalar *eps = &ctx->data[ctx->offsets.eps]; */
18 typedef struct STGShur14Context_ *StgShur14Context;
19 struct STGShur14Context_ {
20   CeedInt                          nmodes;              // !< Number of wavemodes
21   CeedInt                          nprofs;              // !< Number of profile points in STGInflow.dat
22   CeedScalar                       alpha;               // !< Geometric growth rate of kappa
23   CeedScalar                       u0;                  // !< Convective velocity
24   CeedScalar                       time;                // !< Solution time
25   CeedScalar                       P0;                  // !< Inlet pressure
26   CeedScalar                       theta0;              // !< Inlet temperature
27   bool                             is_implicit;         // !< Whether using implicit time integration
28   bool                             mean_only;           // !< Only apply the mean profile
29   CeedScalar                       dx;                  // !< dx used for h calculation
30   bool                             prescribe_T;         // !< Prescribe temperature weakly
31   bool                             use_fluctuating_IC;  // !< Only apply the mean profile
32   struct NewtonianIdealGasContext_ newtonian_ctx;
33 
34   struct {
35     size_t sigma, d, phi;  // !< Random number set, [nmodes,3], [nmodes,3], [nmodes]
36     size_t kappa;          // !< Wavemode frequencies in increasing order, [nmodes]
37     size_t wall_dist;      // !< Distance to wall for Inflow Profie, [nprof]
38     size_t ubar;           // !< Mean velocity, [nprof, 3]
39     size_t cij;            // !< Cholesky decomposition [nprof, 6]
40     size_t eps;            // !< Turbulent Disspation [nprof, 6]
41     size_t lt;             // !< Tubulent Length Scale [nprof, 6]
42   } offsets;               // !< Holds offsets for each array in data
43   size_t     total_bytes;  // !< Total size of struct plus array
44   CeedScalar data[1];      // !< Holds concatenated scalar array data
45 };
46 
47 #endif
48