xref: /libCEED/examples/petsc/include/sphereproblemdata.h (revision 5a526491291e2ef13670ec99232a2cb0069702e5)
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 BPS sphere examples
10 #pragma once
11 
12 #include <ceed.h>
13 #include <petsc.h>
14 
15 #include "../include/structs.h"
16 #include "../qfunctions/bps/bp1sphere.h"
17 #include "../qfunctions/bps/bp2sphere.h"
18 #include "../qfunctions/bps/bp3sphere.h"
19 #include "../qfunctions/bps/bp4sphere.h"
20 #include "../qfunctions/bps/common.h"
21 
22 // -----------------------------------------------------------------------------
23 // BP Option Data
24 // -----------------------------------------------------------------------------
25 
26 static BPData bp_options[6] = {
27     [CEED_BP1] = {.num_comp_u    = 1,
28                   .num_comp_x    = 3,
29                   .topo_dim      = 3,
30                   .q_data_size   = 1,
31                   .q_extra       = 1,
32                   .setup_geo     = SetupMassGeo,
33                   .setup_rhs     = SetupMassRhs,
34                   .apply         = Mass,
35                   .error         = Error,
36                   .setup_geo_loc = SetupMassGeo_loc,
37                   .setup_rhs_loc = SetupMassRhs_loc,
38                   .apply_loc     = Mass_loc,
39                   .error_loc     = Error_loc,
40                   .in_mode       = CEED_EVAL_INTERP,
41                   .out_mode      = CEED_EVAL_INTERP,
42                   .q_mode        = CEED_GAUSS        },
43     [CEED_BP2] = {.num_comp_u    = 3,
44                   .num_comp_x    = 3,
45                   .topo_dim      = 3,
46                   .q_data_size   = 1,
47                   .q_extra       = 1,
48                   .setup_geo     = SetupMassGeo,
49                   .setup_rhs     = SetupMassRhs3,
50                   .apply         = Mass3,
51                   .error         = Error3,
52                   .setup_geo_loc = SetupMassGeo_loc,
53                   .setup_rhs_loc = SetupMassRhs3_loc,
54                   .apply_loc     = Mass3_loc,
55                   .error_loc     = Error3_loc,
56                   .in_mode       = CEED_EVAL_INTERP,
57                   .out_mode      = CEED_EVAL_INTERP,
58                   .q_mode        = CEED_GAUSS        },
59     [CEED_BP3] = {.num_comp_u    = 1,
60                   .num_comp_x    = 3,
61                   .topo_dim      = 3,
62                   .q_data_size   = 4,
63                   .q_extra       = 1,
64                   .setup_geo     = SetupDiffGeo,
65                   .setup_rhs     = SetupDiffRhs,
66                   .apply         = Diff,
67                   .error         = Error,
68                   .setup_geo_loc = SetupDiffGeo_loc,
69                   .setup_rhs_loc = SetupDiffRhs_loc,
70                   .apply_loc     = Diff_loc,
71                   .error_loc     = Error_loc,
72                   .in_mode       = CEED_EVAL_GRAD,
73                   .out_mode      = CEED_EVAL_GRAD,
74                   .q_mode        = CEED_GAUSS        },
75     [CEED_BP4] = {.num_comp_u    = 3,
76                   .num_comp_x    = 3,
77                   .topo_dim      = 3,
78                   .q_data_size   = 4,
79                   .q_extra       = 1,
80                   .setup_geo     = SetupDiffGeo,
81                   .setup_rhs     = SetupDiffRhs3,
82                   .apply         = Diff3,
83                   .error         = Error3,
84                   .setup_geo_loc = SetupDiffGeo_loc,
85                   .setup_rhs_loc = SetupDiffRhs3_loc,
86                   .apply_loc     = Diff_loc,
87                   .error_loc     = Error3_loc,
88                   .in_mode       = CEED_EVAL_GRAD,
89                   .out_mode      = CEED_EVAL_GRAD,
90                   .q_mode        = CEED_GAUSS        },
91     [CEED_BP5] = {.num_comp_u    = 1,
92                   .num_comp_x    = 3,
93                   .topo_dim      = 3,
94                   .q_data_size   = 4,
95                   .q_extra       = 0,
96                   .setup_geo     = SetupDiffGeo,
97                   .setup_rhs     = SetupDiffRhs,
98                   .apply         = Diff,
99                   .error         = Error,
100                   .setup_geo_loc = SetupDiffGeo_loc,
101                   .setup_rhs_loc = SetupDiffRhs_loc,
102                   .apply_loc     = Diff_loc,
103                   .error_loc     = Error_loc,
104                   .in_mode       = CEED_EVAL_GRAD,
105                   .out_mode      = CEED_EVAL_GRAD,
106                   .q_mode        = CEED_GAUSS_LOBATTO},
107     [CEED_BP6] = {.num_comp_u    = 3,
108                   .num_comp_x    = 3,
109                   .topo_dim      = 3,
110                   .q_data_size   = 4,
111                   .q_extra       = 0,
112                   .setup_geo     = SetupDiffGeo,
113                   .setup_rhs     = SetupDiffRhs3,
114                   .apply         = Diff3,
115                   .error         = Error3,
116                   .setup_geo_loc = SetupDiffGeo_loc,
117                   .setup_rhs_loc = SetupDiffRhs3_loc,
118                   .apply_loc     = Diff_loc,
119                   .error_loc     = Error3_loc,
120                   .in_mode       = CEED_EVAL_GRAD,
121                   .out_mode      = CEED_EVAL_GRAD,
122                   .q_mode        = CEED_GAUSS_LOBATTO}
123 };
124