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>
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>
368 initialize_update_flags(
bool neighbor_geometry =
false);
387 add_update_flags_boundary(
const UpdateFlags flags);
403 const bool cell =
true,
404 const bool boundary =
true,
405 const bool face =
true,
406 const bool neighbor =
true);
418 initialize_gauss_quadrature(
unsigned int n_cell_points,
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>
592 template <
int dim,
int sdim>
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>
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;
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>
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();
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>
825 std::shared_ptr<VectorData<VectorType, dim, sdim>> p;
828 p = std::make_shared<VectorData<VectorType, dim, sdim>>(cell_selector);
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>
861 std::shared_ptr<MGVectorData<VectorType, dim, sdim>> p;
864 p = std::make_shared<MGVectorData<VectorType, dim, sdim>>(cell_selector);
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
std::vector< std::vector< std::vector< double > > > values
SmartPointer< const BlockInfo, DoFInfo< dim, spacedim > > block_info
The block structure of the system.
void reinit(const TriaIterator< DoFCellAccessor< DoFHandlerType< dim, spacedim >, level_dof_access >> &cell, const unsigned int face_no, const unsigned int subface_no)
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)
std::vector< std::vector< std::vector< Tensor< 2, spacedim > > > > hessians
void post_faces(const DoFInfoBox< dim, DOFINFO > &)
UpdateFlags boundary_flags
void add_update_flags_cell(const UpdateFlags flags)
std::shared_ptr< VectorDataBase< dim, spacedim > > global_data
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)
std::vector< std::vector< std::vector< Tensor< 1, spacedim > > > > gradients
static::ExceptionBase & ExcNotInitialized()
void initialize_data(const std::shared_ptr< VectorDataBase< dim, spacedim >> &data)
const FiniteElement< dim, spacedim > & finite_element() const
static::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
void add_update_flags_face(const UpdateFlags flags)
UpdateFlags get_update_flags() const
const Quadrature< dim > & get_quadrature() const
unsigned int tensor_degree() 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)
MeshWorker::VectorSelector cell_selector
const Quadrature< dim-1 > & get_quadrature() const
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 > &)
Abstract base class for mapping classes.
Quadrature< dim > cell_quadrature
UpdateFlags neighbor_flags
const FiniteElement< dim, spacedim > & get_fe() const
unsigned int n_base_elements() const
unsigned int n_components() const
IntegrationInfo< dim, spacedim > CellInfo
void reinit(const TriaIterator< DoFCellAccessor< DoFHandlerType< dim, spacedim >, level_dof_access >> &cell)
void add_update_flags_boundary(const UpdateFlags flags)
Quadrature< dim-1 > boundary_quadrature
std::size_t memory_consumption() const
const FEValuesBase< dim, spacedim > & fe_values() const
Access to finite element.
MeshWorker::VectorSelector boundary_selector
bool multigrid
This is true if we are assembling for multigrid.
const BlockIndices & local() const
A small class collecting the different BlockIndices involved in global, multilevel and local computat...
unsigned int size() const
void reinit(const TriaIterator< DoFCellAccessor< DoFHandlerType< dim, spacedim >, level_dof_access >> &cell, const unsigned int face_no)
SmartPointer< const FiniteElement< dim, spacedim >, IntegrationInfo< dim, spacedim > > fe_pointer
const Mapping< dim, spacedim > & get_mapping() const
void initialize(const AnyData &)
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
unsigned int n_components
Quadrature< dim-1 > face_quadrature
MeshWorker::VectorSelector face_selector
static::ExceptionBase & ExcInternalError()