xref: /libCEED/examples/fluids/problems/advection.c (revision b8962995f2086e83ec045f19f82798eb8f9e9baf)
177841947SLeila Ghaffari // Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at
277841947SLeila Ghaffari // the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
377841947SLeila Ghaffari // reserved. See files LICENSE and NOTICE for details.
477841947SLeila Ghaffari //
577841947SLeila Ghaffari // This file is part of CEED, a collection of benchmarks, miniapps, software
677841947SLeila Ghaffari // libraries and APIs for efficient high-order finite element and spectral
777841947SLeila Ghaffari // element discretizations for exascale applications. For more information and
877841947SLeila Ghaffari // source code availability see http://github.com/ceed.
977841947SLeila Ghaffari //
1077841947SLeila Ghaffari // The CEED research is supported by the Exascale Computing Project 17-SC-20-SC,
1177841947SLeila Ghaffari // a collaborative effort of two U.S. Department of Energy organizations (Office
1277841947SLeila Ghaffari // of Science and the National Nuclear Security Administration) responsible for
1377841947SLeila Ghaffari // the planning and preparation of a capable exascale ecosystem, including
1477841947SLeila Ghaffari // software, applications, hardware, advanced system engineering and early
1577841947SLeila Ghaffari // testbed platforms, in support of the nation's exascale computing imperative.
1677841947SLeila Ghaffari 
1777841947SLeila Ghaffari /// @file
1877841947SLeila Ghaffari /// Utility functions for setting up ADVECTION
1977841947SLeila Ghaffari 
2077841947SLeila Ghaffari #include "../navierstokes.h"
2177841947SLeila Ghaffari #include "../qfunctions/setupgeo.h"
2277841947SLeila Ghaffari #include "../qfunctions/advection.h"
2377841947SLeila Ghaffari 
2477841947SLeila Ghaffari PetscErrorCode NS_ADVECTION(ProblemData *problem, void *setup_ctx, void *ctx) {
2577841947SLeila Ghaffari   WindType             wind_type;
2677841947SLeila Ghaffari   BubbleType           bubble_type;
2777841947SLeila Ghaffari   BubbleContinuityType bubble_continuity_type;
2877841947SLeila Ghaffari   StabilizationType    stab;
2977841947SLeila Ghaffari   SetupContext         setup_context = *(SetupContext *)setup_ctx;
3077841947SLeila Ghaffari   User                 user = *(User *)ctx;
3177841947SLeila Ghaffari   MPI_Comm             comm = PETSC_COMM_WORLD;
3277841947SLeila Ghaffari   PetscBool            implicit;
3377841947SLeila Ghaffari   PetscBool            has_curr_time = PETSC_FALSE;
3477841947SLeila Ghaffari   PetscInt             ierr;
3577841947SLeila Ghaffari   PetscFunctionBeginUser;
3677841947SLeila Ghaffari 
3777841947SLeila Ghaffari   ierr = PetscCalloc1(1, &user->phys->advection_ctx); CHKERRQ(ierr);
3877841947SLeila Ghaffari 
3977841947SLeila Ghaffari   // ------------------------------------------------------
4077841947SLeila Ghaffari   //               SET UP ADVECTION
4177841947SLeila Ghaffari   // ------------------------------------------------------
4277841947SLeila Ghaffari   problem->dim                     = 3;
4377841947SLeila Ghaffari   problem->q_data_size_vol         = 10;
4477841947SLeila Ghaffari   problem->q_data_size_sur         = 4;
4577841947SLeila Ghaffari   problem->setup_vol               = Setup;
4677841947SLeila Ghaffari   problem->setup_vol_loc           = Setup_loc;
4777841947SLeila Ghaffari   problem->setup_sur               = SetupBoundary;
4877841947SLeila Ghaffari   problem->setup_sur_loc           = SetupBoundary_loc;
4977841947SLeila Ghaffari   problem->ics                     = ICsAdvection;
5077841947SLeila Ghaffari   problem->ics_loc                 = ICsAdvection_loc;
5177841947SLeila Ghaffari   problem->apply_vol_rhs           = Advection;
5277841947SLeila Ghaffari   problem->apply_vol_rhs_loc       = Advection_loc;
5377841947SLeila Ghaffari   problem->apply_vol_ifunction     = IFunction_Advection;
5477841947SLeila Ghaffari   problem->apply_vol_ifunction_loc = IFunction_Advection_loc;
5577841947SLeila Ghaffari   problem->apply_sur               = Advection_Sur;
5677841947SLeila Ghaffari   problem->apply_sur_loc           = Advection_Sur_loc;
5777841947SLeila Ghaffari   problem->bc                      = Exact_Advection;
58d0b732dbSLeila Ghaffari   problem->setup_ctx               = SetupContext_ADVECTION;
5977841947SLeila Ghaffari   problem->bc_func                 = BC_ADVECTION;
6077841947SLeila Ghaffari   problem->non_zero_time           = PETSC_FALSE;
6177841947SLeila Ghaffari   problem->print_info              = PRINT_ADVECTION;
6277841947SLeila Ghaffari 
6377841947SLeila Ghaffari   // ------------------------------------------------------
6477841947SLeila Ghaffari   //             Create the libCEED context
6577841947SLeila Ghaffari   // ------------------------------------------------------
6677841947SLeila Ghaffari   PetscScalar lx         = 8000.;      // m
6777841947SLeila Ghaffari   PetscScalar ly         = 8000.;      // m
6877841947SLeila Ghaffari   PetscScalar lz         = 4000.;      // m
6977841947SLeila Ghaffari   CeedScalar rc          = 1000.;      // m (Radius of bubble)
7077841947SLeila Ghaffari   CeedScalar CtauS       = 0.;         // dimensionless
7177841947SLeila Ghaffari   CeedScalar strong_form = 0.;         // [0,1]
7277841947SLeila Ghaffari   CeedScalar E_wind      = 1.e6;       // J
7377841947SLeila Ghaffari   PetscReal wind[3]      = {1., 0, 0}; // m/s
7477841947SLeila Ghaffari 
7577841947SLeila Ghaffari   // ------------------------------------------------------
7677841947SLeila Ghaffari   //             Create the PETSc context
7777841947SLeila Ghaffari   // ------------------------------------------------------
7877841947SLeila Ghaffari   PetscScalar meter    = 1e-2; // 1 meter in scaled length units
7977841947SLeila Ghaffari   PetscScalar kilogram = 1e-6; // 1 kilogram in scaled mass units
8077841947SLeila Ghaffari   PetscScalar second   = 1e-2; // 1 second in scaled time units
8177841947SLeila Ghaffari   PetscScalar Joule;
8277841947SLeila Ghaffari 
8377841947SLeila Ghaffari   // ------------------------------------------------------
8477841947SLeila Ghaffari   //              Command line Options
8577841947SLeila Ghaffari   // ------------------------------------------------------
8677841947SLeila Ghaffari   ierr = PetscOptionsBegin(comm, NULL, "Options for ADVECTION problem",
8777841947SLeila Ghaffari                            NULL); CHKERRQ(ierr);
8877841947SLeila Ghaffari   // -- Physics
8977841947SLeila Ghaffari   ierr = PetscOptionsScalar("-lx", "Length scale in x direction",
9077841947SLeila Ghaffari                             NULL, lx, &lx, NULL); CHKERRQ(ierr);
9177841947SLeila Ghaffari   ierr = PetscOptionsScalar("-ly", "Length scale in y direction",
9277841947SLeila Ghaffari                             NULL, ly, &ly, NULL); CHKERRQ(ierr);
9377841947SLeila Ghaffari   ierr = PetscOptionsScalar("-lz", "Length scale in z direction",
9477841947SLeila Ghaffari                             NULL, lz, &lz, NULL); CHKERRQ(ierr);
9577841947SLeila Ghaffari   ierr = PetscOptionsScalar("-rc", "Characteristic radius of thermal bubble",
9677841947SLeila Ghaffari                             NULL, rc, &rc, NULL); CHKERRQ(ierr);
9777841947SLeila Ghaffari   PetscBool translation;
9877841947SLeila Ghaffari   ierr = PetscOptionsEnum("-wind_type", "Wind type in Advection",
9977841947SLeila Ghaffari                           NULL, WindTypes,
10077841947SLeila Ghaffari                           (PetscEnum)(wind_type = WIND_ROTATION),
10177841947SLeila Ghaffari                           (PetscEnum *)&wind_type, &translation); CHKERRQ(ierr);
10277841947SLeila Ghaffari   if (translation) user->phys->has_neumann = PETSC_TRUE;
10377841947SLeila Ghaffari   PetscInt n = problem->dim;
10477841947SLeila Ghaffari   PetscBool user_wind;
10577841947SLeila Ghaffari   ierr = PetscOptionsRealArray("-wind_translation", "Constant wind vector",
10677841947SLeila Ghaffari                                NULL, wind, &n, &user_wind); CHKERRQ(ierr);
10777841947SLeila Ghaffari   ierr = PetscOptionsScalar("-CtauS",
10877841947SLeila Ghaffari                             "Scale coefficient for tau (nondimensional)",
10977841947SLeila Ghaffari                             NULL, CtauS, &CtauS, NULL); CHKERRQ(ierr);
11077841947SLeila Ghaffari   ierr = PetscOptionsScalar("-strong_form",
11177841947SLeila Ghaffari                             "Strong (1) or weak/integrated by parts (0) advection residual",
11277841947SLeila Ghaffari                             NULL, strong_form, &strong_form, NULL); CHKERRQ(ierr);
11377841947SLeila Ghaffari   ierr = PetscOptionsScalar("-E_wind", "Total energy of inflow wind",
11477841947SLeila Ghaffari                             NULL, E_wind, &E_wind, NULL); CHKERRQ(ierr);
11577841947SLeila Ghaffari   ierr = PetscOptionsEnum("-bubble_type", "Sphere (3D) or cylinder (2D)",
11677841947SLeila Ghaffari                           NULL, BubbleTypes,
11777841947SLeila Ghaffari                           (PetscEnum)(bubble_type = BUBBLE_SPHERE),
11877841947SLeila Ghaffari                           (PetscEnum *)&bubble_type, NULL); CHKERRQ(ierr);
11977841947SLeila Ghaffari   ierr = PetscOptionsEnum("-bubble_continuity", "Smooth, back_sharp, or thick",
12077841947SLeila Ghaffari                           NULL, BubbleContinuityTypes,
12177841947SLeila Ghaffari                           (PetscEnum)(bubble_continuity_type = BUBBLE_CONTINUITY_SMOOTH),
12277841947SLeila Ghaffari                           (PetscEnum *)&bubble_continuity_type, NULL); CHKERRQ(ierr);
12377841947SLeila Ghaffari   ierr = PetscOptionsEnum("-stab", "Stabilization method", NULL,
12477841947SLeila Ghaffari                           StabilizationTypes, (PetscEnum)(stab = STAB_NONE),
12577841947SLeila Ghaffari                           (PetscEnum *)&stab, NULL); CHKERRQ(ierr);
12677841947SLeila Ghaffari   ierr = PetscOptionsBool("-implicit", "Use implicit (IFunction) formulation",
12777841947SLeila Ghaffari                           NULL, implicit=PETSC_FALSE, &implicit, NULL);
12877841947SLeila Ghaffari   CHKERRQ(ierr);
12977841947SLeila Ghaffari 
13077841947SLeila Ghaffari   // -- Units
13177841947SLeila Ghaffari   ierr = PetscOptionsScalar("-units_meter", "1 meter in scaled length units",
13277841947SLeila Ghaffari                             NULL, meter, &meter, NULL); CHKERRQ(ierr);
13377841947SLeila Ghaffari   meter = fabs(meter);
13477841947SLeila Ghaffari   ierr = PetscOptionsScalar("-units_kilogram","1 kilogram in scaled mass units",
13577841947SLeila Ghaffari                             NULL, kilogram, &kilogram, NULL); CHKERRQ(ierr);
13677841947SLeila Ghaffari   kilogram = fabs(kilogram);
13777841947SLeila Ghaffari   ierr = PetscOptionsScalar("-units_second","1 second in scaled time units",
13877841947SLeila Ghaffari                             NULL, second, &second, NULL); CHKERRQ(ierr);
13977841947SLeila Ghaffari   second = fabs(second);
14077841947SLeila Ghaffari 
14177841947SLeila Ghaffari   // -- Warnings
14277841947SLeila Ghaffari   if (wind_type == WIND_ROTATION && user_wind) {
14377841947SLeila Ghaffari     ierr = PetscPrintf(comm,
14477841947SLeila Ghaffari                        "Warning! Use -wind_translation only with -wind_type translation\n");
14577841947SLeila Ghaffari     CHKERRQ(ierr);
14677841947SLeila Ghaffari   }
14777841947SLeila Ghaffari   if (wind_type == WIND_TRANSLATION
14877841947SLeila Ghaffari       && bubble_type == BUBBLE_CYLINDER && wind[2] != 0.) {
14977841947SLeila Ghaffari     wind[2] = 0;
15077841947SLeila Ghaffari     ierr = PetscPrintf(comm,
15177841947SLeila Ghaffari                        "Warning! Background wind in the z direction should be zero (-wind_translation x,x,0) with -bubble_type cylinder\n");
15277841947SLeila Ghaffari     CHKERRQ(ierr);
15377841947SLeila Ghaffari   }
15477841947SLeila Ghaffari   if (stab == STAB_NONE && CtauS != 0) {
15577841947SLeila Ghaffari     ierr = PetscPrintf(comm,
15677841947SLeila Ghaffari                        "Warning! Use -CtauS only with -stab su or -stab supg\n");
15777841947SLeila Ghaffari     CHKERRQ(ierr);
15877841947SLeila Ghaffari   }
15977841947SLeila Ghaffari   if (stab == STAB_SUPG && !implicit) {
16077841947SLeila Ghaffari     ierr = PetscPrintf(comm,
16177841947SLeila Ghaffari                        "Warning! Use -stab supg only with -implicit\n");
16277841947SLeila Ghaffari     CHKERRQ(ierr);
16377841947SLeila Ghaffari   }
16477841947SLeila Ghaffari 
16577841947SLeila Ghaffari   ierr = PetscOptionsEnd(); CHKERRQ(ierr);
16677841947SLeila Ghaffari 
16777841947SLeila Ghaffari   // ------------------------------------------------------
16877841947SLeila Ghaffari   //           Set up the PETSc context
16977841947SLeila Ghaffari   // ------------------------------------------------------
17077841947SLeila Ghaffari   // -- Define derived units
17177841947SLeila Ghaffari   Joule = kilogram * PetscSqr(meter) / PetscSqr(second);
17277841947SLeila Ghaffari 
17377841947SLeila Ghaffari   user->units->meter    = meter;
17477841947SLeila Ghaffari   user->units->kilogram = kilogram;
17577841947SLeila Ghaffari   user->units->second   = second;
17677841947SLeila Ghaffari   user->units->Joule    = Joule;
17777841947SLeila Ghaffari 
17877841947SLeila Ghaffari   // ------------------------------------------------------
17977841947SLeila Ghaffari   //           Set up the libCEED context
18077841947SLeila Ghaffari   // ------------------------------------------------------
18177841947SLeila Ghaffari   // -- Scale variables to desired units
18277841947SLeila Ghaffari   E_wind *= Joule;
18377841947SLeila Ghaffari   lx = fabs(lx) * meter;
18477841947SLeila Ghaffari   ly = fabs(ly) * meter;
18577841947SLeila Ghaffari   lz = fabs(lz) * meter;
18677841947SLeila Ghaffari   rc = fabs(rc) * meter;
187e535bb46SLeila Ghaffari   for (int i=0; i<3; i++) wind[i] = wind[i] * (meter/second);
18877841947SLeila Ghaffari 
18977841947SLeila Ghaffari   // -- Setup Context
19077841947SLeila Ghaffari   setup_context->rc                     = rc;
19177841947SLeila Ghaffari   setup_context->lx                     = lx;
19277841947SLeila Ghaffari   setup_context->ly                     = ly;
19377841947SLeila Ghaffari   setup_context->lz                     = lz;
19477841947SLeila Ghaffari   setup_context->wind[0]                = wind[0];
19577841947SLeila Ghaffari   setup_context->wind[1]                = wind[1];
19677841947SLeila Ghaffari   setup_context->wind[2]                = wind[2];
19777841947SLeila Ghaffari   setup_context->wind_type              = wind_type;
19877841947SLeila Ghaffari   setup_context->bubble_type            = bubble_type;
19977841947SLeila Ghaffari   setup_context->bubble_continuity_type = bubble_continuity_type;
20077841947SLeila Ghaffari   setup_context->time = 0;
20177841947SLeila Ghaffari 
20277841947SLeila Ghaffari   // -- QFunction Context
20377841947SLeila Ghaffari   user->phys->stab                         = stab;
20477841947SLeila Ghaffari   user->phys->wind_type                    = wind_type;
20577841947SLeila Ghaffari   user->phys->bubble_type                  = bubble_type;
20677841947SLeila Ghaffari   user->phys->bubble_continuity_type       = bubble_continuity_type;
20777841947SLeila Ghaffari   //  if passed correctly
20877841947SLeila Ghaffari   user->phys->implicit                     = implicit;
20977841947SLeila Ghaffari   user->phys->has_curr_time                = has_curr_time;
21077841947SLeila Ghaffari   user->phys->advection_ctx->CtauS         = CtauS;
21177841947SLeila Ghaffari   user->phys->advection_ctx->E_wind        = E_wind;
21277841947SLeila Ghaffari   user->phys->advection_ctx->implicit      = implicit;
21377841947SLeila Ghaffari   user->phys->advection_ctx->strong_form   = strong_form;
21477841947SLeila Ghaffari   user->phys->advection_ctx->stabilization = stab;
21577841947SLeila Ghaffari 
21677841947SLeila Ghaffari   PetscFunctionReturn(0);
21777841947SLeila Ghaffari }
21877841947SLeila Ghaffari 
219d0b732dbSLeila Ghaffari PetscErrorCode SetupContext_ADVECTION(Ceed ceed, CeedData ceed_data,
220d0b732dbSLeila Ghaffari                                       AppCtx app_ctx, SetupContext setup_ctx, Physics phys) {
221d0b732dbSLeila Ghaffari   PetscFunctionBeginUser;
222d0b732dbSLeila Ghaffari 
223d0b732dbSLeila Ghaffari   CeedQFunctionContextCreate(ceed, &ceed_data->setup_context);
224d0b732dbSLeila Ghaffari   CeedQFunctionContextSetData(ceed_data->setup_context, CEED_MEM_HOST,
225d0b732dbSLeila Ghaffari                               CEED_USE_POINTER, sizeof(*setup_ctx), setup_ctx);
226d0b732dbSLeila Ghaffari   CeedQFunctionSetContext(ceed_data->qf_ics, ceed_data->setup_context);
227d0b732dbSLeila Ghaffari   CeedQFunctionContextCreate(ceed, &ceed_data->advection_context);
228d0b732dbSLeila Ghaffari   CeedQFunctionContextSetData(ceed_data->advection_context, CEED_MEM_HOST,
229d0b732dbSLeila Ghaffari                               CEED_USE_POINTER,
230d0b732dbSLeila Ghaffari                               sizeof(*phys->advection_ctx), phys->advection_ctx);
231d0b732dbSLeila Ghaffari   if (ceed_data->qf_rhs_vol)
232d0b732dbSLeila Ghaffari     CeedQFunctionSetContext(ceed_data->qf_rhs_vol, ceed_data->advection_context);
233d0b732dbSLeila Ghaffari   if (ceed_data->qf_ifunction_vol)
234d0b732dbSLeila Ghaffari     CeedQFunctionSetContext(ceed_data->qf_ifunction_vol,
235d0b732dbSLeila Ghaffari                             ceed_data->advection_context);
236d0b732dbSLeila Ghaffari   if (ceed_data->qf_apply_sur)
237d0b732dbSLeila Ghaffari     CeedQFunctionSetContext(ceed_data->qf_apply_sur, ceed_data->advection_context);
238d0b732dbSLeila Ghaffari 
239d0b732dbSLeila Ghaffari   PetscFunctionReturn(0);
240d0b732dbSLeila Ghaffari }
241d0b732dbSLeila Ghaffari 
24277841947SLeila Ghaffari PetscErrorCode BC_ADVECTION(DM dm, SimpleBC bc, Physics phys,
24377841947SLeila Ghaffari                             void *setup_ctx) {
24477841947SLeila Ghaffari   PetscErrorCode ierr;
24577841947SLeila Ghaffari   PetscFunctionBeginUser;
24677841947SLeila Ghaffari 
24777841947SLeila Ghaffari   // Define boundary conditions
24877841947SLeila Ghaffari   if (phys->wind_type == WIND_TRANSLATION) {
24977841947SLeila Ghaffari     bc->num_wall = bc->num_slip[2] = 0;
25077841947SLeila Ghaffari   } else if (phys->wind_type == WIND_ROTATION &&
25177841947SLeila Ghaffari              phys->bubble_type == BUBBLE_CYLINDER) {
25277841947SLeila Ghaffari     bc->num_slip[2] = 2; bc->slips[2][0] = 1; bc->slips[2][1] = 2;
25377841947SLeila Ghaffari     bc->num_wall = 4;
25477841947SLeila Ghaffari     bc->walls[0] = 3; bc->walls[1] = 4; bc->walls[2] = 5; bc->walls[3] = 6;
25577841947SLeila Ghaffari   } else {
25677841947SLeila Ghaffari     bc->num_slip[2] = 0;
25777841947SLeila Ghaffari     bc->num_wall = 6;
25877841947SLeila Ghaffari     bc->walls[0] = 1; bc->walls[1] = 2; bc->walls[2] = 3;
25977841947SLeila Ghaffari     bc->walls[3] = 4; bc->walls[4] = 5; bc->walls[5] = 6;
26077841947SLeila Ghaffari   }
26177841947SLeila Ghaffari 
26277841947SLeila Ghaffari   {
26377841947SLeila Ghaffari     // Set slip boundary conditions
26477841947SLeila Ghaffari     DMLabel label;
26577841947SLeila Ghaffari     ierr = DMGetLabel(dm, "Face Sets", &label); CHKERRQ(ierr);
26677841947SLeila Ghaffari     PetscInt comps[1] = {3};
267*b8962995SJeremy L Thompson     ierr = DMAddBoundary(dm, DM_BC_ESSENTIAL, "slipz", label,
26877841947SLeila Ghaffari                          bc->num_slip[2], bc->slips[2], 0, 1, comps,
26977841947SLeila Ghaffari                          (void(*)(void))NULL, NULL, setup_ctx, NULL);
27077841947SLeila Ghaffari     CHKERRQ(ierr);
27177841947SLeila Ghaffari   }
27277841947SLeila Ghaffari 
27377841947SLeila Ghaffari   // Set wall boundary conditions
27477841947SLeila Ghaffari   //   zero energy density and zero flux
27577841947SLeila Ghaffari   {
27677841947SLeila Ghaffari     DMLabel  label;
27777841947SLeila Ghaffari     PetscInt comps[1] = {4};
27877841947SLeila Ghaffari     ierr = DMGetLabel(dm, "Face Sets", &label); CHKERRQ(ierr);
279*b8962995SJeremy L Thompson     ierr = DMAddBoundary(dm, DM_BC_ESSENTIAL, "wall", label,
28077841947SLeila Ghaffari                          bc->num_wall, bc->walls, 0,
28177841947SLeila Ghaffari                          1, comps, (void(*)(void))Exact_Advection, NULL,
28277841947SLeila Ghaffari                          setup_ctx, NULL); CHKERRQ(ierr);
28377841947SLeila Ghaffari   }
28477841947SLeila Ghaffari 
28577841947SLeila Ghaffari   PetscFunctionReturn(0);
28677841947SLeila Ghaffari }
28777841947SLeila Ghaffari 
28877841947SLeila Ghaffari PetscErrorCode PRINT_ADVECTION(Physics phys, SetupContext setup_ctx,
28977841947SLeila Ghaffari                                AppCtx app_ctx) {
29077841947SLeila Ghaffari   MPI_Comm       comm = PETSC_COMM_WORLD;
29177841947SLeila Ghaffari   PetscErrorCode ierr;
29277841947SLeila Ghaffari   PetscFunctionBeginUser;
29377841947SLeila Ghaffari 
29477841947SLeila Ghaffari   ierr = PetscPrintf(comm,
29577841947SLeila Ghaffari                      "  Problem:\n"
29677841947SLeila Ghaffari                      "    Problem Name                       : %s\n"
29777841947SLeila Ghaffari                      "    Stabilization                      : %s\n"
29877841947SLeila Ghaffari                      "    Bubble Type                        : %s (%dD)\n"
29977841947SLeila Ghaffari                      "    Bubble Continuity                  : %s\n"
30077841947SLeila Ghaffari                      "    Wind Type                          : %s\n",
30177841947SLeila Ghaffari                      app_ctx->problem_name, StabilizationTypes[phys->stab],
30277841947SLeila Ghaffari                      BubbleTypes[phys->bubble_type],
30377841947SLeila Ghaffari                      phys->bubble_type == BUBBLE_SPHERE ? 3 : 2,
30477841947SLeila Ghaffari                      BubbleContinuityTypes[phys->bubble_continuity_type],
30577841947SLeila Ghaffari                      WindTypes[phys->wind_type]); CHKERRQ(ierr);
30677841947SLeila Ghaffari 
30777841947SLeila Ghaffari   if (phys->wind_type == WIND_TRANSLATION) {
30877841947SLeila Ghaffari     ierr = PetscPrintf(comm,
30977841947SLeila Ghaffari                        "    Background Wind                    : %f,%f,%f\n",
31077841947SLeila Ghaffari                        setup_ctx->wind[0], setup_ctx->wind[1], setup_ctx->wind[2]); CHKERRQ(ierr);
31177841947SLeila Ghaffari   }
31277841947SLeila Ghaffari   PetscFunctionReturn(0);
31377841947SLeila Ghaffari }
314