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>>(
638 template <
int dim,
int sdim>
639 template <
class FEVALUES>
649 if (block_info ==
nullptr || block_info->
local().
size() == 0)
652 fevalv[0] = std::make_shared<FEVALUES>(mapping, el, quadrature, flags);
657 for (
unsigned int i = 0; i < fevalv.size(); ++i)
658 fevalv[i] = std::make_shared<FEVALUES>(mapping,
667 template <
int dim,
int spacedim>
675 template <
int dim,
int spacedim>
684 template <
int dim,
int spacedim>
693 template <
int dim,
int spacedim>
694 template <
typename number>
699 for (
unsigned int i = 0; i < fevalv.size(); ++i)
725 const bool split_fevalues = info.
block_info !=
nullptr;
726 if (!global_data->empty())
727 fill_local_data(info, split_fevalues);
734 template <
int dim,
int sdim>
741 if (force || cell_quadrature.size() == 0)
743 if (force || boundary_quadrature.size() == 0)
744 boundary_quadrature =
QGauss<dim - 1>(bp);
745 if (force || face_quadrature.size() == 0)
750 template <
int dim,
int sdim>
754 add_update_flags(flags,
true,
true,
true,
true);
758 template <
int dim,
int sdim>
762 add_update_flags(flags,
true,
false,
false,
false);
766 template <
int dim,
int sdim>
771 add_update_flags(flags,
false,
true,
false,
false);
775 template <
int dim,
int sdim>
779 add_update_flags(flags,
false,
false,
true,
true);
784 template <
int dim,
int sdim>
790 initialize_update_flags();
795 (el.tensor_degree() + 1) :
798 (el.tensor_degree() + 1) :
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);
816 template <
int dim,
int sdim>
817 template <
typename VectorType>
825 initialize(el, mapping, block_info);
826 std::shared_ptr<VectorData<VectorType, dim, sdim>> p;
829 p = std::make_shared<VectorData<VectorType, dim, sdim>>(cell_selector);
835 cell.initialize_data(p);
837 p = std::make_shared<VectorData<VectorType, dim, sdim>>(boundary_selector);
841 boundary.initialize_data(p);
843 p = std::make_shared<VectorData<VectorType, dim, sdim>>(face_selector);
847 face.initialize_data(p);
848 subface.initialize_data(p);
849 neighbor.initialize_data(p);
852 template <
int dim,
int sdim>
853 template <
typename VectorType>
861 initialize(el, mapping, block_info);
862 std::shared_ptr<MGVectorData<VectorType, dim, sdim>> p;
865 p = std::make_shared<MGVectorData<VectorType, dim, sdim>>(cell_selector);
871 cell.initialize_data(p);
874 std::make_shared<MGVectorData<VectorType, dim, sdim>>(boundary_selector);
878 boundary.initialize_data(p);
880 p = std::make_shared<MGVectorData<VectorType, dim, sdim>>(face_selector);
884 face.initialize_data(p);
885 subface.initialize_data(p);
886 neighbor.initialize_data(p);
889 template <
int dim,
int sdim>
890 template <
class DOFINFO>
896 template <
int dim,
int sdim>
897 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
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcNotInitialized()
@ update_values
Shape function values.
static const unsigned int invalid_unsigned_int