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