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