17 #ifndef dealii_mesh_worker_integration_info_h
18 #define dealii_mesh_worker_integration_info_h
20 #include <deal.II/base/config.h>
22 #include <deal.II/base/quadrature_lib.h>
24 #include <deal.II/dofs/block_info.h>
26 #include <deal.II/fe/fe_values.h>
28 #include <deal.II/meshworker/dof_info.h>
29 #include <deal.II/meshworker/local_results.h>
30 #include <deal.II/meshworker/vector_selector.h>
34 DEAL_II_NAMESPACE_OPEN
77 template <
int dim,
int spacedim = dim>
82 std::vector<std::shared_ptr<FEValuesBase<dim, spacedim>>>
fevalv;
85 static const unsigned int dimension = dim;
86 static const unsigned int space_dimension = spacedim;
116 template <
class FEVALUES>
121 const UpdateFlags flags,
122 const BlockInfo *local_block_info =
nullptr);
170 std::vector<std::vector<std::vector<double>>>
values;
180 std::vector<std::vector<std::vector<Tensor<1, spacedim>>>>
gradients;
190 std::vector<std::vector<std::vector<Tensor<2, spacedim>>>>
hessians;
195 template <
typename number>
203 template <
typename number>
206 bool split_fevalues);
233 template <
typename TYPE>
237 bool split_fevalues)
const;
298 template <
int dim,
int spacedim = dim>
331 template <
typename VectorType>
336 const VectorType & dummy,
345 template <
typename VectorType>
403 const bool cell =
true,
405 const bool face =
true,
419 unsigned int n_boundary_points,
420 unsigned int n_face_points,
421 const bool force =
true);
505 std::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim>> cell_data;
506 std::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim>> boundary_data;
507 std::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim>> face_data;
531 template <
class DOFINFO>
551 template <
class DOFINFO>
583 template <
int dim,
int sdim>
588 , n_components(
numbers::invalid_unsigned_int)
592 template <
int dim,
int sdim>
595 : multigrid(other.multigrid)
596 , values(other.values)
597 , gradients(other.gradients)
598 , hessians(other.hessians)
599 , global_data(other.global_data)
600 , fe_pointer(other.fe_pointer)
601 , n_components(other.n_components)
604 for (
unsigned int i = 0; i < other.
fevalv.size(); ++i)
616 std::make_shared<FEValues<dim, sdim>>(pc->
get_mapping(),
620 else if (pf !=
nullptr)
622 std::make_shared<FEFaceValues<dim, sdim>>(pf->
get_mapping(),
626 else if (ps !=
nullptr)
627 fevalv[i] = std::make_shared<FESubfaceValues<dim, sdim>>(
639 template <
int dim,
int sdim>
640 template <
class FEVALUES>
646 const UpdateFlags flags,
650 if (block_info ==
nullptr || block_info->
local().
size() == 0)
653 fevalv[0] = std::make_shared<FEVALUES>(mapping, el, quadrature, flags);
658 for (
unsigned int i = 0; i < fevalv.size(); ++i)
659 fevalv[i] = std::make_shared<FEVALUES>(mapping,
668 template <
int dim,
int spacedim>
676 template <
int dim,
int spacedim>
685 template <
int dim,
int spacedim>
694 template <
int dim,
int spacedim>
695 template <
typename number>
700 for (
unsigned int i = 0; i < fevalv.size(); ++i)
726 const bool split_fevalues = info.
block_info !=
nullptr;
727 if (!global_data->empty())
728 fill_local_data(info, split_fevalues);
735 template <
int dim,
int sdim>
742 if (force || cell_quadrature.size() == 0)
744 if (force || boundary_quadrature.size() == 0)
746 if (force || face_quadrature.size() == 0)
751 template <
int dim,
int sdim>
755 add_update_flags(flags,
true,
true,
true,
true);
759 template <
int dim,
int sdim>
763 add_update_flags(flags,
true,
false,
false,
false);
767 template <
int dim,
int sdim>
770 const UpdateFlags flags)
772 add_update_flags(flags,
false,
true,
false,
false);
776 template <
int dim,
int sdim>
780 add_update_flags(flags,
false,
false,
true,
true);
784 template <
int dim,
int sdim>
790 initialize_update_flags();
791 initialize_gauss_quadrature((cell_flags & update_values) ?
794 (boundary_flags & update_values) ?
797 (face_flags & update_values) ?
802 cell.template initialize<FEValues<dim, sdim>>(
803 el, mapping, cell_quadrature, cell_flags, block_info);
804 boundary.template initialize<FEFaceValues<dim, sdim>>(
805 el, mapping, boundary_quadrature, boundary_flags, block_info);
806 face.template initialize<FEFaceValues<dim, sdim>>(
807 el, mapping, face_quadrature, face_flags, block_info);
808 subface.template initialize<FESubfaceValues<dim, sdim>>(
809 el, mapping, face_quadrature, face_flags, block_info);
810 neighbor.template initialize<FEFaceValues<dim, sdim>>(
811 el, mapping, face_quadrature, neighbor_flags, block_info);
815 template <
int dim,
int sdim>
816 template <
typename VectorType>
824 initialize(el, mapping, block_info);
825 std::shared_ptr<VectorData<VectorType, dim, sdim>> p;
828 p = std::make_shared<VectorData<VectorType, dim, sdim>>(cell_selector);
832 pp->initialize(data);
834 cell.initialize_data(p);
836 p = std::make_shared<VectorData<VectorType, dim, sdim>>(boundary_selector);
838 pp->initialize(data);
840 boundary.initialize_data(p);
842 p = std::make_shared<VectorData<VectorType, dim, sdim>>(face_selector);
844 pp->initialize(data);
846 face.initialize_data(p);
847 subface.initialize_data(p);
848 neighbor.initialize_data(p);
851 template <
int dim,
int sdim>
852 template <
typename VectorType>
860 initialize(el, mapping, block_info);
861 std::shared_ptr<MGVectorData<VectorType, dim, sdim>> p;
864 p = std::make_shared<MGVectorData<VectorType, dim, sdim>>(cell_selector);
868 pp->initialize(data);
870 cell.initialize_data(p);
873 std::make_shared<MGVectorData<VectorType, dim, sdim>>(boundary_selector);
875 pp->initialize(data);
877 boundary.initialize_data(p);
879 p = std::make_shared<MGVectorData<VectorType, dim, sdim>>(face_selector);
881 pp->initialize(data);
883 face.initialize_data(p);
884 subface.initialize_data(p);
885 neighbor.initialize_data(p);
888 template <
int dim,
int sdim>
889 template <
class DOFINFO>
895 template <
int dim,
int sdim>
896 template <
class DOFINFO>
904 DEAL_II_NAMESPACE_CLOSE