xref: /honee/qfunctions/advection_types.h (revision 20bd4f36636b78bf8d16c55c905ef3a1f3f71a6d)
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 
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   StabilizationTauType stabilization_tau;
43   CeedScalar           Ctau_a;
44   CeedScalar           Ctau_t;
45   CeedScalar           dt;
46 };
47 
48 typedef struct SetupContextAdv_ *SetupContextAdv;
49 struct SetupContextAdv_ {
50   CeedScalar           rc;
51   CeedScalar           lx;
52   CeedScalar           ly;
53   CeedScalar           lz;
54   CeedScalar           wind[3];
55   CeedScalar           time;
56   WindType             wind_type;
57   AdvectionICType      initial_condition_type;
58   BubbleContinuityType bubble_continuity_type;
59 };
60 
61 #endif /* ifndef advection_types_h */
62