1ae2b091fSJames Wright // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors. 2ae2b091fSJames Wright // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause 3c7ece6efSJeremy L Thompson #pragma once 4493642f1SJames Wright 53e17a7a1SJames Wright #include <ceed/types.h> 62b916ea7SJeremy L Thompson 7493642f1SJames Wright #include "newtonian_types.h" 8493642f1SJames Wright 9493642f1SJames Wright /* Access data arrays via: 10e6098bcdSJames Wright * CeedScalar (*sigma)[ctx->nmodes] = (CeedScalar (*)[ctx->nmodes])&ctx->data[ctx->offsets.sigma]; 11e6098bcdSJames Wright * CeedScalar *eps = &ctx->data[ctx->offsets.eps]; */ 1242454adaSJames Wright typedef struct STGShur14Context_ *StgShur14Context; 13493642f1SJames Wright struct STGShur14Context_ { 14493642f1SJames Wright CeedInt nmodes; // !< Number of wavemodes 15493642f1SJames Wright CeedInt nprofs; // !< Number of profile points in STGInflow.dat 16493642f1SJames Wright CeedScalar alpha; // !< Geometric growth rate of kappa 17493642f1SJames Wright CeedScalar u0; // !< Convective velocity 18493642f1SJames Wright CeedScalar time; // !< Solution time 19493642f1SJames Wright CeedScalar P0; // !< Inlet pressure 20493642f1SJames Wright CeedScalar theta0; // !< Inlet temperature 21493642f1SJames Wright bool is_implicit; // !< Whether using implicit time integration 22493642f1SJames Wright bool mean_only; // !< Only apply the mean profile 23493642f1SJames Wright CeedScalar dx; // !< dx used for h calculation 2484b557acSJames Wright CeedScalar h_scale_factor; // !< Scales the element size 25493642f1SJames Wright bool prescribe_T; // !< Prescribe temperature weakly 263cec1b8dSMohammed Amin bool use_fluctuating_IC; // !< set fluctuations through the domain as an initial condition 27*cde3d787SJames Wright struct NewtonianIdealGasContext_ newt_ctx; 28493642f1SJames Wright 29493642f1SJames Wright struct { 30493642f1SJames Wright size_t sigma, d, phi; // !< Random number set, [nmodes,3], [nmodes,3], [nmodes] 31493642f1SJames Wright size_t kappa; // !< Wavemode frequencies in increasing order, [nmodes] 32c77f3192SJames Wright size_t wall_dist; // !< Distance to wall for Inflow Profie, [nprof] 33493642f1SJames Wright size_t ubar; // !< Mean velocity, [nprof, 3] 34493642f1SJames Wright size_t cij; // !< Cholesky decomposition [nprof, 6] 35493642f1SJames Wright size_t eps; // !< Turbulent Disspation [nprof, 6] 36493642f1SJames Wright size_t lt; // !< Tubulent Length Scale [nprof, 6] 37493642f1SJames Wright } offsets; // !< Holds offsets for each array in data 38493642f1SJames Wright size_t total_bytes; // !< Total size of struct plus array 39493642f1SJames Wright CeedScalar data[1]; // !< Holds concatenated scalar array data 40493642f1SJames Wright }; 41