17 #include <deal.II/lac/block_vector.h> 18 #include <deal.II/lac/la_parallel_block_vector.h> 19 #include <deal.II/lac/la_parallel_vector.h> 20 #include <deal.II/lac/la_vector.h> 21 #include <deal.II/lac/petsc_block_vector.h> 22 #include <deal.II/lac/petsc_vector.h> 23 #include <deal.II/lac/trilinos_parallel_block_vector.h> 24 #include <deal.II/lac/trilinos_vector.h> 25 #include <deal.II/lac/vector.h> 26 #include <deal.II/lac/vector_element_access.h> 28 #include <deal.II/numerics/point_value_history.h> 29 #include <deal.II/numerics/vector_tools.h> 34 DEAL_II_NAMESPACE_OPEN
39 namespace PointValueHistoryImplementation
46 const std::vector<types::global_dof_index> &new_sol_indices)
48 requested_location = new_requested_location;
49 support_point_locations = new_locations;
50 solution_indices = new_sol_indices;
59 const unsigned int n_independent_variables)
60 : n_indep(n_independent_variables)
72 std::vector<std::vector<double>>(
n_indep, std::vector<double>(0));
81 const unsigned int n_independent_variables)
82 : dof_handler(&dof_handler)
83 , n_indep(n_independent_variables)
95 std::vector<std::vector<double>>(
n_indep, std::vector<double>(0));
116 closed = point_value_history.
closed;
117 cleared = point_value_history.
cleared;
123 n_indep = point_value_history.
n_indep;
127 if (have_dof_handler)
130 dof_handler->get_triangulation().signals.any_change.connect(
150 closed = point_value_history.
closed;
151 cleared = point_value_history.
cleared;
157 n_indep = point_value_history.
n_indep;
161 if (have_dof_handler)
164 dof_handler->get_triangulation().signals.any_change.connect(
177 if (have_dof_handler)
179 tria_listener.disconnect();
193 AssertThrow(have_dof_handler, ExcDoFHandlerRequired());
194 AssertThrow(!triangulation_changed, ExcDoFHandlerChanged());
206 dof_handler->get_fe().get_unit_support_points());
208 support_point_quadrature,
210 unsigned int n_support_points =
211 dof_handler->
get_fe().get_unit_support_points().size();
212 unsigned int n_components = dof_handler->get_fe(0).n_components();
225 std::vector<unsigned int> current_fe_index(
n_components,
227 fe_values.reinit(cell);
229 for (
unsigned int support_point = 0; support_point < n_support_points;
234 unsigned int component =
235 dof_handler->get_fe().system_to_component_index(support_point).first;
236 current_points[component] = fe_values.quadrature_point(support_point);
237 current_fe_index[component] = support_point;
250 for (; cell != endc; cell++)
252 fe_values.reinit(cell);
254 for (
unsigned int support_point = 0; support_point < n_support_points;
257 unsigned int component = dof_handler->get_fe()
258 .system_to_component_index(support_point)
260 Point<dim> test_point = fe_values.quadrature_point(support_point);
263 location.
distance(current_points[component]))
266 current_points[component] = test_point;
268 current_fe_index[component] = support_point;
274 std::vector<types::global_dof_index> local_dof_indices(
275 dof_handler->get_fe().dofs_per_cell);
276 std::vector<types::global_dof_index> new_solution_indices;
277 current_cell->get_dof_indices(local_dof_indices);
297 for (
unsigned int component = 0;
298 component < dof_handler->get_fe(0).n_components();
301 new_solution_indices.push_back(
302 local_dof_indices[current_fe_index[component]]);
306 new_point_geometry_data(location, current_points, new_solution_indices);
307 point_geometry_data.push_back(new_point_geometry_data);
309 std::map<std::string, std::vector<std::vector<double>>>::iterator
310 data_store_begin = data_store.begin();
311 for (; data_store_begin != data_store.end(); ++data_store_begin)
316 (component_mask.find(data_store_begin->first))->second;
318 data_store_begin->second.resize(data_store_begin->second.size() +
337 AssertThrow(have_dof_handler, ExcDoFHandlerRequired());
338 AssertThrow(!triangulation_changed, ExcDoFHandlerChanged());
351 dof_handler->get_fe().get_unit_support_points());
353 support_point_quadrature,
355 unsigned int n_support_points =
356 dof_handler->
get_fe().get_unit_support_points().size();
357 unsigned int n_components = dof_handler->get_fe(0).n_components();
372 std::vector<typename DoFHandler<dim>::active_cell_iterator> current_cell(
373 locations.size(), cell);
375 fe_values.reinit(cell);
377 std::vector<unsigned int> temp_fe_index(
n_components, 0);
378 for (
unsigned int support_point = 0; support_point < n_support_points;
383 unsigned int component =
384 dof_handler->get_fe().system_to_component_index(support_point).first;
385 temp_points[component] = fe_values.quadrature_point(support_point);
386 temp_fe_index[component] = support_point;
388 std::vector<std::vector<Point<dim>>> current_points(
389 locations.size(), temp_points);
390 std::vector<std::vector<unsigned int>> current_fe_index(locations.size(),
402 for (; cell != endc; cell++)
404 fe_values.reinit(cell);
405 for (
unsigned int support_point = 0; support_point < n_support_points;
408 unsigned int component = dof_handler->get_fe()
409 .system_to_component_index(support_point)
411 Point<dim> test_point = fe_values.quadrature_point(support_point);
413 for (
unsigned int point = 0; point < locations.size(); point++)
415 if (locations[point].distance(test_point) <
416 locations[point].distance(current_points[point][component]))
419 current_points[point][component] = test_point;
420 current_cell[point] = cell;
421 current_fe_index[point][component] = support_point;
427 std::vector<types::global_dof_index> local_dof_indices(
428 dof_handler->get_fe().dofs_per_cell);
429 for (
unsigned int point = 0; point < locations.size(); point++)
431 current_cell[point]->get_dof_indices(local_dof_indices);
432 std::vector<types::global_dof_index> new_solution_indices;
434 for (
unsigned int component = 0;
435 component < dof_handler->get_fe(0).n_components();
438 new_solution_indices.push_back(
439 local_dof_indices[current_fe_index[point][component]]);
443 new_point_geometry_data(locations[point],
444 current_points[point],
445 new_solution_indices);
447 point_geometry_data.push_back(new_point_geometry_data);
449 std::map<std::string, std::vector<std::vector<double>>>::iterator
450 data_store_begin = data_store.begin();
451 for (; data_store_begin != data_store.end(); ++data_store_begin)
456 (component_mask.find(data_store_begin->first))->second;
458 data_store_begin->second.resize(data_store_begin->second.size() +
475 AssertThrow(have_dof_handler, ExcDoFHandlerRequired());
476 AssertThrow(!triangulation_changed, ExcDoFHandlerChanged());
480 component_mask.insert(std::make_pair(vector_name, mask));
482 component_mask.insert(
483 std::make_pair(vector_name,
485 dof_handler->get_fe(0).n_components(),
true))));
490 std::pair<std::string, std::vector<std::string>> empty_names(
491 vector_name, std::vector<std::string>());
492 component_names_map.insert(empty_names);
496 std::pair<std::string, std::vector<std::vector<double>>> pair_data;
497 pair_data.first = vector_name;
498 const unsigned int n_stored =
501 dof_handler->get_fe(0).n_components());
504 point_geometry_data.size() * n_stored;
505 std::vector<std::vector<double>> vector_size(n_datastreams,
506 std::vector<double>(0));
507 pair_data.second = vector_size;
508 data_store.insert(pair_data);
518 add_field_name(vector_name, temp_mask);
525 const std::string & vector_name,
526 const std::vector<std::string> &component_names)
528 typename std::map<std::string, std::vector<std::string>>::iterator names =
529 component_names_map.find(vector_name);
530 Assert(names != component_names_map.end(),
533 typename std::map<std::string, ComponentMask>::iterator mask =
534 component_mask.find(vector_name);
535 Assert(mask != component_mask.end(),
ExcMessage(
"vector_name not in class"));
536 unsigned int n_stored = mask->second.n_selected_components();
538 Assert(component_names.size() == n_stored,
541 names->second = component_names;
548 const std::vector<std::string> &independent_names)
550 Assert(independent_names.size() == n_indep,
553 indep_names = independent_names;
571 dof_handler =
nullptr;
572 have_dof_handler =
false;
588 template <
typename VectorType>
591 const VectorType & solution)
597 AssertThrow(have_dof_handler, ExcDoFHandlerRequired());
598 AssertThrow(!triangulation_changed, ExcDoFHandlerChanged());
603 Assert(std::abs(static_cast<int>(dataset_key.size()) -
604 static_cast<int>(independent_values[0].size())) < 2,
612 typename std::map<std::string, std::vector<std::vector<double>>>::iterator
613 data_store_field = data_store.find(vector_name);
614 Assert(data_store_field != data_store.end(),
617 typename std::map<std::string, ComponentMask>::iterator mask =
618 component_mask.find(vector_name);
619 Assert(mask != component_mask.end(),
ExcMessage(
"vector_name not in class"));
621 unsigned int n_stored =
622 mask->second.n_selected_components(dof_handler->get_fe(0).n_components());
624 typename std::vector<
626 point = point_geometry_data.begin();
627 for (
unsigned int data_store_index = 0; point != point_geometry_data.end();
628 ++point, ++data_store_index)
635 for (
unsigned int store_index = 0, comp = 0;
636 comp < dof_handler->get_fe(0).n_components();
639 if (mask->second[comp])
641 unsigned int solution_index = point->solution_indices[comp];
643 ->second[data_store_index * n_stored + store_index]
645 internal::ElementAccess<VectorType>::get(solution,
656 template <
typename VectorType>
659 const std::vector<std::string> &vector_names,
660 const VectorType & solution,
668 AssertThrow(have_dof_handler, ExcDoFHandlerRequired());
672 Assert(std::abs(static_cast<int>(dataset_key.size()) -
673 static_cast<int>(independent_values[0].size())) < 2,
683 "The update of normal vectors may not be requested for evaluation of " 684 "data on cells via DataPostprocessor."));
685 FEValues<dim> fe_values(dof_handler->get_fe(), quadrature, update_flags);
686 unsigned int n_components = dof_handler->get_fe(0).n_components();
687 unsigned int n_quadrature_points = quadrature.
size();
689 unsigned int n_output_variables = data_postprocessor.
get_names().size();
694 std::vector<typename VectorType::value_type> scalar_solution_values(
695 n_quadrature_points);
696 std::vector<Tensor<1, dim, typename VectorType::value_type>>
697 scalar_solution_gradients(n_quadrature_points);
698 std::vector<Tensor<2, dim, typename VectorType::value_type>>
699 scalar_solution_hessians(n_quadrature_points);
701 std::vector<Vector<typename VectorType::value_type>> vector_solution_values(
704 std::vector<std::vector<Tensor<1, dim, typename VectorType::value_type>>>
705 vector_solution_gradients(
710 std::vector<std::vector<Tensor<2, dim, typename VectorType::value_type>>>
711 vector_solution_hessians(
717 typename std::vector<
719 point = point_geometry_data.begin();
720 for (
unsigned int data_store_index = 0; point != point_geometry_data.end();
721 ++point, ++data_store_index)
724 const Point<dim> requested_location = point->requested_location;
732 fe_values.reinit(cell);
733 std::vector<Vector<double>> computed_quantities(
737 std::vector<Point<dim>> quadrature_points =
738 fe_values.get_quadrature_points();
739 double distance = cell->diameter();
740 unsigned int selected_point = 0;
741 for (
unsigned int q_point = 0; q_point < n_quadrature_points; q_point++)
743 if (requested_location.
distance(quadrature_points[q_point]) <
746 selected_point = q_point;
748 requested_location.
distance(quadrature_points[q_point]);
770 fe_values.get_function_values(solution, scalar_solution_values);
772 std::vector<double>(1, scalar_solution_values[selected_point]);
776 fe_values.get_function_gradients(solution,
777 scalar_solution_gradients);
779 std::vector<Tensor<1, dim>>(
780 1, scalar_solution_gradients[selected_point]);
784 fe_values.get_function_hessians(solution,
785 scalar_solution_hessians);
787 std::vector<Tensor<2, dim>>(
788 1, scalar_solution_hessians[selected_point]);
793 std::vector<Point<dim>>(1, quadrature_points[selected_point]);
797 computed_quantities);
806 fe_values.get_function_values(solution, vector_solution_values);
809 std::copy(vector_solution_values[selected_point].begin(),
810 vector_solution_values[selected_point].end(),
815 fe_values.get_function_gradients(solution,
816 vector_solution_gradients);
819 std::copy(vector_solution_gradients[selected_point].begin(),
820 vector_solution_gradients[selected_point].end(),
825 fe_values.get_function_hessians(solution,
826 vector_solution_hessians);
829 std::copy(vector_solution_hessians[selected_point].begin(),
830 vector_solution_hessians[selected_point].end(),
835 std::vector<Point<dim>>(1, quadrature_points[selected_point]);
838 computed_quantities);
844 typename std::vector<std::string>::const_iterator name =
845 vector_names.begin();
846 for (; name != vector_names.end(); ++name)
848 typename std::map<std::string,
849 std::vector<std::vector<double>>>::iterator
850 data_store_field = data_store.find(*name);
851 Assert(data_store_field != data_store.end(),
854 typename std::map<std::string, ComponentMask>::iterator mask =
855 component_mask.find(*name);
856 Assert(mask != component_mask.end(),
859 unsigned int n_stored =
860 mask->second.n_selected_components(n_output_variables);
864 for (
unsigned int store_index = 0, comp = 0;
865 comp < n_output_variables;
868 if (mask->second[comp])
871 ->second[data_store_index * n_stored + store_index]
872 .push_back(computed_quantities[0](comp));
883 template <
typename VectorType>
886 const std::string & vector_name,
887 const VectorType & solution,
891 std::vector<std::string> vector_names;
892 vector_names.push_back(vector_name);
893 evaluate_field(vector_names, solution, data_postprocessor, quadrature);
899 template <
typename VectorType>
902 const std::string &vector_name,
903 const VectorType & solution)
905 using number =
typename VectorType::value_type;
910 AssertThrow(have_dof_handler, ExcDoFHandlerRequired());
915 Assert(std::abs(static_cast<int>(dataset_key.size()) -
916 static_cast<int>(independent_values[0].size())) < 2,
924 typename std::map<std::string, std::vector<std::vector<double>>>::iterator
925 data_store_field = data_store.find(vector_name);
926 Assert(data_store_field != data_store.end(),
929 typename std::map<std::string, ComponentMask>::iterator mask =
930 component_mask.find(vector_name);
931 Assert(mask != component_mask.end(),
ExcMessage(
"vector_name not in class"));
933 unsigned int n_stored =
934 mask->second.n_selected_components(dof_handler->get_fe(0).n_components());
936 typename std::vector<
938 point = point_geometry_data.begin();
940 for (
unsigned int data_store_index = 0; point != point_geometry_data.end();
941 ++point, ++data_store_index)
948 point->requested_location,
953 for (
unsigned int store_index = 0, comp = 0; comp < mask->second.size();
956 if (mask->second[comp])
959 ->second[data_store_index * n_stored + store_index]
960 .push_back(value(comp));
976 Assert(deep_check(
false), ExcDataLostSync());
978 dataset_key.push_back(key);
986 const std::vector<double> &indep_values)
992 Assert(indep_values.size() == n_indep,
994 Assert(n_indep != 0, ExcNoIndependent());
995 Assert(std::abs(static_cast<int>(dataset_key.size()) -
996 static_cast<int>(independent_values[0].size())) < 2,
999 for (
unsigned int component = 0; component < n_indep; component++)
1000 independent_values[component].push_back(indep_values[component]);
1008 const std::string & base_name,
1009 const std::vector<
Point<dim>> &postprocessor_locations)
1018 std::string filename = base_name +
"_indep.gpl";
1019 std::ofstream to_gnuplot(filename.c_str());
1021 to_gnuplot <<
"# Data independent of mesh location\n";
1024 to_gnuplot <<
"# <Key> ";
1026 if (indep_names.size() > 0)
1028 for (
unsigned int name = 0; name < indep_names.size(); name++)
1030 to_gnuplot <<
"<" << indep_names[name] <<
"> ";
1036 for (
unsigned int component = 0; component < n_indep; component++)
1038 to_gnuplot <<
"<Indep_" << component <<
"> ";
1043 for (
unsigned int key = 0; key < dataset_key.size(); key++)
1045 to_gnuplot << dataset_key[key];
1047 for (
unsigned int component = 0; component < n_indep; component++)
1049 to_gnuplot <<
" " << independent_values[component][key];
1060 if (have_dof_handler)
1062 AssertThrow(have_dof_handler, ExcDoFHandlerRequired());
1063 AssertThrow(postprocessor_locations.size() == 0 ||
1064 postprocessor_locations.size() ==
1065 point_geometry_data.size(),
1067 point_geometry_data.size()));
1082 typename std::vector<internal::PointValueHistoryImplementation::
1083 PointGeometryData<dim>>::iterator point =
1084 point_geometry_data.begin();
1085 for (
unsigned int data_store_index = 0;
1086 point != point_geometry_data.end();
1087 ++point, ++data_store_index)
1091 std::string filename = base_name +
"_" +
1098 std::ofstream to_gnuplot(filename.c_str());
1103 to_gnuplot <<
"# Requested location: " << point->requested_location
1105 to_gnuplot <<
"# DoF_index : Support location (for each component)\n";
1106 for (
unsigned int component = 0;
1107 component < dof_handler->get_fe(0).n_components();
1110 to_gnuplot <<
"# " << point->solution_indices[component] <<
" : " 1111 << point->support_point_locations[component] <<
"\n";
1113 if (triangulation_changed)
1115 <<
"# (Original components and locations, may be invalidated by mesh change.)\n";
1117 if (postprocessor_locations.size() != 0)
1119 to_gnuplot <<
"# Postprocessor location: " 1120 << postprocessor_locations[data_store_index];
1121 if (triangulation_changed)
1122 to_gnuplot <<
" (may be approximate)\n";
1124 to_gnuplot <<
"#\n";
1128 to_gnuplot <<
"# <Key> ";
1130 if (indep_names.size() > 0)
1132 for (
unsigned int name = 0; name < indep_names.size(); name++)
1134 to_gnuplot <<
"<" << indep_names[name] <<
"> ";
1139 for (
unsigned int component = 0; component < n_indep; component++)
1141 to_gnuplot <<
"<Indep_" << component <<
"> ";
1145 for (std::map<std::string, std::vector<std::vector<double>>>::iterator
1146 data_store_begin = data_store.begin();
1147 data_store_begin != data_store.end();
1150 typename std::map<std::string, ComponentMask>::iterator mask =
1151 component_mask.find(data_store_begin->first);
1152 unsigned int n_stored = mask->second.n_selected_components();
1153 std::vector<std::string> names =
1154 (component_names_map.find(data_store_begin->first))->second;
1156 if (names.size() > 0)
1160 for (
const auto &name : names)
1162 to_gnuplot <<
"<" << name <<
"> ";
1167 for (
unsigned int component = 0; component < n_stored;
1170 to_gnuplot <<
"<" << data_store_begin->first <<
"_" 1171 << component <<
"> ";
1178 for (
unsigned int key = 0; key < dataset_key.size(); key++)
1180 to_gnuplot << dataset_key[key];
1182 for (
unsigned int component = 0; component < n_indep; component++)
1184 to_gnuplot <<
" " << independent_values[component][key];
1187 for (std::map<std::string,
1188 std::vector<std::vector<double>>>::iterator
1189 data_store_begin = data_store.begin();
1190 data_store_begin != data_store.end();
1193 typename std::map<std::string, ComponentMask>::iterator mask =
1194 component_mask.find(data_store_begin->first);
1195 unsigned int n_stored = mask->second.n_selected_components();
1197 for (
unsigned int component = 0; component < n_stored;
1202 << (data_store_begin
1203 ->second)[data_store_index * n_stored + component]
1224 AssertThrow(have_dof_handler, ExcDoFHandlerRequired());
1225 AssertThrow(!triangulation_changed, ExcDoFHandlerChanged());
1229 typename std::vector<
1231 point = point_geometry_data.begin();
1232 for (; point != point_geometry_data.end(); ++point)
1234 for (
unsigned int component = 0;
1235 component < dof_handler->get_fe(0).n_components();
1238 dof_vector(point->solution_indices[component]) = 1;
1248 std::vector<std::vector<
Point<dim>>> &locations)
1251 AssertThrow(have_dof_handler, ExcDoFHandlerRequired());
1252 AssertThrow(!triangulation_changed, ExcDoFHandlerChanged());
1254 std::vector<std::vector<Point<dim>>> actual_points;
1255 typename std::vector<
1257 point = point_geometry_data.begin();
1259 for (; point != point_geometry_data.end(); ++point)
1261 actual_points.push_back(point->support_point_locations);
1263 locations = actual_points;
1270 std::vector<std::vector<
Point<dim>>> &locations)
1272 get_support_locations(locations);
1283 AssertThrow(have_dof_handler, ExcDoFHandlerRequired());
1285 locations = std::vector<Point<dim>>();
1290 unsigned int n_quadrature_points = quadrature.
size();
1291 std::vector<Point<dim>> evaluation_points;
1294 typename std::vector<
1296 point = point_geometry_data.begin();
1297 for (
unsigned int data_store_index = 0; point != point_geometry_data.end();
1298 ++point, ++data_store_index)
1302 Point<dim> requested_location = point->requested_location;
1308 fe_values.reinit(cell);
1310 evaluation_points = fe_values.get_quadrature_points();
1311 double distance = cell->diameter();
1312 unsigned int selected_point = 0;
1314 for (
unsigned int q_point = 0; q_point < n_quadrature_points; q_point++)
1316 if (requested_location.
distance(evaluation_points[q_point]) <
1319 selected_point = q_point;
1321 requested_location.
distance(evaluation_points[q_point]);
1325 locations.push_back(evaluation_points[selected_point]);
1334 out <<
"***PointValueHistory status output***\n\n";
1335 out <<
"Closed: " << closed <<
"\n";
1336 out <<
"Cleared: " << cleared <<
"\n";
1337 out <<
"Triangulation_changed: " << triangulation_changed <<
"\n";
1338 out <<
"Have_dof_handler: " << have_dof_handler <<
"\n";
1339 out <<
"Geometric Data" 1342 typename std::vector<
1344 point = point_geometry_data.begin();
1345 if (point == point_geometry_data.end())
1347 out <<
"No points stored currently\n";
1353 for (; point != point_geometry_data.end(); ++point)
1355 out <<
"# Requested location: " << point->requested_location
1357 out <<
"# DoF_index : Support location (for each component)\n";
1358 for (
unsigned int component = 0;
1359 component < dof_handler->get_fe(0).n_components();
1362 out << point->solution_indices[component] <<
" : " 1363 << point->support_point_locations[component] <<
"\n";
1370 out <<
"#Cannot access DoF_indices once cleared\n";
1375 if (independent_values.size() != 0)
1377 out <<
"Independent value(s): " << independent_values.size() <<
" : " 1378 << independent_values[0].size() <<
"\n";
1379 if (indep_names.size() > 0)
1382 for (
unsigned int name = 0; name < indep_names.size(); name++)
1384 out <<
"<" << indep_names[name] <<
"> ";
1391 out <<
"No independent values stored\n";
1394 std::map<std::string, std::vector<std::vector<double>>>::iterator
1395 data_store_begin = data_store.begin();
1396 if (data_store_begin != data_store.end())
1399 <<
"Mnemonic: data set size (mask size, n true components) : n data sets\n";
1401 for (; data_store_begin != data_store.end(); ++data_store_begin)
1404 std::string vector_name = data_store_begin->first;
1405 typename std::map<std::string, ComponentMask>::iterator mask =
1406 component_mask.find(vector_name);
1407 Assert(mask != component_mask.end(),
1409 typename std::map<std::string, std::vector<std::string>>::iterator
1410 component_names = component_names_map.find(vector_name);
1411 Assert(component_names != component_names_map.end(),
1414 if (data_store_begin->second.size() != 0)
1416 out << data_store_begin->first <<
": " 1417 << data_store_begin->second.size() <<
" (";
1418 out << mask->second.size() <<
", " 1419 << mask->second.n_selected_components() <<
") : ";
1420 out << (data_store_begin->second)[0].size() <<
"\n";
1424 out << data_store_begin->first <<
": " 1425 << data_store_begin->second.size() <<
" (";
1426 out << mask->second.size() <<
", " 1427 << mask->second.n_selected_components() <<
") : ";
1428 out <<
"No points added" 1432 if (component_names->second.size() > 0)
1434 for (
const auto &name : component_names->second)
1436 out <<
"<" << name <<
"> ";
1442 out <<
"***end of status output***\n\n";
1457 if (dataset_key.size() != independent_values[0].size())
1462 std::map<std::string, std::vector<std::vector<double>>>::iterator
1463 data_store_begin = data_store.begin();
1464 if (have_dof_handler)
1466 for (; data_store_begin != data_store.end(); ++data_store_begin)
1469 if ((data_store_begin->second)[0].size() != dataset_key.size())
1483 if (std::abs(static_cast<int>(dataset_key.size()) -
1484 static_cast<int>(independent_values[0].size())) >= 2)
1490 if (have_dof_handler)
1492 std::map<std::string, std::vector<std::vector<double>>>::iterator
1493 data_store_begin = data_store.begin();
1494 for (; data_store_begin != data_store.end(); ++data_store_begin)
1498 if (std::abs(static_cast<int>((data_store_begin->second)[0].size()) -
1499 static_cast<int>(dataset_key.size())) >= 2)
1528 triangulation_changed =
true;
1533 #include "point_value_history.inst" 1536 DEAL_II_NAMESPACE_CLOSE
std::vector< std::vector< double > > independent_values
PointValueHistory(const unsigned int n_independent_variables=0)
std::vector< std::vector< Tensor< 2, spacedim > > > solution_hessians
std::vector< internal::PointValueHistoryImplementation::PointGeometryData< dim > > point_geometry_data
std::vector< double > solution_values
void get_support_locations(std::vector< std::vector< Point< dim >>> &locations)
cell_iterator end() const
const FiniteElement< dim, spacedim > & get_fe() const
std::vector< double > dataset_key
bool represents_the_all_selected_mask() const
virtual void evaluate_vector_field(const DataPostprocessorInputs::Vector< dim > &input_data, std::vector< Vector< double >> &computed_quantities) const
Transformed quadrature points.
#define AssertThrow(cond, exc)
std::vector< std::string > indep_names
SmartPointer< const DoFHandler< dim >, PointValueHistory< dim > > dof_handler
active_cell_iterator begin_active(const unsigned int level=0) const
void add_component_names(const std::string &vector_name, const std::vector< std::string > &component_names)
void add_field_name(const std::string &vector_name, const ComponentMask &component_mask=ComponentMask())
boost::signals2::connection tria_listener
static ::ExceptionBase & ExcInvalidState()
static ::ExceptionBase & ExcMessage(std::string arg1)
#define Assert(cond, exc)
std::vector< std::vector< Tensor< 1, spacedim > > > solution_gradients
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
void evaluate_field_at_requested_location(const std::string &name, const VectorType &solution)
PointGeometryData(const Point< dim > &new_requested_location, const std::vector< Point< dim >> &new_locations, const std::vector< types::global_dof_index > &new_sol_indices)
Only a constructor needed for this class (a struct really)
void get_postprocessor_locations(const Quadrature< dim > &quadrature, std::vector< Point< dim >> &locations)
std::map< std::string, std::vector< std::vector< double > > > data_store
void evaluate_field(const std::string &name, const VectorType &solution)
void start_new_dataset(const double key)
PointValueHistory & operator=(const PointValueHistory &point_value_history)
std::vector< Tensor< 2, spacedim > > solution_hessians
Second derivatives of shape functions.
std::string int_to_string(const unsigned int value, const unsigned int digits=numbers::invalid_unsigned_int)
numbers::NumberTraits< Number >::real_type distance(const Point< dim, Number > &p) const
unsigned int size() const
std::vector< Tensor< 1, spacedim > > solution_gradients
void add_independent_names(const std::vector< std::string > &independent_names)
void tria_change_listener()
Vector< double > mark_support_locations()
bool deep_check(const bool strict)
std::vector< Point< spacedim > > evaluation_points
bool triangulation_changed
std::map< std::string, ComponentMask > component_mask
Shape function gradients.
virtual void evaluate_scalar_field(const DataPostprocessorInputs::Scalar< dim > &input_data, std::vector< Vector< double >> &computed_quantities) const
void write_gnuplot(const std::string &base_name, const std::vector< Point< dim >> &postprocessor_locations=std::vector< Point< dim >>())
void get_points(std::vector< std::vector< Point< dim >>> &locations)
unsigned int n_selected_components(const unsigned int overall_number_of_components=numbers::invalid_unsigned_int) const
void status(std::ostream &out)
static ::ExceptionBase & ExcNotImplemented()
unsigned int n_components(const DoFHandler< dim, spacedim > &dh)
void add_point(const Point< dim > &location)
std::map< std::string, std::vector< std::string > > component_names_map
void add_points(const std::vector< Point< dim >> &locations)
virtual std::vector< std::string > get_names() const =0
std::vector<::Vector< double > > solution_values
static ::ExceptionBase & ExcInternalError()
virtual UpdateFlags get_needed_update_flags() const =0
void push_back_independent(const std::vector< double > &independent_values)