@@ -76,6 +76,186 @@ template <> struct parameters<specfem::dimension::type::dim2> {
7676 nelem_on_the_axis(nelem_on_the_axis),
7777 plot_lowerleft_corner_only(plot_lowerleft_corner_only){};
7878};
79+
80+ /* *
81+ * @brief Template specialization for 3D mesh parameters
82+ */
83+ template <> struct parameters <specfem::dimension::type::dim3> {
84+ constexpr static auto dimension =
85+ specfem::dimension::type::dim3; // /< Dimension
86+ // /< type
87+
88+ // Flags
89+ bool acoustic_simulation; // /< Flag for acoustic simulation
90+ bool elastic_simulation; // /< Flag for elastic simulation
91+ bool poroelastic_simulation; // /< Flag for poroelastic simulation
92+ bool anisotropy; // /< Flag for anisotropy
93+ bool stacey_abc; // /< Flag for Stacey absorbing boundary c.
94+ bool pml_abc; // /< Flag for PML absorbing boundary c.
95+ bool approximate_ocean_load; // /< Flag for approx. ocean load
96+ bool use_mesh_coloring; // /< Flag for mesh coloring
97+
98+ // Integer Parameters: Dimensions and GLL layouts
99+ int ndim; // /< Number of dimensions
100+ int ngllx; // /< Number of GLL points in x
101+ int nglly; // /< Number of GLL points in y
102+ int ngllz; // /< Number of GLL points in z
103+ int ngllsquare; // /< Number of GLL points in square
104+
105+ // Integer Parameters: Elements/Nodes
106+ int nspec; // /< Number of spectral elements (SEs)
107+ int nspec_poro; // /< Number of poroelastic SEs
108+ int nglob; // /< Number of global nodes
109+ int nglob_ocean; // /< Number of global ocean nodes
110+ int nspec2D_bottom; // /< Number of 2D SEs at the bottom
111+ int nspec2D_top; // /< Number of 2D SEs at the top
112+ int nspec2D_xmin; // /< Number of 2D SEs at the left
113+ int nspec2D_xmax; // /< Number of 2D SEs at the right
114+ int nspec2D_ymin; // /< Number of 2D SEs at the front
115+ int nspec2D_ymax; // /< Number of 2D SEs at the back
116+ int nspec_irregular; // /< Number of irregular SEs
117+
118+ // Integer Parameters: Mesh
119+ int num_neighbors; // /< Number of neighbors
120+ int nfaces_surface; // /< Number of faces on the surface
121+ int num_abs_boundary_faces; // /< Number of absorbing boundary faces
122+ int num_free_surface_faces; // /< Number of free surface faces
123+ int num_coupling_ac_el_faces; // /< Number of acoustic-elastic faces
124+ int num_coupling_ac_po_faces; // /< Number of acoustic-poroelastic faces
125+ int num_coupling_el_po_faces; // /< Number of elastic-poroelastic faces
126+ int num_coupling_po_el_faces; // /< Number of poroelastic-elastic faces
127+ int num_interfaces_ext_mesh; // /< Number of external mesh interfaces
128+ int max_nibool_interfaces_ext_mesh; // /< Maximum number of interfaces
129+
130+ // Integer Parameters: Nspec Inner/Outer
131+ int nspec_inner_acoustic; // /< Number of inner acoustic SEs
132+ int nspec_outer_acoustic; // /< Number of outer acoustic SEs
133+ int nspec_inner_elastic; // /< Number of inner elastic SEs
134+ int nspec_outer_elastic; // /< Number of outer elastic SEs
135+ int nspec_inner_poroelastic; // /< Number of inner poroelastic SEs
136+ int nspec_outer_poroelastic; // /< Number of outer poroelastic SEs
137+
138+ // Integer Parameters: coloring
139+ int num_phase_ispec_acoustic;
140+ int num_phase_ispec_elastic;
141+ int num_phase_ispec_poroelastic;
142+ int num_colors_inner_acoustic;
143+ int num_colors_outer_acoustic;
144+ int num_colors_inner_elastic;
145+ int num_colors_outer_elastic;
146+
147+ /* *
148+ * @brief Default constructor
149+ *
150+ */
151+ parameters (){};
152+
153+ /* * Constructor
154+ * @param acoustic_simulation Flag for acoustic simulation
155+ * @param elastic_simulation Flag for elastic simulation
156+ * @param poroelastic_simulation Flag for poroelastic simulation
157+ * @param anisotropy Flag for anisotropy
158+ * @param stacey_abc Flag for Stacey absorbing boundary c.
159+ * @param pml_abc Flag for PML absorbing boundary c.
160+ * @param approximate_ocean_load Flag for approx. ocean load
161+ * @param use_mesh_coloring Flag for mesh coloring
162+ *
163+ *
164+ *
165+ * @param nspec Number of spectral elements (SEs)
166+ * @param nspec_poro Number of poroelastic SEs
167+ * @param nglob Number of global nodes
168+ * @param nglob_ocean Number of global ocean nodes
169+ * @param nspec2D_bottom Number of 2D SEs at the bottom
170+ * @param nspec2D_top Number of 2D SEs at the top
171+ * @param nspec2D_xmin Number of 2D SEs at the left
172+ * @param nspec2D_xmax Number of 2D SEs at the right
173+ * @param nspec2D_ymin Number of 2D SEs at the front
174+ * @param nspec2D_ymax Number of 2D SEs at the back
175+ * @param nspec_irregular Number of irregular SEs
176+ *
177+ * @param num_neighbors Number of neighbors
178+ * @param nfaces_surface Number of faces on the surface
179+ * @param num_abs_boundary_faces Number of absorbing boundary faces
180+ * @param num_free_surface_faces Number of free surface faces
181+ * @param num_coupling_ac_el_faces Number of acoustic-elastic faces
182+ * @param num_coupling_ac_po_faces Number of acoustic-poroelastic faces
183+ * @param num_coupling_el_po_faces Number of elastic-poroelastic faces
184+ * @param num_coupling_po_el_faces Number of poroelastic-elastic faces
185+ * @param num_interfaces_ext_mesh Number of external mesh interfaces
186+ * @param max_nibool_interfaces_ext_mesh Maximum number of interfaces
187+ *
188+ * @param nspec_inner_acoustic Number of inner acoustic SEs
189+ * @param nspec_outer_acoustic Number of outer acoustic SEs
190+ * @param nspec_inner_elastic Number of inner elastic SEs
191+ * @param nspec_outer_elastic Number of outer elastic SEs
192+ * @param nspec_inner_poroelastic Number of inner poroelastic SEs
193+ * @param nspec_outer_poroelastic Number of outer poroelastic SEs
194+ *
195+ * @param num_phase_ispec_acoustic
196+ * @param num_phase_ispec_elastic
197+ * @param num_phase_ispec_poroelastic
198+ * @param num_colors_inner_acoustic
199+ * @param num_colors_outer_acoustic
200+ * @param num_colors_inner_elastic
201+ * @param num_colors_outer_elastic
202+ *
203+ */
204+ parameters (
205+ const bool acoustic_simulation, const bool elastic_simulation,
206+ const bool poroelastic_simulation, const bool anisotropy,
207+ const bool stacey_abc, const bool pml_abc,
208+ const bool approximate_ocean_load, const bool use_mesh_coloring,
209+ const int nspec, const int nspec_poro, const int nglob,
210+ const int nglob_ocean, const int nspec2D_bottom, const int nspec2D_top,
211+ const int nspec2D_xmin, const int nspec2D_xmax, const int nspec2D_ymin,
212+ const int nspec2D_ymax, const int nspec_irregular,
213+ const int num_neighbors, const int nfaces_surface,
214+ const int num_abs_boundary_faces, const int num_free_surface_faces,
215+ const int num_coupling_ac_el_faces, const int num_coupling_ac_po_faces,
216+ const int num_coupling_el_po_faces, const int num_coupling_po_el_faces,
217+ const int num_interfaces_ext_mesh,
218+ const int max_nibool_interfaces_ext_mesh, const int nspec_inner_acoustic,
219+ const int nspec_outer_acoustic, const int nspec_inner_elastic,
220+ const int nspec_outer_elastic, const int nspec_inner_poroelastic,
221+ const int nspec_outer_poroelastic, const int num_phase_ispec_acoustic,
222+ const int num_phase_ispec_elastic, const int num_phase_ispec_poroelastic,
223+ const int num_colors_inner_acoustic, const int num_colors_outer_acoustic,
224+ const int num_colors_inner_elastic, const int num_colors_outer_elastic)
225+ : acoustic_simulation(acoustic_simulation),
226+ elastic_simulation (elastic_simulation),
227+ poroelastic_simulation(poroelastic_simulation), anisotropy(anisotropy),
228+ stacey_abc(stacey_abc), pml_abc(pml_abc),
229+ approximate_ocean_load(approximate_ocean_load),
230+ use_mesh_coloring(use_mesh_coloring), nspec(nspec),
231+ nspec_poro(nspec_poro), nglob(nglob), nglob_ocean(nglob_ocean),
232+ nspec2D_bottom(nspec2D_bottom), nspec2D_top(nspec2D_top),
233+ nspec2D_xmin(nspec2D_xmin), nspec2D_xmax(nspec2D_xmax),
234+ nspec2D_ymin(nspec2D_ymin), nspec2D_ymax(nspec2D_ymax),
235+ nspec_irregular(nspec_irregular), num_neighbors(num_neighbors),
236+ nfaces_surface(nfaces_surface),
237+ num_abs_boundary_faces(num_abs_boundary_faces),
238+ num_free_surface_faces(num_free_surface_faces),
239+ num_coupling_ac_el_faces(num_coupling_ac_el_faces),
240+ num_coupling_ac_po_faces(num_coupling_ac_po_faces),
241+ num_coupling_el_po_faces(num_coupling_el_po_faces),
242+ num_coupling_po_el_faces(num_coupling_po_el_faces),
243+ num_interfaces_ext_mesh(num_interfaces_ext_mesh),
244+ max_nibool_interfaces_ext_mesh(max_nibool_interfaces_ext_mesh),
245+ nspec_inner_acoustic(nspec_inner_acoustic),
246+ nspec_outer_acoustic(nspec_outer_acoustic),
247+ nspec_inner_elastic(nspec_inner_elastic),
248+ nspec_outer_elastic(nspec_outer_elastic),
249+ nspec_inner_poroelastic(nspec_inner_poroelastic),
250+ nspec_outer_poroelastic(nspec_outer_poroelastic),
251+ num_phase_ispec_acoustic(num_phase_ispec_acoustic),
252+ num_phase_ispec_elastic(num_phase_ispec_elastic),
253+ num_phase_ispec_poroelastic(num_phase_ispec_poroelastic),
254+ num_colors_inner_acoustic(num_colors_inner_acoustic),
255+ num_colors_outer_acoustic(num_colors_outer_acoustic),
256+ num_colors_inner_elastic(num_colors_inner_elastic),
257+ num_colors_outer_elastic(num_colors_outer_elastic){};
258+ };
79259} // namespace mesh
80260} // namespace specfem
81261
0 commit comments