xref: /honee/qfunctions/advection_types.h (revision c7ece6efd17014bd7b01fc517a8c82707db4fa34)
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 };
45 
46 typedef struct SetupContextAdv_ *SetupContextAdv;
47 struct SetupContextAdv_ {
48   CeedScalar           rc;
49   CeedScalar           lx;
50   CeedScalar           ly;
51   CeedScalar           lz;
52   CeedScalar           wind[3];
53   CeedScalar           time;
54   WindType             wind_type;
55   AdvectionICType      initial_condition_type;
56   BubbleContinuityType bubble_continuity_type;
57 };
58