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/base/std_cxx11/shared_ptr.h> 23 #include <deal.II/dofs/block_info.h> 24 #include <deal.II/fe/fe_values.h> 25 #include <deal.II/meshworker/local_results.h> 26 #include <deal.II/meshworker/dof_info.h> 27 #include <deal.II/meshworker/vector_selector.h> 29 DEAL_II_NAMESPACE_OPEN
72 template<
int dim,
int spacedim = dim>
77 std::vector<std_cxx11::shared_ptr<FEValuesBase<dim, spacedim> > >
fevalv;
79 static const unsigned int dimension = dim;
80 static const unsigned int space_dimension = spacedim;
110 template <
class FEVALUES>
158 std::vector<std::vector<std::vector<double> > >
values;
168 std::vector<std::vector<std::vector<Tensor<1,dim> > > >
gradients;
178 std::vector<std::vector<std::vector<Tensor<2,dim> > > >
hessians;
183 template <
typename number>
190 template<
typename number>
197 std_cxx11::shared_ptr<VectorDataBase<dim, spacedim> >
global_data;
215 template <
typename TYPE>
217 std::vector<std::vector<std::vector<TYPE> > > &data,
219 bool split_fevalues)
const;
280 template <
int dim,
int spacedim=dim>
313 template <
typename VectorType>
317 const VectorType &dummy,
326 template <
typename VectorType>
377 const bool cell =
true,
379 const bool face =
true,
392 unsigned int n_boundary_points,
393 unsigned int n_face_points,
394 const bool force =
true);
477 std_cxx11::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim> > cell_data;
478 std_cxx11::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim> > boundary_data;
479 std_cxx11::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim> > face_data;
503 template <
class DOFINFO>
522 template <
class DOFINFO>
553 template<
int dim,
int sdim>
560 n_components(
numbers::invalid_unsigned_int)
564 template<
int dim,
int sdim>
568 multigrid(other.multigrid),
569 values(other.values),
570 gradients(other.gradients),
571 hessians(other.hessians),
572 global_data(other.global_data),
573 fe_pointer(other.fe_pointer),
574 n_components(other.n_components)
577 for (
unsigned int i=0; i<other.
fevalv.size(); ++i)
585 fevalv[i] = std_cxx11::shared_ptr<FEValuesBase<dim,sdim> > (
589 fevalv[i] = std_cxx11::shared_ptr<FEValuesBase<dim,sdim> > (
592 fevalv[i] = std_cxx11::shared_ptr<FEValuesBase<dim,sdim> > (
601 template<
int dim,
int sdim>
602 template <
class FEVALUES>
612 if (block_info == 0 || block_info->
local().
size() == 0)
615 fevalv[0] = std_cxx11::shared_ptr<FEValuesBase<dim,sdim> > (
616 new FEVALUES (mapping, el, quadrature, flags));
621 for (
unsigned int i=0; i<fevalv.size(); ++i)
623 fevalv[i] = std_cxx11::shared_ptr<FEValuesBase<dim,sdim> > (
624 new FEVALUES (mapping, el.
base_element(i), quadrature, flags));
631 template <
int dim,
int spacedim>
639 template <
int dim,
int spacedim>
648 template <
int dim,
int spacedim>
657 template <
int dim,
int spacedim>
658 template <
typename number>
662 for (
unsigned int i=0; i<fevalv.size(); ++i)
685 const bool split_fevalues = info.
block_info != 0;
686 if (!global_data->empty())
687 fill_local_data(info, split_fevalues);
695 template <
int dim,
int sdim>
704 if (force || cell_quadrature.size() == 0)
706 if (force || boundary_quadrature.size() == 0)
708 if (force || face_quadrature.size() == 0)
713 template <
int dim,
int sdim>
718 add_update_flags(flags,
true,
true,
true,
true);
722 template <
int dim,
int sdim>
727 add_update_flags(flags,
true,
false,
false,
false);
731 template <
int dim,
int sdim>
736 add_update_flags(flags,
false,
true,
false,
false);
740 template <
int dim,
int sdim>
745 add_update_flags(flags,
false,
false,
true,
true);
749 template <
int dim,
int sdim>
757 initialize_update_flags();
758 initialize_gauss_quadrature(
763 cell.template initialize<FEValues<dim,sdim> >(el, mapping, cell_quadrature,
764 cell_flags, block_info);
765 boundary.template initialize<FEFaceValues<dim,sdim> >(el, mapping, boundary_quadrature,
766 boundary_flags, block_info);
767 face.template initialize<FEFaceValues<dim,sdim> >(el, mapping, face_quadrature,
768 face_flags, block_info);
769 subface.template initialize<FESubfaceValues<dim,sdim> >(el, mapping, face_quadrature,
770 face_flags, block_info);
771 neighbor.template initialize<FEFaceValues<dim,sdim> >(el, mapping, face_quadrature,
772 neighbor_flags, block_info);
776 template <
int dim,
int sdim>
777 template <
typename VectorType>
786 initialize(el, mapping, block_info);
787 std_cxx11::shared_ptr<VectorData<VectorType, dim, sdim> > p;
796 cell.initialize_data(p);
802 boundary.initialize_data(p);
808 face.initialize_data(p);
809 subface.initialize_data(p);
810 neighbor.initialize_data(p);
813 template <
int dim,
int sdim>
814 template <
typename VectorType>
823 initialize(el, mapping, block_info);
824 std_cxx11::shared_ptr<MGVectorData<VectorType, dim, sdim> > p;
833 cell.initialize_data(p);
839 boundary.initialize_data(p);
845 face.initialize_data(p);
846 subface.initialize_data(p);
847 neighbor.initialize_data(p);
850 template <
int dim,
int sdim>
851 template <
class DOFINFO>
857 template <
int dim,
int sdim>
858 template <
class DOFINFO>
866 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
#define AssertDimension(dim1, dim2)
void initialize(const FiniteElement< dim, spacedim > &el, const Mapping< dim, spacedim > &mapping, const BlockInfo *block_info=0)
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.
std::vector< std::vector< std::vector< Tensor< 1, dim > > > > gradients
const BlockIndices & local() const
std::size_t memory_consumption() const
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()
void initialize_update_flags(bool neighbor_geometry=false)
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=0)
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
MeshWorker::VectorSelector cell_selector
#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
void initialize_data(const std_cxx11::shared_ptr< VectorDataBase< dim, spacedim > > &data)
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
std::vector< std_cxx11::shared_ptr< FEValuesBase< dim, spacedim > > > fevalv
vector of FEValues objects
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
std::vector< std::vector< std::vector< Tensor< 2, dim > > > > hessians
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
std_cxx11::shared_ptr< VectorDataBase< dim, spacedim > > global_data
MeshWorker::VectorSelector face_selector
unsigned int tensor_degree() const
static ::ExceptionBase & ExcInternalError()