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