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 42adefcceSJames Wright 53e17a7a1SJames Wright #include <ceed/types.h> 63e17a7a1SJames Wright #ifndef CEED_RUNNING_JIT_PASS 73e17a7a1SJames Wright #include <stdbool.h> 83e17a7a1SJames Wright #endif 92adefcceSJames Wright #include "stabilization_types.h" 102adefcceSJames Wright 112adefcceSJames Wright typedef enum { 125f636aeaSJames Wright ADVDIF_WIND_ROTATION = 0, 135f636aeaSJames Wright ADVDIF_WIND_TRANSLATION = 1, 143d1afcc1SJames Wright ADVDIF_WIND_BOUNDARY_LAYER = 2, 155f636aeaSJames Wright } AdvDifWindType; 161c94e285SJames Wright #ifndef CEED_RUNNING_JIT_PASS 17*e5a8cae0SJames Wright extern const char *const AdvDifWindTypes[]; 181c94e285SJames Wright #endif 192adefcceSJames Wright 20c51f031aSJames Wright // Advection - Initial Condition Types 212adefcceSJames Wright typedef enum { 225f636aeaSJames Wright ADVDIF_IC_BUBBLE_SPHERE = 0, // dim=3 235f636aeaSJames Wright ADVDIF_IC_BUBBLE_CYLINDER = 1, // dim=2 245f636aeaSJames Wright ADVDIF_IC_COSINE_HILL = 2, // dim=2 255f636aeaSJames Wright ADVDIF_IC_SKEW = 3, 265f636aeaSJames Wright ADVDIF_IC_WAVE = 4, 273d1afcc1SJames Wright ADVDIF_IC_BOUNDARY_LAYER = 5, 285f636aeaSJames Wright } AdvDifICType; 291c94e285SJames Wright #ifndef CEED_RUNNING_JIT_PASS 30*e5a8cae0SJames Wright extern const char *const AdvDifICTypes[]; 311c94e285SJames Wright #endif 322adefcceSJames Wright 33a62be6baSJames Wright // Advection-Diffusion wave types 34a62be6baSJames Wright typedef enum { 35a62be6baSJames Wright ADVDIF_WAVE_SINE = 0, 36a62be6baSJames Wright ADVDIF_WAVE_SQUARE = 1, 37a62be6baSJames Wright } AdvDifWaveType; 381c94e285SJames Wright #ifndef CEED_RUNNING_JIT_PASS 39*e5a8cae0SJames Wright extern const char *const AdvDifWaveTypes[]; 401c94e285SJames Wright #endif 41a62be6baSJames Wright 422adefcceSJames Wright // Advection - Bubble Continuity Types 432adefcceSJames Wright typedef enum { 445f636aeaSJames Wright ADVDIF_BUBBLE_CONTINUITY_SMOOTH = 0, // Original continuous, smooth shape 455f636aeaSJames Wright ADVDIF_BUBBLE_CONTINUITY_BACK_SHARP = 1, // Discontinuous, sharp back half shape 465f636aeaSJames Wright ADVDIF_BUBBLE_CONTINUITY_THICK = 2, // Define a finite thickness 475f636aeaSJames Wright ADVDIF_BUBBLE_CONTINUITY_COSINE = 3, // Use cosine wave for smoothing 485f636aeaSJames Wright } AdvDifBubbleContinuityType; 491c94e285SJames Wright #ifndef CEED_RUNNING_JIT_PASS 50*e5a8cae0SJames Wright extern const char *const AdvDifBubbleContinuityTypes[]; 511c94e285SJames Wright #endif 522adefcceSJames Wright 532adefcceSJames Wright typedef struct AdvectionContext_ *AdvectionContext; 542adefcceSJames Wright struct AdvectionContext_ { 55059d1c40SJames Wright bool strong_form; 562adefcceSJames Wright CeedScalar E_wind; 572adefcceSJames Wright bool implicit; 5857272ee0SJames Wright CeedScalar dt; 59c8d249deSJames Wright CeedScalar diffusion_coeff; 60fbabb365SJames Wright 61fbabb365SJames Wright StabilizationType stabilization; 62fbabb365SJames Wright StabilizationTauType stabilization_tau; 63fbabb365SJames Wright CeedScalar CtauS; 64fbabb365SJames Wright CeedScalar Ctau_a, Ctau_d, Ctau_t; 654c5ab12fSJames Wright DivDiffFluxProjectionMethod divFdiff_method; 662adefcceSJames Wright }; 672adefcceSJames Wright 680b3a1fabSJames Wright typedef struct SetupContextAdv_ *SetupContextAdv; 690b3a1fabSJames Wright struct SetupContextAdv_ { 700b3a1fabSJames Wright CeedScalar rc; 710b3a1fabSJames Wright CeedScalar lx; 720b3a1fabSJames Wright CeedScalar ly; 730b3a1fabSJames Wright CeedScalar lz; 740b3a1fabSJames Wright CeedScalar wind[3]; 750b3a1fabSJames Wright CeedScalar time; 76a62be6baSJames Wright CeedScalar wave_frequency, wave_phase; 77b4fd18dfSJames Wright CeedScalar bl_height_factor; // !< height of boundary layer IC relative to domain height 785f636aeaSJames Wright 79a62be6baSJames Wright AdvDifWaveType wave_type; 805f636aeaSJames Wright AdvDifWindType wind_type; 815f636aeaSJames Wright AdvDifICType initial_condition_type; 825f636aeaSJames Wright AdvDifBubbleContinuityType bubble_continuity_type; 830b3a1fabSJames Wright }; 84