41 template <
int dim,
int spacedim>
43 : use_mapping_q1_on_current_cell(false)
48 template <
int dim,
int spacedim>
61 template <
int dim,
int spacedim>
89 template <
int dim,
int spacedim>
91 : polynomial_degree(mapping.polynomial_degree)
92 , use_mapping_q_on_all_cells(mapping.use_mapping_q_on_all_cells)
96 std::shared_ptr<const Mapping<dim, spacedim>> other_q1_map =
98 q1_mapping = std::dynamic_pointer_cast<const MappingQGeneric<dim, spacedim>>(
110 std::shared_ptr<const Mapping<dim, spacedim>> other_qp_map =
113 std::dynamic_pointer_cast<const MappingQGeneric<dim, spacedim>>(
121 template <
int dim,
int spacedim>
125 return polynomial_degree;
130 template <
int dim,
int spacedim>
139 template <
int dim,
int spacedim>
143 return (q1_mapping->requires_update_flags(in) |
144 qp_mapping->requires_update_flags(in));
149 template <
int dim,
int spacedim>
150 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>
154 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase> data_ptr =
155 std_cxx14::make_unique<InternalData>();
156 auto &data =
dynamic_cast<InternalData &
>(*data_ptr);
160 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>>
166 if (!use_mapping_q_on_all_cells)
169 std::move(q1_mapping->get_data(update_flags, quadrature)));
174 std::move(do_get_data.return_value()));
180 template <
int dim,
int spacedim>
181 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>
186 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase> data_ptr =
187 std_cxx14::make_unique<InternalData>();
188 auto &data =
dynamic_cast<InternalData &
>(*data_ptr);
192 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>>
199 if (!use_mapping_q_on_all_cells)
202 std::move(q1_mapping->get_face_data(update_flags, quadrature)));
207 std::move(do_get_data.return_value()));
213 template <
int dim,
int spacedim>
214 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>
219 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase> data_ptr =
220 std_cxx14::make_unique<InternalData>();
221 auto &data =
dynamic_cast<InternalData &
>(*data_ptr);
225 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>>
232 if (!use_mapping_q_on_all_cells)
235 std::move(q1_mapping->get_subface_data(update_flags, quadrature)));
240 std::move(do_get_data.return_value()));
247 template <
int dim,
int spacedim>
259 Assert(
dynamic_cast<const InternalData *
>(&internal_data) !=
nullptr,
261 const InternalData &data =
static_cast<const InternalData &
>(internal_data);
265 data.use_mapping_q1_on_current_cell =
266 !(use_mapping_q_on_all_cells || cell->has_boundary_lines());
276 ((data.use_mapping_q1_on_current_cell ==
false) &&
277 (this->polynomial_degree > 1) ?
283 if (data.use_mapping_q1_on_current_cell)
284 q1_mapping->fill_fe_values(cell,
285 updated_cell_similarity,
287 *data.mapping_q1_data,
290 qp_mapping->fill_fe_values(cell,
291 updated_cell_similarity,
293 *data.mapping_qp_data,
296 return updated_cell_similarity;
301 template <
int dim,
int spacedim>
305 const unsigned int face_no,
313 Assert(
dynamic_cast<const InternalData *
>(&internal_data) !=
nullptr,
315 const InternalData &data =
static_cast<const InternalData &
>(internal_data);
323 data.use_mapping_q1_on_current_cell =
324 !(use_mapping_q_on_all_cells || cell->has_boundary_lines());
328 if (data.use_mapping_q1_on_current_cell)
329 q1_mapping->fill_fe_face_values(
330 cell, face_no, quadrature, *data.mapping_q1_data, output_data);
332 qp_mapping->fill_fe_face_values(
333 cell, face_no, quadrature, *data.mapping_qp_data, output_data);
337 template <
int dim,
int spacedim>
341 const unsigned int face_no,
342 const unsigned int subface_no,
350 Assert(
dynamic_cast<const InternalData *
>(&internal_data) !=
nullptr,
352 const InternalData &data =
static_cast<const InternalData &
>(internal_data);
360 data.use_mapping_q1_on_current_cell =
361 !(use_mapping_q_on_all_cells || cell->has_boundary_lines());
365 if (data.use_mapping_q1_on_current_cell)
366 q1_mapping->fill_fe_subface_values(cell,
370 *data.mapping_q1_data,
373 qp_mapping->fill_fe_subface_values(cell,
377 *data.mapping_qp_data,
383 template <
int dim,
int spacedim>
393 const InternalData *data =
dynamic_cast<const InternalData *
>(&mapping_data);
397 if (data->use_mapping_q1_on_current_cell)
398 q1_mapping->transform(input, mapping_kind, *data->mapping_q1_data, output);
401 qp_mapping->transform(input, mapping_kind, *data->mapping_qp_data, output);
406 template <
int dim,
int spacedim>
416 &mapping_data) !=
nullptr),
418 const InternalData *data =
dynamic_cast<const InternalData *
>(&mapping_data);
421 if (data->use_mapping_q1_on_current_cell)
422 q1_mapping->transform(input, mapping_kind, *data->mapping_q1_data, output);
425 qp_mapping->transform(input, mapping_kind, *data->mapping_qp_data, output);
430 template <
int dim,
int spacedim>
440 &mapping_data) !=
nullptr),
442 const InternalData *data =
dynamic_cast<const InternalData *
>(&mapping_data);
445 if (data->use_mapping_q1_on_current_cell)
446 q1_mapping->transform(input, mapping_kind, *data->mapping_q1_data, output);
449 qp_mapping->transform(input, mapping_kind, *data->mapping_qp_data, output);
454 template <
int dim,
int spacedim>
464 &mapping_data) !=
nullptr),
466 const InternalData *data =
dynamic_cast<const InternalData *
>(&mapping_data);
469 if (data->use_mapping_q1_on_current_cell)
470 q1_mapping->transform(input, mapping_kind, *data->mapping_q1_data, output);
473 qp_mapping->transform(input, mapping_kind, *data->mapping_qp_data, output);
478 template <
int dim,
int spacedim>
488 &mapping_data) !=
nullptr),
490 const InternalData *data =
dynamic_cast<const InternalData *
>(&mapping_data);
493 if (data->use_mapping_q1_on_current_cell)
494 q1_mapping->transform(input, mapping_kind, *data->mapping_q1_data, output);
497 qp_mapping->transform(input, mapping_kind, *data->mapping_qp_data, output);
502 template <
int dim,
int spacedim>
511 if (use_mapping_q_on_all_cells || cell->has_boundary_lines())
512 return qp_mapping->transform_unit_to_real_cell(cell, p);
514 return q1_mapping->transform_unit_to_real_cell(cell, p);
519 template <
int dim,
int spacedim>
525 if (cell->has_boundary_lines() || use_mapping_q_on_all_cells ||
527 return qp_mapping->transform_real_to_unit_cell(cell, p);
529 return q1_mapping->transform_real_to_unit_cell(cell, p);
534 template <
int dim,
int spacedim>
535 std::unique_ptr<Mapping<dim, spacedim>>
538 return std_cxx14::make_unique<MappingQ<dim, spacedim>>(
539 this->polynomial_degree, this->use_mapping_q_on_all_cells);
545 #include "mapping_q.inst"