102 const unsigned int face_number = cell_and_face->second;
114 for (
const unsigned int vertex : cell->face(face_number)->vertex_indices())
116 const Point<dim> vertex_reference_coordinates =
117 cell->reference_cell().template vertex<dim>(
118 cell->reference_cell().face_to_cell_vertices(
119 face_number, vertex, cell->combined_face_orientation(face_number)));
122 data.mapping_collection[0].transform_unit_to_real_cell(
123 cell, vertex_reference_coordinates);
125 patch.
vertices[vertex] = vertex_real_coordinates;
129 if (
data.n_datasets > 0)
131 data.reinit_all_fe_values(this->dof_data, cell, face_number);
138 const std::vector<Point<dim>> &q_points =
142 patch.
data.reinit(
data.n_datasets + dim, q_points.size());
147 for (
unsigned int i = 0; i < dim; ++i)
148 for (
unsigned int q = 0; q < n_q_points; ++q)
149 patch.
data(patch.
data.size(0) - dim + i, q) = q_points[q][i];
152 unsigned int offset = 0;
155 for (
unsigned int dataset = 0; dataset < this->dof_data.size(); ++dataset)
158 data.get_present_fe_values(dataset);
159 const unsigned int n_components =
162 this->dof_data[dataset]->postprocessor;
163 if (postprocessor !=
nullptr)
170 if (n_components == 1)
175 this->dof_data[dataset]->get_function_values(
176 this_fe_patch_values,
179 data.patch_values_scalar.solution_values);
181 this->dof_data[dataset]->get_function_gradients(
182 this_fe_patch_values,
185 data.patch_values_scalar.solution_gradients);
187 this->dof_data[dataset]->get_function_hessians(
188 this_fe_patch_values,
191 data.patch_values_scalar.solution_hessians);
194 data.patch_values_scalar.evaluation_points =
198 data.patch_values_scalar.normals =
202 dh_cell(&cell->get_triangulation(),
205 this->dof_data[dataset]->dof_handler);
206 data.patch_values_scalar.template set_cell_and_face<dim>(
207 dh_cell, face_number);
210 data.patch_values_scalar,
211 data.postprocessed_values[dataset]);
217 data.resize_system_vectors(n_components);
219 this->dof_data[dataset]->get_function_values(
220 this_fe_patch_values,
223 data.patch_values_system.solution_values);
225 this->dof_data[dataset]->get_function_gradients(
226 this_fe_patch_values,
229 data.patch_values_system.solution_gradients);
231 this->dof_data[dataset]->get_function_hessians(
232 this_fe_patch_values,
235 data.patch_values_system.solution_hessians);
238 data.patch_values_system.evaluation_points =
242 data.patch_values_system.normals =
246 dh_cell(&cell->get_triangulation(),
249 this->dof_data[dataset]->dof_handler);
250 data.patch_values_system.template set_cell_and_face<dim>(
251 dh_cell, face_number);
254 data.patch_values_system,
255 data.postprocessed_values[dataset]);
258 for (
unsigned int q = 0; q < n_q_points; ++q)
259 for (
unsigned int component = 0;
260 component < this->dof_data[dataset]->n_output_variables;
262 patch.
data(offset + component, q) =
263 data.postprocessed_values[dataset][q](component);
269 if (n_components == 1)
271 this->dof_data[dataset]->get_function_values(
272 this_fe_patch_values,
275 data.patch_values_scalar.solution_values);
276 for (
unsigned int q = 0; q < n_q_points; ++q)
277 patch.
data(offset, q) =
278 data.patch_values_scalar.solution_values[q];
282 data.resize_system_vectors(n_components);
283 this->dof_data[dataset]->get_function_values(
284 this_fe_patch_values,
287 data.patch_values_system.solution_values);
288 for (
unsigned int component = 0; component < n_components;
290 for (
unsigned int q = 0; q < n_q_points; ++q)
291 patch.
data(offset + component, q) =
292 data.patch_values_system.solution_values[q](component);
295 offset += this->dof_data[dataset]->n_output_variables;
299 for (
unsigned int dataset = 0; dataset < this->cell_data.size();
308 "The current function is trying to generate cell-data output "
309 "for a face that does not belong to an active cell. This is "
311 const unsigned int cell_number = std::distance(
315 const double value = this->cell_data[dataset]->get_cell_data_value(
318 for (
unsigned int q = 0; q < n_q_points; ++q)
319 patch.
data(dataset + offset, q) = value;
347 const unsigned int n_subdivisions_)
349 const unsigned int n_subdivisions =
350 (n_subdivisions_ != 0) ? n_subdivisions_ : this->default_subdivisions;
352 Assert(n_subdivisions >= 1,
359 this->validate_dataset_names();
361 unsigned int n_datasets = this->cell_data.size();
362 for (
unsigned int i = 0; i < this->dof_data.size(); ++i)
363 n_datasets += this->dof_data[i]->n_output_variables;
369 std::vector<FaceDescriptor> all_faces;
373 face = next_face(face))
374 all_faces.push_back(face);
377 this->patches.clear();
378 this->patches.reserve(all_faces.size());
382 std::vector<unsigned int> n_postprocessor_outputs(this->dof_data.size());
383 for (
unsigned int dataset = 0; dataset < this->dof_data.size(); ++dataset)
384 if (this->dof_data[dataset]->postprocessor)
385 n_postprocessor_outputs[dataset] =
386 this->dof_data[dataset]->n_output_variables;
388 n_postprocessor_outputs[dataset] = 0;
391 for (
unsigned int i = 0; i < this->dof_data.size(); ++i)
392 if (this->dof_data[i]->postprocessor)
394 this->dof_data[i]->postprocessor->get_needed_update_flags();
400 n_postprocessor_outputs,
410 all_faces.data() + all_faces.size(),
415 this->build_one_patch(cell_and_face, data, patch);
418 internal::DataOutFacesImplementation::append_patch_to_list<dim, spacedim>(
419 patch, this->patches);
virtual UpdateFlags get_needed_update_flags() const =0
virtual void evaluate_vector_field(const DataPostprocessorInputs::Vector< dim > &input_data, std::vector< Vector< double > > &computed_quantities) const
virtual void evaluate_scalar_field(const DataPostprocessorInputs::Scalar< dim > &input_data, std::vector< Vector< double > > &computed_quantities) const