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