xref: /honee/qfunctions/advection_types.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 #include "stabilization_types.h"
11 
12 typedef enum {
13   WIND_ROTATION    = 0,
14   WIND_TRANSLATION = 1,
15 } WindType;
16 
17 // Advection - Initial Condition Types
18 typedef enum {
19   ADVECTIONIC_BUBBLE_SPHERE   = 0,  // dim=3
20   ADVECTIONIC_BUBBLE_CYLINDER = 1,  // dim=2
21   ADVECTIONIC_COSINE_HILL     = 2,  // dim=2
22   ADVECTIONIC_SKEW            = 3,
23 } AdvectionICType;
24 
25 // Advection - Bubble Continuity Types
26 typedef enum {
27   BUBBLE_CONTINUITY_SMOOTH     = 0,  // Original continuous, smooth shape
28   BUBBLE_CONTINUITY_BACK_SHARP = 1,  // Discontinuous, sharp back half shape
29   BUBBLE_CONTINUITY_THICK      = 2,  // Define a finite thickness
30   BUBBLE_CONTINUITY_COSINE     = 3,  // Use cosine wave for smoothing
31 } BubbleContinuityType;
32 
33 typedef struct AdvectionContext_ *AdvectionContext;
34 struct AdvectionContext_ {
35   CeedScalar           CtauS;
36   bool                 strong_form;
37   CeedScalar           E_wind;
38   bool                 implicit;
39   StabilizationType    stabilization;
40   StabilizationTauType stabilization_tau;
41   CeedScalar           Ctau_a;
42   CeedScalar           Ctau_t;
43   CeedScalar           dt;
44   CeedScalar           diffusion_coeff;
45 };
46 
47 typedef struct SetupContextAdv_ *SetupContextAdv;
48 struct SetupContextAdv_ {
49   CeedScalar           rc;
50   CeedScalar           lx;
51   CeedScalar           ly;
52   CeedScalar           lz;
53   CeedScalar           wind[3];
54   CeedScalar           time;
55   WindType             wind_type;
56   AdvectionICType      initial_condition_type;
57   BubbleContinuityType bubble_continuity_type;
58 };
59