123 const unsigned int n_patches_per_circle =
data.n_patches_per_circle;
126 const unsigned int n_points =
data.n_subdivisions + 1;
133 for (
unsigned int i = 0; i <= n_patches_per_circle; ++i)
141 for (
unsigned int angle = 0; angle < n_patches_per_circle; ++angle)
150 const double r1 = (*cell)->vertex(0)[0],
151 r2 = (*cell)->vertex(1)[0];
152 Assert(
r1 >= 0, ExcRadialVariableHasNegativeValues(
r1));
153 Assert(
r2 >= 0, ExcRadialVariableHasNegativeValues(
r2));
165 for (
const unsigned int vertex :
171 Assert(v[0] >= 0, ExcRadialVariableHasNegativeValues(v[0]));
194 if (
data.n_datasets > 0)
196 unsigned int offset = 0;
198 data.reinit_all_fe_values(this->dof_data, *cell);
205 const unsigned int n_components =
208 this->dof_data[
dataset]->postprocessor;
209 if (postprocessor !=
nullptr)
215 postprocessor->get_needed_update_flags();
217 if (n_components == 1)
223 this->dof_data[
dataset]->get_function_values(
227 data.patch_values_scalar.solution_values);
229 this->dof_data[
dataset]->get_function_gradients(
233 data.patch_values_scalar.solution_gradients);
235 this->dof_data[
dataset]->get_function_hessians(
239 data.patch_values_scalar.solution_hessians);
242 data.patch_values_scalar.evaluation_points =
246 spacedim>::active_cell_iterator
247 dh_cell(&(*cell)->get_triangulation(),
253 postprocessor->evaluate_scalar_field(
254 data.patch_values_scalar,
259 data.resize_system_vectors(n_components);
264 this->dof_data[
dataset]->get_function_values(
268 data.patch_values_system.solution_values);
270 this->dof_data[
dataset]->get_function_gradients(
274 data.patch_values_system.solution_gradients);
276 this->dof_data[
dataset]->get_function_hessians(
280 data.patch_values_system.solution_hessians);
283 data.patch_values_system.evaluation_points =
287 spacedim>::active_cell_iterator
288 dh_cell(&(*cell)->get_triangulation(),
294 postprocessor->evaluate_vector_field(
295 data.patch_values_system,
299 for (
unsigned int component = 0;
300 component < this->dof_data[
dataset]->n_output_variables;
306 for (
unsigned int x = 0;
x < n_points; ++
x)
307 for (
unsigned int y = 0;
y < n_points; ++
y)
315 for (
unsigned int x = 0;
x < n_points; ++
x)
316 for (
unsigned int y = 0;
y < n_points; ++
y)
317 for (
unsigned int z = 0; z < n_points; ++z)
332 else if (n_components == 1)
334 this->dof_data[
dataset]->get_function_values(
338 data.patch_values_scalar.solution_values);
343 for (
unsigned int x = 0;
x < n_points; ++
x)
344 for (
unsigned int y = 0;
y < n_points; ++
y)
346 data.patch_values_scalar.solution_values[
x];
350 for (
unsigned int x = 0;
x < n_points; ++
x)
351 for (
unsigned int y = 0;
y < n_points; ++
y)
352 for (
unsigned int z = 0; z < n_points; ++z)
354 x * n_points * n_points +
356 data.patch_values_scalar
357 .solution_values[
x * n_points + z];
367 data.resize_system_vectors(n_components);
368 this->dof_data[
dataset]->get_function_values(
372 data.patch_values_system.solution_values);
374 for (
unsigned int component = 0; component < n_components;
380 for (
unsigned int x = 0;
x < n_points; ++
x)
381 for (
unsigned int y = 0;
y < n_points; ++
y)
384 data.patch_values_system.solution_values[
x](
389 for (
unsigned int x = 0;
x < n_points; ++
x)
390 for (
unsigned int y = 0;
y < n_points; ++
y)
391 for (
unsigned int z = 0; z < n_points; ++z)
396 data.patch_values_system
397 .solution_values[
x * n_points + z](
406 offset += this->dof_data[
dataset]->n_output_variables;
416 Assert((*cell)->is_active(),
417 ExcMessage(
"Cell must be active for cell data"));
423 this->cell_data[
dataset]->get_cell_data_value(
430 for (
unsigned int x = 0;
x < n_points; ++
x)
431 for (
unsigned int y = 0;
y < n_points; ++
y)
433 x * n_points +
y) = value;
437 for (
unsigned int x = 0;
x < n_points; ++
x)
438 for (
unsigned int y = 0;
y < n_points; ++
y)
439 for (
unsigned int z = 0; z < n_points; ++z)
441 x * n_points * n_points +
442 y * n_points + z) = value;
458 const unsigned int n_patches_per_circle,
464 const unsigned int n_subdivisions =
466 Assert(n_subdivisions >= 1,
470 this->validate_dataset_names();
472 unsigned int n_datasets = this->cell_data.size();
473 for (
unsigned int i = 0; i < this->dof_data.size(); ++i)
474 n_datasets += this->dof_data[i]->n_output_variables;
477 for (
unsigned int i = 0; i < this->dof_data.size(); ++i)
478 if (this->dof_data[i]->postprocessor)
480 this->dof_data[i]->postprocessor->get_needed_update_flags();
485 ExcMessage(
"The update of normal vectors may not be requested for "
486 "evaluation of data on cells via DataPostprocessor."));
493 cell = next_cell(cell))
501 this->patches.
clear();
502 this->patches.reserve(
all_cells.size() * n_patches_per_circle);
507 if (this->dof_data[
dataset]->postprocessor)
509 this->dof_data[
dataset]->n_output_variables;
514 const auto reference_cell = this->
triangulation->get_reference_cells()[0];
519 n_patches_per_circle,
524 std::vector<DataOutBase::Patch<patch_dim, patch_spacedim>>
new_patches(
525 n_patches_per_circle);
526 for (
unsigned int i = 0; i <
new_patches.size(); ++i)
529 new_patches[i].reference_cell = ReferenceCells::get_hypercube<dim + 1>();
532 n_datasets, Utilities::fixed_power<patch_dim>(n_subdivisions + 1));
544 this->build_one_patch(cell, data, my_patches);
548 internal::DataOutRotationImplementation::append_patch_to_list<dim,
550 new_patches, this->patches);
void run(const std::vector< std::vector< Iterator > > &colored_iterators, Worker worker, Copier copier, const ScratchData &sample_scratch_data, const CopyData &sample_copy_data, const unsigned int queue_length=2 *MultithreadInfo::n_threads(), const unsigned int chunk_size=8)
void append_patch_to_list(const std::vector< DataOutBase::Patch< DataOutRotation< dim, spacedim >::patch_dim, DataOutRotation< dim, spacedim >::patch_spacedim > > &new_patches, std::vector< DataOutBase::Patch< DataOutRotation< dim, spacedim >::patch_dim, DataOutRotation< dim, spacedim >::patch_spacedim > > &patches)
ParallelData(const unsigned int n_datasets, const unsigned int n_subdivisions, const unsigned int n_patches_per_circle, const std::vector< unsigned int > &n_postprocessor_outputs, const Mapping< dim, spacedim > &mapping, const std::vector< std::shared_ptr<::hp::FECollection< dim, spacedim > > > &finite_elements, const UpdateFlags update_flags)