xref: /libCEED/examples/petsc/include/areaproblemdata.h (revision 29ea4e1095af0be46b4a5cfdf830ac9197977b48)
1 // Copyright (c) 2017-2022, 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 /// @file
9 /// Problem data for area examples
10 
11 #ifndef libceed_petsc_examples_area_problem_data_h
12 #define libceed_petsc_examples_area_problem_data_h
13 
14 #include <ceed.h>
15 #include <petsc.h>
16 
17 #include "../include/structs.h"
18 #include "../qfunctions/area/areacube.h"
19 #include "../qfunctions/area/areasphere.h"
20 
21 // -----------------------------------------------------------------------------
22 // Problem Option Data
23 // -----------------------------------------------------------------------------
24 
25 // Problem options
26 typedef enum { CUBE = 0, SPHERE = 1 } ProblemType;
27 
28 static BPData problem_options[6] = {
29     [CUBE] =
30         {
31                 .num_comp_x    = 3,
32                 .num_comp_u    = 1,
33                 .topo_dim      = 2,
34                 .q_data_size   = 1,
35                 .q_extra       = 1,
36                 .setup_geo     = SetupMassGeoCube,
37                 .apply         = Mass,
38                 .setup_geo_loc = SetupMassGeoCube_loc,
39                 .apply_loc     = Mass_loc,
40                 .in_mode       = CEED_EVAL_INTERP,
41                 .out_mode      = CEED_EVAL_INTERP,
42                 .q_mode        = CEED_GAUSS,
43                 .enforce_bc    = PETSC_FALSE,
44                 },
45     [SPHERE] = {
46                 .num_comp_x    = 3,
47                 .num_comp_u    = 1,
48                 .topo_dim      = 2,
49                 .q_data_size   = 1,
50                 .q_extra       = 1,
51                 .setup_geo     = SetupMassGeoSphere,
52                 .apply         = Mass,
53                 .setup_geo_loc = SetupMassGeoSphere_loc,
54                 .apply_loc     = Mass_loc,
55                 .in_mode       = CEED_EVAL_INTERP,
56                 .out_mode      = CEED_EVAL_INTERP,
57                 .q_mode        = CEED_GAUSS,
58                 .enforce_bc    = PETSC_FALSE,
59                 }
60 };
61 
62 #endif  // libceed_petsc_examples_area_problem_data_h
63