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