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