124 const unsigned int n_patches_per_circle =
data.n_patches_per_circle;
127 const unsigned int n_points =
data.n_subdivisions + 1;
134 for (
unsigned int i = 0; i <= n_patches_per_circle; ++i)
142 for (
unsigned int angle = 0; angle < n_patches_per_circle; ++angle)
151 const double r1 = (*cell)->vertex(0)(0),
152 r2 = (*cell)->vertex(1)(0);
153 Assert(
r1 >= 0, ExcRadialVariableHasNegativeValues(
r1));
154 Assert(
r2 >= 0, ExcRadialVariableHasNegativeValues(
r2));
166 for (
const unsigned int vertex :
172 Assert(v(0) >= 0, ExcRadialVariableHasNegativeValues(v(0)));
195 if (
data.n_datasets > 0)
197 unsigned int offset = 0;
199 data.reinit_all_fe_values(this->dof_data, *cell);
206 const unsigned int n_components =
209 this->dof_data[
dataset]->postprocessor;
210 if (postprocessor !=
nullptr)
216 postprocessor->get_needed_update_flags();
218 if (n_components == 1)
224 this->dof_data[
dataset]->get_function_values(
228 data.patch_values_scalar.solution_values);
230 this->dof_data[
dataset]->get_function_gradients(
234 data.patch_values_scalar.solution_gradients);
236 this->dof_data[
dataset]->get_function_hessians(
240 data.patch_values_scalar.solution_hessians);
243 data.patch_values_scalar.evaluation_points =
247 spacedim>::active_cell_iterator
248 dh_cell(&(*cell)->get_triangulation(),
254 postprocessor->evaluate_scalar_field(
255 data.patch_values_scalar,
260 data.resize_system_vectors(n_components);
265 this->dof_data[
dataset]->get_function_values(
269 data.patch_values_system.solution_values);
271 this->dof_data[
dataset]->get_function_gradients(
275 data.patch_values_system.solution_gradients);
277 this->dof_data[
dataset]->get_function_hessians(
281 data.patch_values_system.solution_hessians);
284 data.patch_values_system.evaluation_points =
288 spacedim>::active_cell_iterator
289 dh_cell(&(*cell)->get_triangulation(),
295 postprocessor->evaluate_vector_field(
296 data.patch_values_system,
300 for (
unsigned int component = 0;
301 component < this->dof_data[
dataset]->n_output_variables;
307 for (
unsigned int x = 0;
x < n_points; ++
x)
308 for (
unsigned int y = 0;
y < n_points; ++
y)
316 for (
unsigned int x = 0;
x < n_points; ++
x)
317 for (
unsigned int y = 0;
y < n_points; ++
y)
318 for (
unsigned int z = 0; z < n_points; ++z)
333 else if (n_components == 1)
335 this->dof_data[
dataset]->get_function_values(
339 data.patch_values_scalar.solution_values);
344 for (
unsigned int x = 0;
x < n_points; ++
x)
345 for (
unsigned int y = 0;
y < n_points; ++
y)
347 data.patch_values_scalar.solution_values[
x];
351 for (
unsigned int x = 0;
x < n_points; ++
x)
352 for (
unsigned int y = 0;
y < n_points; ++
y)
353 for (
unsigned int z = 0; z < n_points; ++z)
355 x * n_points * n_points +
357 data.patch_values_scalar
358 .solution_values[
x * n_points + z];
368 data.resize_system_vectors(n_components);
369 this->dof_data[
dataset]->get_function_values(
373 data.patch_values_system.solution_values);
375 for (
unsigned int component = 0; component < n_components;
381 for (
unsigned int x = 0;
x < n_points; ++
x)
382 for (
unsigned int y = 0;
y < n_points; ++
y)
385 data.patch_values_system.solution_values[
x](
390 for (
unsigned int x = 0;
x < n_points; ++
x)
391 for (
unsigned int y = 0;
y < n_points; ++
y)
392 for (
unsigned int z = 0; z < n_points; ++z)
397 data.patch_values_system
398 .solution_values[
x * n_points + z](
407 offset += this->dof_data[
dataset]->n_output_variables;
417 Assert((*cell)->is_active(),
418 ExcMessage(
"Cell must be active for cell data"));
424 this->cell_data[
dataset]->get_cell_data_value(
431 for (
unsigned int x = 0;
x < n_points; ++
x)
432 for (
unsigned int y = 0;
y < n_points; ++
y)
434 x * n_points +
y) = value;
438 for (
unsigned int x = 0;
x < n_points; ++
x)
439 for (
unsigned int y = 0;
y < n_points; ++
y)
440 for (
unsigned int z = 0; z < n_points; ++z)
442 x * n_points * n_points +
443 y * n_points + z) = value;
459 const unsigned int n_patches_per_circle,
465 const unsigned int n_subdivisions =
467 Assert(n_subdivisions >= 1,
471 this->validate_dataset_names();
473 unsigned int n_datasets = this->cell_data.size();
474 for (
unsigned int i = 0; i < this->dof_data.size(); ++i)
475 n_datasets += this->dof_data[i]->n_output_variables;
478 for (
unsigned int i = 0; i < this->dof_data.size(); ++i)
479 if (this->dof_data[i]->postprocessor)
481 this->dof_data[i]->postprocessor->get_needed_update_flags();
486 ExcMessage(
"The update of normal vectors may not be requested for "
487 "evaluation of data on cells via DataPostprocessor."));
494 cell = next_cell(cell))
502 this->patches.clear();
503 this->patches.reserve(
all_cells.
size() * n_patches_per_circle);
508 if (this->dof_data[
dataset]->postprocessor)
510 this->dof_data[
dataset]->n_output_variables;
515 const auto reference_cell = this->
triangulation->get_reference_cells()[0];
520 n_patches_per_circle,
525 std::vector<DataOutBase::Patch<patch_dim, patch_spacedim>>
new_patches(
526 n_patches_per_circle);
530 new_patches[i].reference_cell = ReferenceCells::get_hypercube<dim + 1>();
533 n_datasets, Utilities::fixed_power<patch_dim>(n_subdivisions + 1));
545 this->build_one_patch(cell, data, my_patches);
549 internal::DataOutRotationImplementation::append_patch_to_list<dim,
551 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)