17#ifndef dealii_mesh_worker_integration_info_h
18#define dealii_mesh_worker_integration_info_h
76 template <
int dim,
int spacedim = dim>
81 std::vector<std::shared_ptr<FEValuesBase<dim, spacedim>>>
fevalv;
115 template <
class FEVALUES>
121 const BlockInfo *local_block_info =
nullptr);
169 std::vector<std::vector<std::vector<double>>>
values;
179 std::vector<std::vector<std::vector<Tensor<1, spacedim>>>>
gradients;
189 std::vector<std::vector<std::vector<Tensor<2, spacedim>>>>
hessians;
194 template <
typename number>
202 template <
typename number>
205 bool split_fevalues);
232 template <
typename TYPE>
236 bool split_fevalues)
const;
296 template <
int dim,
int spacedim = dim>
329 template <
typename VectorType>
334 const VectorType & dummy,
343 template <
typename VectorType>
401 const bool cell =
true,
403 const bool face =
true,
417 unsigned int n_boundary_points,
418 unsigned int n_face_points,
419 const bool force =
true);
503 std::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim>>
cell_data;
505 std::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim>>
face_data;
529 template <
class DOFINFO>
549 template <
class DOFINFO>
581 template <
int dim,
int sdim>
586 , n_components(
numbers::invalid_unsigned_int)
590 template <
int dim,
int sdim>
593 : multigrid(other.multigrid)
594 , values(other.values)
595 , gradients(other.gradients)
596 , hessians(other.hessians)
597 , global_data(other.global_data)
598 , fe_pointer(other.fe_pointer)
599 , n_components(other.n_components)
602 for (
unsigned int i = 0; i < other.
fevalv.size(); ++i)
614 std::make_shared<FEValues<dim, sdim>>(pc->
get_mapping(),
618 else if (pf !=
nullptr)
620 std::make_shared<FEFaceValues<dim, sdim>>(pf->
get_mapping(),
624 else if (ps !=
nullptr)
625 fevalv[i] = std::make_shared<FESubfaceValues<dim, sdim>>(
637 template <
int dim,
int sdim>
638 template <
class FEVALUES>
648 if (block_info ==
nullptr || block_info->
local().
size() == 0)
651 fevalv[0] = std::make_shared<FEVALUES>(mapping, el, quadrature, flags);
656 for (
unsigned int i = 0; i < fevalv.size(); ++i)
657 fevalv[i] = std::make_shared<FEVALUES>(mapping,
666 template <
int dim,
int spacedim>
674 template <
int dim,
int spacedim>
683 template <
int dim,
int spacedim>
692 template <
int dim,
int spacedim>
693 template <
typename number>
698 for (
unsigned int i = 0; i < fevalv.size(); ++i)
724 const bool split_fevalues = info.
block_info !=
nullptr;
725 if (!global_data->empty())
726 fill_local_data(info, split_fevalues);
733 template <
int dim,
int sdim>
740 if (force || cell_quadrature.size() == 0)
742 if (force || boundary_quadrature.size() == 0)
743 boundary_quadrature =
QGauss<dim - 1>(bp);
744 if (force || face_quadrature.size() == 0)
749 template <
int dim,
int sdim>
753 add_update_flags(flags,
true,
true,
true,
true);
757 template <
int dim,
int sdim>
761 add_update_flags(flags,
true,
false,
false,
false);
765 template <
int dim,
int sdim>
770 add_update_flags(flags,
false,
true,
false,
false);
774 template <
int dim,
int sdim>
778 add_update_flags(flags,
false,
false,
true,
true);
782 template <
int dim,
int sdim>
788 initialize_update_flags();
800 cell.template initialize<FEValues<dim, sdim>>(
801 el, mapping, cell_quadrature, cell_flags, block_info);
802 boundary.template initialize<FEFaceValues<dim, sdim>>(
803 el, mapping, boundary_quadrature, boundary_flags, block_info);
804 face.template initialize<FEFaceValues<dim, sdim>>(
805 el, mapping, face_quadrature, face_flags, block_info);
806 subface.template initialize<FESubfaceValues<dim, sdim>>(
807 el, mapping, face_quadrature, face_flags, block_info);
808 neighbor.template initialize<FEFaceValues<dim, sdim>>(
809 el, mapping, face_quadrature, neighbor_flags, block_info);
813 template <
int dim,
int sdim>
814 template <
typename VectorType>
822 initialize(el, mapping, block_info);
823 std::shared_ptr<VectorData<VectorType, dim, sdim>> p;
826 p = std::make_shared<VectorData<VectorType, dim, sdim>>(cell_selector);
832 cell.initialize_data(p);
834 p = std::make_shared<VectorData<VectorType, dim, sdim>>(boundary_selector);
838 boundary.initialize_data(p);
840 p = std::make_shared<VectorData<VectorType, dim, sdim>>(face_selector);
844 face.initialize_data(p);
845 subface.initialize_data(p);
846 neighbor.initialize_data(p);
849 template <
int dim,
int sdim>
850 template <
typename VectorType>
858 initialize(el, mapping, block_info);
859 std::shared_ptr<MGVectorData<VectorType, dim, sdim>> p;
862 p = std::make_shared<MGVectorData<VectorType, dim, sdim>>(cell_selector);
868 cell.initialize_data(p);
871 std::make_shared<MGVectorData<VectorType, dim, sdim>>(boundary_selector);
875 boundary.initialize_data(p);
877 p = std::make_shared<MGVectorData<VectorType, dim, sdim>>(face_selector);
881 face.initialize_data(p);
882 subface.initialize_data(p);
883 neighbor.initialize_data(p);
886 template <
int dim,
int sdim>
887 template <
class DOFINFO>
893 template <
int dim,
int sdim>
894 template <
class DOFINFO>
unsigned int size() const
A small class collecting the different BlockIndices involved in global, multilevel and local computat...
const BlockIndices & local() const
const Quadrature< dim - 1 > & get_quadrature() const
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, level_dof_access > > &cell, const unsigned int face_no)
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, level_dof_access > > &cell, const unsigned int face_no, const unsigned int subface_no)
UpdateFlags get_update_flags() const
const Mapping< dim, spacedim > & get_mapping() const
const FiniteElement< dim, spacedim > & get_fe() const
const Quadrature< dim > & get_quadrature() const
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, level_dof_access > > &cell)
unsigned int tensor_degree() const
unsigned int n_components() const
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
unsigned int n_base_elements() const
Abstract base class for mapping classes.
SmartPointer< const BlockInfo, DoFInfo< dim, spacedim > > block_info
The block structure of the system.
Triangulation< dim, spacedim >::cell_iterator cell
The current cell.
std::size_t memory_consumption() const
Quadrature< dim > cell_quadrature
void initialize_update_flags(bool neighbor_geometry=false)
void initialize_gauss_quadrature(unsigned int n_cell_points, unsigned int n_boundary_points, unsigned int n_face_points, const bool force=true)
void post_cell(const DoFInfoBox< dim, DOFINFO > &)
void initialize(const FiniteElement< dim, spacedim > &el, const Mapping< dim, spacedim > &mapping, const BlockInfo *block_info=nullptr)
void add_update_flags_all(const UpdateFlags flags)
MeshWorker::VectorSelector boundary_selector
void add_update_flags(const UpdateFlags flags, const bool cell=true, const bool boundary=true, const bool face=true, const bool neighbor=true)
std::shared_ptr< MeshWorker::VectorDataBase< dim, spacedim > > face_data
std::shared_ptr< MeshWorker::VectorDataBase< dim, spacedim > > boundary_data
UpdateFlags neighbor_flags
std::shared_ptr< MeshWorker::VectorDataBase< dim, spacedim > > cell_data
void initialize(const FiniteElement< dim, spacedim > &el, const Mapping< dim, spacedim > &mapping, const AnyData &data, const MGLevelObject< VectorType > &dummy, const BlockInfo *block_info=nullptr)
Quadrature< dim - 1 > boundary_quadrature
void initialize(const FiniteElement< dim, spacedim > &el, const Mapping< dim, spacedim > &mapping, const AnyData &data, const VectorType &dummy, const BlockInfo *block_info=nullptr)
void add_update_flags_cell(const UpdateFlags flags)
Quadrature< dim - 1 > face_quadrature
MeshWorker::VectorSelector face_selector
void post_faces(const DoFInfoBox< dim, DOFINFO > &)
MeshWorker::VectorSelector cell_selector
void add_update_flags_face(const UpdateFlags flags)
UpdateFlags boundary_flags
void add_update_flags_boundary(const UpdateFlags flags)
static constexpr unsigned int space_dimension
static constexpr unsigned int dimension
std::vector< std::vector< std::vector< Tensor< 2, spacedim > > > > hessians
std::size_t memory_consumption() const
const FEValuesBase< dim, spacedim > & fe_values(const unsigned int i) const
Access to finite elements.
const FiniteElement< dim, spacedim > & finite_element() const
IntegrationInfo(const IntegrationInfo< dim, spacedim > &other)
const FEValuesBase< dim, spacedim > & fe_values() const
Access to finite element.
void fill_local_data(std::vector< std::vector< std::vector< TYPE > > > &data, VectorSelector &selector, bool split_fevalues) const
bool multigrid
This is true if we are assembling for multigrid.
std::shared_ptr< VectorDataBase< dim, spacedim > > global_data
void reinit(const DoFInfo< dim, spacedim, number > &i)
void fill_local_data(const DoFInfo< dim, spacedim, number > &info, bool split_fevalues)
std::vector< std::vector< std::vector< Tensor< 1, spacedim > > > > gradients
std::vector< std::shared_ptr< FEValuesBase< dim, spacedim > > > fevalv
vector of FEValues objects
SmartPointer< const FiniteElement< dim, spacedim >, IntegrationInfo< dim, spacedim > > fe_pointer
unsigned int n_components
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)
void initialize_data(const std::shared_ptr< VectorDataBase< dim, spacedim > > &data)
std::vector< std::vector< std::vector< double > > > values
void initialize(const AnyData &)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
@ update_values
Shape function values.
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcNotInitialized()
static const unsigned int invalid_unsigned_int