55 template <
int dim,
int spacedim>
60 const std::vector<unsigned int> &n_postprocessor_outputs,
69 n_postprocessor_outputs,
83 template <
int dim,
int spacedim>
95 for (
unsigned int i = 0; i < new_patches.size(); ++i)
97 patches.push_back(new_patches[i]);
98 patches.back().patch_index = patches.size() - 1;
106template <
int dim,
int spacedim>
132 std::vector<Point<dim + 1>> angle_directions(n_patches_per_circle + 1);
133 for (
unsigned int i = 0; i <= n_patches_per_circle; ++i)
135 angle_directions[i][dim - 1] =
137 angle_directions[i][dim] =
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];
155 my_patches[angle].vertices[0] = r1 * angle_directions[angle];
156 my_patches[angle].vertices[1] = r2 * angle_directions[angle];
157 my_patches[angle].vertices[2] = r1 * angle_directions[angle + 1];
158 my_patches[angle].vertices[3] = r2 * angle_directions[angle + 1];
165 for (
const unsigned int vertex :
174 my_patches[angle].vertices[vertex] =
175 v[0] * angle_directions[angle];
176 my_patches[angle].vertices[vertex][0] = v[1];
180 v[0] * angle_directions[angle + 1];
196 unsigned int offset = 0;
200 for (
unsigned int dataset = 0; dataset < this->
dof_data.size();
205 const unsigned int n_components =
208 this->
dof_data[dataset]->postprocessor;
209 if (postprocessor !=
nullptr)
214 const UpdateFlags update_flags =
217 if (n_components == 1)
223 this->
dof_data[dataset]->get_function_values(
229 this->
dof_data[dataset]->get_function_gradients(
235 this->
dof_data[dataset]->get_function_hessians(
246 spacedim>::active_cell_iterator
247 dh_cell(&(*cell)->get_triangulation(),
250 this->dof_data[dataset]->dof_handler);
264 this->
dof_data[dataset]->get_function_values(
270 this->
dof_data[dataset]->get_function_gradients(
276 this->
dof_data[dataset]->get_function_hessians(
287 spacedim>::active_cell_iterator
288 dh_cell(&(*cell)->get_triangulation(),
291 this->dof_data[dataset]->dof_handler);
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)
308 my_patches[angle].data(offset + component,
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)
318 my_patches[angle].data(offset + component,
332 else if (n_components == 1)
334 this->
dof_data[dataset]->get_function_values(
343 for (
unsigned int x = 0; x < n_points; ++x)
344 for (
unsigned int y = 0; y < n_points; ++y)
345 my_patches[angle].data(offset, x * n_points + y) =
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)
353 my_patches[angle].data(offset,
354 x * n_points * n_points +
357 .solution_values[x * n_points + z];
368 this->
dof_data[dataset]->get_function_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)
382 my_patches[angle].data(offset + component,
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)
392 my_patches[angle].data(offset + component,
397 .solution_values[x * n_points + z](
406 offset += this->
dof_data[dataset]->n_output_variables;
410 for (
unsigned int dataset = 0; dataset < this->
cell_data.size();
416 Assert((*cell)->is_active(),
417 ExcMessage(
"Cell must be active for cell data"));
418 const unsigned int cell_number = std::distance(
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)
432 my_patches[angle].data(dataset + offset,
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)
440 my_patches[angle].data(dataset + offset,
441 x * n_points * n_points +
442 y * n_points + z) =
value;
455template <
int dim,
int spacedim>
458 const unsigned int n_patches_per_circle,
459 const unsigned int nnnn_subdivisions)
464 const unsigned int n_subdivisions =
466 Assert(n_subdivisions >= 1,
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."));
491 std::vector<cell_iterator> all_cells;
494 all_cells.push_back(cell);
502 this->
patches.reserve(all_cells.size() * n_patches_per_circle);
505 std::vector<unsigned int> n_postprocessor_outputs(this->
dof_data.size());
506 for (
unsigned int dataset = 0; dataset < this->
dof_data.size(); ++dataset)
507 if (this->
dof_data[dataset]->postprocessor)
508 n_postprocessor_outputs[dataset] =
509 this->
dof_data[dataset]->n_output_variables;
511 n_postprocessor_outputs[dataset] = 0;
514 const auto reference_cell = this->
triangulation->get_reference_cells()[0];
519 n_patches_per_circle,
520 n_postprocessor_outputs,
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)
528 new_patches[i].n_subdivisions = n_subdivisions;
531 new_patches[i].data.reinit(
538 all_cells.data() + all_cells.size(),
544 this->build_one_patch(cell, data, my_patches);
548 internal::DataOutRotationImplementation::append_patch_to_list<dim,
550 new_patches, this->patches);
558template <
int dim,
int spacedim>
566template <
int dim,
int spacedim>
582#include "data_out_rotation.inst"
unsigned int default_subdivisions
void validate_dataset_names() const
virtual void build_patches(const unsigned int n_patches_per_circle, const unsigned int n_subdivisions=0)
static constexpr int patch_dim
void build_one_patch(const cell_iterator *cell, internal::DataOutRotationImplementation::ParallelData< dim, spacedim > &data, std::vector< DataOutBase::Patch< patch_dim, patch_spacedim > > &my_patches)
virtual cell_iterator next_cell(const cell_iterator &cell)
static constexpr int patch_spacedim
virtual cell_iterator first_cell()
typename DataOut_DoFData< dim, patch_dim, spacedim, patch_spacedim >:: cell_iterator cell_iterator
std::vector< std::shared_ptr< internal::DataOutImplementation::DataEntryBase< dim, spacedim > > > cell_data
std::vector< Patch > patches
std::vector< std::shared_ptr< internal::DataOutImplementation::DataEntryBase< dim, spacedim > > > dof_data
SmartPointer< const Triangulation< dim, spacedim > > triangulation
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
const std::vector< Point< spacedim > > & get_quadrature_points() const
const FiniteElement< dim, spacedim > & get_fe() const
unsigned int n_components() const
Abstract base class for mapping classes.
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcInvalidNumberOfSubdivisions(int arg1)
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
static ::ExceptionBase & ExcRadialVariableHasNegativeValues(double arg1)
static ::ExceptionBase & ExcNoTriangulationSelected()
static ::ExceptionBase & ExcMessage(std::string arg1)
TriaActiveIterator< CellAccessor< dim, spacedim > > active_cell_iterator
const bool IsBlockVector< VectorType >::value
@ update_hessians
Second derivatives of shape functions.
@ update_values
Shape function values.
@ update_normal_vectors
Normal vectors.
@ update_gradients
Shape function gradients.
@ update_quadrature_points
Transformed quadrature points.
#define DEAL_II_NOT_IMPLEMENTED()
const Mapping< dim, spacedim > & get_default_linear_mapping(const Triangulation< dim, spacedim > &triangulation)
MappingQ< dim, spacedim > StaticMappingQ1< dim, spacedim >::mapping
constexpr const ReferenceCell & get_hypercube()
constexpr T fixed_power(const T t)
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)
static constexpr double PI
::VectorizedArray< Number, width > cos(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > sin(const ::VectorizedArray< Number, width > &)
static constexpr unsigned int vertices_per_cell
static std_cxx20::ranges::iota_view< unsigned int, unsigned int > vertex_indices()
const FEValuesBase< dim, spacedim > & get_present_fe_values(const unsigned int dataset) const
const unsigned int n_datasets
DataPostprocessorInputs::Scalar< spacedim > patch_values_scalar
ParallelDataBase(const unsigned int n_datasets, const unsigned int n_subdivisions, 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, const bool use_face_values)
const unsigned int n_subdivisions
const std::vector< std::shared_ptr<::hp::FECollection< dim, spacedim > > > finite_elements
std::vector< std::vector<::Vector< double > > > postprocessed_values
DataPostprocessorInputs::Vector< spacedim > patch_values_system
void reinit_all_fe_values(std::vector< std::shared_ptr< DataEntryBase< dim, spacedim > > > &dof_data, const typename ::Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face=numbers::invalid_unsigned_int)
const UpdateFlags update_flags
void resize_system_vectors(const unsigned int n_components)
const unsigned int n_patches_per_circle
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)