444 .solution_hessians[i]
448 .solution_hessians[i][1] =
450 .solution_hessians[i];
485 std::vector<Vector<double>> tmp(
491 dataset->get_function_values(
492 this_fe_patch_values,
494 ComponentExtractor::real_part,
499 for (
unsigned int i = 0;
501 .solution_values.size();
509 for (
unsigned int j = 0; j < n_components;
512 .solution_values[i][j] = tmp[i][j];
518 dataset->get_function_values(
519 this_fe_patch_values,
521 ComponentExtractor::imaginary_part,
524 for (
unsigned int i = 0;
526 .solution_values.size();
529 for (
unsigned int j = 0; j < n_components;
532 .solution_values[i][j + n_components] =
540 std::vector<std::vector<Tensor<1, spacedim>>> tmp(
542 .solution_gradients.size(),
546 dataset->get_function_gradients(
547 this_fe_patch_values,
549 ComponentExtractor::real_part,
552 for (
unsigned int i = 0;
554 .solution_gradients.size();
559 .solution_gradients[i]
562 for (
unsigned int j = 0; j < n_components;
565 .solution_gradients[i][j] = tmp[i][j];
569 dataset->get_function_gradients(
570 this_fe_patch_values,
572 ComponentExtractor::imaginary_part,
575 for (
unsigned int i = 0;
577 .solution_gradients.size();
580 for (
unsigned int j = 0; j < n_components;
583 .solution_gradients[i][j + n_components] =
591 std::vector<std::vector<Tensor<2, spacedim>>> tmp(
593 .solution_gradients.size(),
597 dataset->get_function_hessians(
598 this_fe_patch_values,
600 ComponentExtractor::real_part,
603 for (
unsigned int i = 0;
605 .solution_hessians.size();
610 .solution_hessians[i]
613 for (
unsigned int j = 0; j < n_components;
616 .solution_hessians[i][j] = tmp[i][j];
620 dataset->get_function_hessians(
621 this_fe_patch_values,
623 ComponentExtractor::imaginary_part,
626 for (
unsigned int i = 0;
628 .solution_hessians.size();
631 for (
unsigned int j = 0; j < n_components;
634 .solution_hessians[i][j + n_components] =
647 dh_cell(&cell_and_index->first->get_triangulation(),
648 cell_and_index->first->level(),
649 cell_and_index->first->index(),
650 dataset->dof_handler);
666 for (
unsigned int q = 0; q < n_q_points; ++q)
667 for (
unsigned int component = 0;
668 component < dataset->n_output_variables;
670 patch.
data(offset + component, q) =
676 offset += dataset->n_output_variables;
683 if (n_components == 1)
685 Assert(dataset->n_output_variables == 1, ExcInternalError());
688 dataset->get_function_values(
689 this_fe_patch_values,
693 for (
unsigned int q = 0; q < n_q_points; ++q)
694 patch.
data(offset, q) =
703 if (dataset->is_complex_valued() ==
true)
705 dataset->get_function_values(
706 this_fe_patch_values,
710 for (
unsigned int q = 0; q < n_q_points; ++q)
711 patch.
data(offset, q) =
725 if (dataset->is_complex_valued() ==
false)
727 dataset->get_function_values(
728 this_fe_patch_values,
732 for (
unsigned int component = 0; component < n_components;
734 for (
unsigned int q = 0; q < n_q_points; ++q)
735 patch.
data(offset + component, q) =
740 offset += dataset->n_output_variables;
772 dataset->get_function_values(
773 this_fe_patch_values,
782 Assert(dataset->data_component_interpretation.size() ==
786 unsigned int destination = offset;
787 for (
unsigned int component = 0;
788 component < n_components;
792 dataset->data_component_interpretation[component])
794 case DataComponentInterpretation::
805 for (
unsigned int q = 0; q < n_q_points;
807 patch.
data(destination, q) =
809 .solution_values[q](component);
817 case DataComponentInterpretation::
818 component_is_part_of_vector:
831 const unsigned int size = spacedim;
832 for (
unsigned int c = 0; c < size; ++c)
833 for (
unsigned int q = 0; q < n_q_points;
835 patch.
data(destination + c, q) =
837 .solution_values[q](component + c);
840 destination += 2 * size;
845 case DataComponentInterpretation::
846 component_is_part_of_tensor:
849 const unsigned int size =
851 for (
unsigned int c = 0; c < size; ++c)
852 for (
unsigned int q = 0; q < n_q_points;
854 patch.
data(destination + c, q) =
856 .solution_values[q](component + c);
859 destination += 2 * size;
873 dataset->get_function_values(
874 this_fe_patch_values,
879 unsigned int destination = offset;
880 for (
unsigned int component = 0;
881 component < n_components;
885 dataset->data_component_interpretation[component])
887 case DataComponentInterpretation::
894 for (
unsigned int q = 0; q < n_q_points;
896 patch.
data(destination + 1, q) =
898 .solution_values[q](component);
906 case DataComponentInterpretation::
907 component_is_part_of_vector:
914 const unsigned int size = spacedim;
915 for (
unsigned int c = 0; c < size; ++c)
916 for (
unsigned int q = 0; q < n_q_points;
918 patch.
data(destination + size + c, q) =
920 .solution_values[q](component + c);
923 destination += 2 * size;
928 case DataComponentInterpretation::
929 component_is_part_of_tensor:
932 const unsigned int size =
934 for (
unsigned int c = 0; c < size; ++c)
935 for (
unsigned int q = 0; q < n_q_points;
937 patch.
data(destination + size + c, q) =
939 .solution_values[q](component + c);
942 destination += 2 * size;
957 offset += dataset->n_output_variables * 2;
969 if (this->cell_data.size() != 0)
971 Assert(!cell_and_index->first->has_children(), ExcNotImplemented());
973 for (
const auto &dataset : this->cell_data)
978 dataset->get_cell_data_value(cell_and_index->second,
980 ComponentExtractor::real_part);
981 for (
unsigned int q = 0; q < n_q_points; ++q)
986 if (dataset->is_complex_valued() ==
true)
988 const double value = dataset->get_cell_data_value(
989 cell_and_index->second,
992 for (
unsigned int q = 0; q < n_q_points; ++q)
996 offset += (dataset->is_complex_valued() ? 2 : 1);
1002 for (
const unsigned int f : cell_and_index->first->face_indices())
1014 if (cell_and_index->first->at_boundary(f) ||
1015 (cell_and_index->first->neighbor(f)->level() !=
1016 cell_and_index->first->level()))
1022 const cell_iterator neighbor = cell_and_index->first->neighbor(f);
1023 Assert(
static_cast<unsigned int>(neighbor->level()) <
1025 ExcInternalError());
1026 if ((
static_cast<unsigned int>(neighbor->index()) >=
1029 [neighbor->index()] ==
1043 const unsigned int patch_idx =
1045 [cell_and_index->first->index()];
1047 Assert(patch_idx < this->patches.size(), ExcInternalError());
1053 this->patches[patch_idx].swap(patch);
1089 const unsigned int n_subdivisions_,
1093 Assert(dim == dim, ExcDimensionMismatch(dim, dim));
1096 Exceptions::DataOutImplementation::ExcNoTriangulationSelected());
1098 const unsigned int n_subdivisions =
1100 Assert(n_subdivisions >= 1,
1101 Exceptions::DataOutImplementation::ExcInvalidNumberOfSubdivisions(
1122 std::vector<std::vector<unsigned int>> cell_to_patch_index_map;
1123 cell_to_patch_index_map.resize(this->
triangulation->n_levels());
1124 for (
unsigned int l = 0; l < this->
triangulation->n_levels(); ++l)
1127 unsigned int max_index = 0;
1131 if (
static_cast<unsigned int>(cell->level()) == l)
1133 std::max(max_index,
static_cast<unsigned int>(cell->index()));
1135 cell_to_patch_index_map[l].resize(
1140 std::vector<std::pair<cell_iterator, unsigned int>> all_cells;
1148 unsigned int active_index = 0;
1155 while (active_cell != this->
triangulation->end() && cell->is_active() &&
1156 decltype(active_cell)(cell) != active_cell)
1162 Assert(
static_cast<unsigned int>(cell->level()) <
1163 cell_to_patch_index_map.size(),
1164 ExcInternalError());
1165 Assert(
static_cast<unsigned int>(cell->index()) <
1166 cell_to_patch_index_map[cell->level()].size(),
1167 ExcInternalError());
1169 ExcInternalError());
1170 cell_to_patch_index_map[cell->level()][cell->index()] =
1173 all_cells.emplace_back(cell, active_index);
1178 this->
patches.resize(all_cells.size());
1186 unsigned int n_datasets = 0;
1187 for (
unsigned int i = 0; i < this->cell_data.size(); ++i)
1188 n_datasets += (this->cell_data[i]->is_complex_valued() &&
1189 (this->cell_data[i]->postprocessor ==
nullptr) ?
1192 for (
unsigned int i = 0; i < this->dof_data.size(); ++i)
1193 n_datasets += (this->dof_data[i]->n_output_variables *
1194 (this->dof_data[i]->is_complex_valued() &&
1195 (this->dof_data[i]->postprocessor ==
nullptr) ?
1199 std::vector<unsigned int> n_postprocessor_outputs(this->dof_data.size());
1200 for (
unsigned int dataset = 0; dataset < this->dof_data.size(); ++dataset)
1201 if (this->dof_data[dataset]->postprocessor)
1202 n_postprocessor_outputs[dataset] =
1203 this->dof_data[dataset]->n_output_variables;
1205 n_postprocessor_outputs[dataset] = 0;
1214 for (
unsigned int i = 0; i < this->dof_data.size(); ++i)
1215 if (this->dof_data[i]->postprocessor)
1217 this->dof_data[i]->postprocessor->get_needed_update_flags();
1223 "The update of normal vectors may not be requested for evaluation of "
1224 "data on cells via DataPostprocessor."));
1229 n_postprocessor_outputs,
1233 cell_to_patch_index_map);
1235 auto worker = [
this, n_subdivisions, curved_cell_region](
1236 const std::pair<cell_iterator, unsigned int> *cell_and_index,
1245 curved_cell_region);
1249 if (all_cells.size() > 0)
1251 all_cells.data() + all_cells.size(),
1254 std::function<
void(
const int)>(),