17 #ifndef dealii_mesh_worker_integration_info_h 18 #define dealii_mesh_worker_integration_info_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/quadrature_lib.h> 22 #include <deal.II/dofs/block_info.h> 23 #include <deal.II/fe/fe_values.h> 24 #include <deal.II/meshworker/local_results.h> 25 #include <deal.II/meshworker/dof_info.h> 26 #include <deal.II/meshworker/vector_selector.h> 30 DEAL_II_NAMESPACE_OPEN
73 template <
int dim,
int spacedim = dim>
78 std::vector<std::shared_ptr<FEValuesBase<dim, spacedim> > >
fevalv;
80 static const unsigned int dimension = dim;
81 static const unsigned int space_dimension = spacedim;
111 template <
class FEVALUES>
116 const BlockInfo *local_block_info =
nullptr);
159 std::vector<std::vector<std::vector<double> > >
values;
169 std::vector<std::vector<std::vector<Tensor<1,spacedim> > > >
gradients;
179 std::vector<std::vector<std::vector<Tensor<2,spacedim> > > >
hessians;
184 template <
typename number>
191 template <
typename number>
216 template <
typename TYPE>
218 std::vector<std::vector<std::vector<TYPE> > > &data,
220 bool split_fevalues)
const;
281 template <
int dim,
int spacedim=dim>
314 template <
typename VectorType>
318 const VectorType &dummy,
327 template <
typename VectorType>
378 const bool cell =
true,
380 const bool face =
true,
393 unsigned int n_boundary_points,
394 unsigned int n_face_points,
395 const bool force =
true);
478 std::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim> > cell_data;
479 std::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim> > boundary_data;
480 std::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim> > face_data;
504 template <
class DOFINFO>
523 template <
class DOFINFO>
554 template <
int dim,
int sdim>
561 n_components(
numbers::invalid_unsigned_int)
565 template <
int dim,
int sdim>
569 multigrid(other.multigrid),
570 values(other.values),
571 gradients(other.gradients),
572 hessians(other.hessians),
573 global_data(other.global_data),
574 fe_pointer(other.fe_pointer),
575 n_components(other.n_components)
578 for (
unsigned int i=0; i<other.
fevalv.size(); ++i)
586 fevalv[i] = std::make_shared<FEValues<dim,sdim> >
589 else if (pf !=
nullptr)
590 fevalv[i] = std::make_shared<FEFaceValues<dim,sdim> >
592 else if (ps !=
nullptr)
593 fevalv[i] = std::make_shared<FESubfaceValues<dim,sdim> >
602 template <
int dim,
int sdim>
603 template <
class FEVALUES>
613 if (block_info ==
nullptr || block_info->
local().
size() == 0)
616 fevalv[0] = std::make_shared<FEVALUES>(mapping, el, quadrature, flags);
621 for (
unsigned int i=0; i<fevalv.size(); ++i)
622 fevalv[i] = std::make_shared<FEVALUES> (mapping, el.
base_element(i), quadrature, flags);
628 template <
int dim,
int spacedim>
636 template <
int dim,
int spacedim>
645 template <
int dim,
int spacedim>
654 template <
int dim,
int spacedim>
655 template <
typename number>
659 for (
unsigned int i=0; i<fevalv.size(); ++i)
682 const bool split_fevalues = info.
block_info !=
nullptr;
683 if (!global_data->empty())
684 fill_local_data(info, split_fevalues);
692 template <
int dim,
int sdim>
701 if (force || cell_quadrature.size() == 0)
703 if (force || boundary_quadrature.size() == 0)
705 if (force || face_quadrature.size() == 0)
710 template <
int dim,
int sdim>
715 add_update_flags(flags,
true,
true,
true,
true);
719 template <
int dim,
int sdim>
724 add_update_flags(flags,
true,
false,
false,
false);
728 template <
int dim,
int sdim>
733 add_update_flags(flags,
false,
true,
false,
false);
737 template <
int dim,
int sdim>
742 add_update_flags(flags,
false,
false,
true,
true);
746 template <
int dim,
int sdim>
754 initialize_update_flags();
755 initialize_gauss_quadrature(
760 cell.template initialize<FEValues<dim,sdim> >(el, mapping, cell_quadrature,
761 cell_flags, block_info);
762 boundary.template initialize<FEFaceValues<dim,sdim> >(el, mapping, boundary_quadrature,
763 boundary_flags, block_info);
764 face.template initialize<FEFaceValues<dim,sdim> >(el, mapping, face_quadrature,
765 face_flags, block_info);
766 subface.template initialize<FESubfaceValues<dim,sdim> >(el, mapping, face_quadrature,
767 face_flags, block_info);
768 neighbor.template initialize<FEFaceValues<dim,sdim> >(el, mapping, face_quadrature,
769 neighbor_flags, block_info);
773 template <
int dim,
int sdim>
774 template <
typename VectorType>
783 initialize(el, mapping, block_info);
784 std::shared_ptr<VectorData<VectorType, dim, sdim> > p;
787 p = std::make_shared<VectorData<VectorType, dim, sdim> > (cell_selector);
793 cell.initialize_data(p);
795 p = std::make_shared<VectorData<VectorType, dim, sdim> > (boundary_selector);
797 pp->initialize(data);
799 boundary.initialize_data(p);
801 p = std::make_shared<VectorData<VectorType, dim, sdim> > (face_selector);
803 pp->initialize(data);
805 face.initialize_data(p);
806 subface.initialize_data(p);
807 neighbor.initialize_data(p);
810 template <
int dim,
int sdim>
811 template <
typename VectorType>
820 initialize(el, mapping, block_info);
821 std::shared_ptr<MGVectorData<VectorType, dim, sdim> > p;
824 p = std::make_shared<MGVectorData<VectorType, dim, sdim> > (cell_selector);
830 cell.initialize_data(p);
832 p = std::make_shared<MGVectorData<VectorType, dim, sdim> > (boundary_selector);
834 pp->initialize(data);
836 boundary.initialize_data(p);
838 p = std::make_shared<MGVectorData<VectorType, dim, sdim> > (face_selector);
840 pp->initialize(data);
842 face.initialize_data(p);
843 subface.initialize_data(p);
844 neighbor.initialize_data(p);
847 template <
int dim,
int sdim>
848 template <
class DOFINFO>
854 template <
int dim,
int sdim>
855 template <
class DOFINFO>
863 DEAL_II_NAMESPACE_CLOSE
std::vector< std::vector< std::vector< double > > > values
Triangulation< dim, spacedim >::cell_iterator cell
The current cell.
static const unsigned int invalid_unsigned_int
void initialize(const FiniteElement< dim, spacedim > &el, const Mapping< dim, spacedim > &mapping, const Quadrature< FEVALUES::integral_dimension > &quadrature, const UpdateFlags flags, const BlockInfo *local_block_info=nullptr)
#define AssertDimension(dim1, dim2)
void post_faces(const DoFInfoBox< dim, DOFINFO > &)
Quadrature< dim-1 > boundary_quadrature
UpdateFlags boundary_flags
void add_update_flags_cell(const UpdateFlags flags)
const FEValuesBase< dim, spacedim > & fe_values() const
Access to finite element.
const BlockIndices & local() const
std::shared_ptr< VectorDataBase< dim, spacedim > > global_data
std::size_t memory_consumption() const
std::vector< std::shared_ptr< FEValuesBase< dim, spacedim > > > fevalv
vector of FEValues objects
void add_update_flags_all(const UpdateFlags flags)
void fill_local_data(const DoFInfo< dim, spacedim, number > &info, bool split_fevalues)
const FiniteElement< dim, spacedim > & get_fe() const
UpdateFlags get_update_flags() const
static ::ExceptionBase & ExcNotInitialized()
std::vector< std::vector< std::vector< Tensor< 2, spacedim > > > > hessians
void initialize_update_flags(bool neighbor_geometry=false)
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
void add_update_flags_face(const UpdateFlags flags)
const Mapping< dim, spacedim > & get_mapping() const
void reinit(const TriaIterator< DoFCellAccessor< DoFHandlerType< dim, spacedim >, level_dof_access > > &cell, const unsigned int face_no, const unsigned int subface_no)
const FiniteElement< dim, spacedim > & finite_element() const
void reinit(const DoFInfo< dim, spacedim, number > &i)
void initialize_gauss_quadrature(unsigned int n_cell_points, unsigned int n_boundary_points, unsigned int n_face_points, const bool force=true)
Quadrature< dim-1 > face_quadrature
std::size_t memory_consumption() const
std::vector< std::vector< std::vector< Tensor< 1, spacedim > > > > gradients
MeshWorker::VectorSelector cell_selector
void initialize(const FiniteElement< dim, spacedim > &el, const Mapping< dim, spacedim > &mapping, const BlockInfo *block_info=nullptr)
#define Assert(cond, exc)
void post_cell(const DoFInfoBox< dim, DOFINFO > &)
void reinit(const TriaIterator< DoFCellAccessor< DoFHandlerType< dim, spacedim >, level_dof_access > > &cell, const unsigned int face_no)
Abstract base class for mapping classes.
const Quadrature< dim-1 > & get_quadrature() const
Quadrature< dim > cell_quadrature
SmartPointer< const BlockInfo, DoFInfo< dim, spacedim > > block_info
The block structure of the system.
UpdateFlags neighbor_flags
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
void add_update_flags_boundary(const UpdateFlags flags)
const Quadrature< dim > & get_quadrature() const
MeshWorker::VectorSelector boundary_selector
bool multigrid
This is true if we are assembling for multigrid.
unsigned int n_components() const
void add_update_flags(const UpdateFlags flags, const bool cell=true, const bool boundary=true, const bool face=true, const bool neighbor=true)
A small class collecting the different BlockIndices involved in global, multilevel and local computat...
IntegrationInfo< dim, spacedim > CellInfo
SmartPointer< const FiniteElement< dim, spacedim >, IntegrationInfo< dim, spacedim > > fe_pointer
unsigned int n_base_elements() const
unsigned int size() const
void initialize(const AnyData &)
void reinit(const TriaIterator< DoFCellAccessor< DoFHandlerType< dim, spacedim >, level_dof_access > > &cell)
unsigned int n_components
void initialize_data(const std::shared_ptr< VectorDataBase< dim, spacedim > > &data)
MeshWorker::VectorSelector face_selector
unsigned int tensor_degree() const
static ::ExceptionBase & ExcInternalError()