16 #include <deal.II/dofs/dof_accessor.h> 17 #include <deal.II/dofs/dof_handler.h> 18 #include <deal.II/dofs/dof_levels.h> 20 #include <deal.II/fe/fe.h> 22 #include <deal.II/grid/tria_iterator.h> 23 #include <deal.II/grid/tria_iterator.templates.h> 25 #include <deal.II/hp/dof_handler.h> 27 #include <deal.II/lac/block_vector.h> 28 #include <deal.II/lac/la_parallel_block_vector.h> 29 #include <deal.II/lac/la_parallel_vector.h> 30 #include <deal.II/lac/la_vector.h> 31 #include <deal.II/lac/petsc_block_vector.h> 32 #include <deal.II/lac/petsc_vector.h> 33 #include <deal.II/lac/sparse_matrix.h> 34 #include <deal.II/lac/trilinos_parallel_block_vector.h> 35 #include <deal.II/lac/trilinos_tpetra_vector.h> 36 #include <deal.II/lac/trilinos_vector.h> 37 #include <deal.II/lac/vector.h> 41 DEAL_II_NAMESPACE_OPEN
44 template <
typename DoFHandlerType,
bool lda>
45 template <
class InputVector,
typename number>
48 const InputVector &values,
50 const unsigned int fe_index)
const 52 if (!this->has_children())
57 if ((
dynamic_cast<DoFHandler<DoFHandlerType::dimension,
58 DoFHandlerType::space_dimension
> *>(
59 this->dof_handler) !=
nullptr) ||
63 (fe_index == this->active_fe_index()) ||
64 (fe_index == DoFHandlerType::default_fe_index))
65 this->get_dof_values(values, interpolated_values);
72 this->get_dof_values(values, tmp);
75 this->dof_handler->get_fe(fe_index).dofs_per_cell,
76 this->get_fe().dofs_per_cell);
77 this->dof_handler->get_fe(fe_index).get_interpolation_matrix(
78 this->get_fe(), interpolation);
79 interpolation.
vmult(interpolated_values, tmp);
93 DoFHandlerType::space_dimension
> *>(
94 this->dof_handler) !=
nullptr) ||
95 (fe_index != DoFHandlerType::default_fe_index),
97 "You cannot call this function on non-active cells " 98 "of hp::DoFHandler objects unless you provide an explicit " 99 "finite element index because they do not have naturally " 100 "associated finite element spaces associated: degrees " 101 "of freedom are only distributed on active cells for which " 102 "the active_fe_index has been set."));
105 this->get_dof_handler().get_fe(fe_index);
108 Assert(this->dof_handler !=
nullptr,
109 typename BaseClass::ExcInvalidObject());
110 Assert(interpolated_values.
size() == dofs_per_cell,
111 typename BaseClass::ExcVectorDoesNotMatch());
112 Assert(values.size() == this->dof_handler->n_dofs(),
113 typename BaseClass::ExcVectorDoesNotMatch());
126 interpolated_values = 0;
153 for (
unsigned int child = 0; child < this->n_children(); ++child)
159 this->child(child)->get_interpolated_dof_values(values,
167 for (
unsigned int i = 0; i < dofs_per_cell; ++i)
169 interpolated_values(i) += tmp2(i);
170 else if (tmp2(i) != number())
171 interpolated_values(i) = tmp2(i);
180 #include "dof_accessor_get.inst" 182 DEAL_II_NAMESPACE_CLOSE
bool restriction_is_additive(const unsigned int index) const
void vmult(Vector< number2 > &w, const Vector< number2 > &v, const bool adding=false) const
void get_interpolated_dof_values(const InputVector &values, Vector< number > &interpolated_values, const unsigned int fe_index=DoFHandlerType::default_fe_index) const
static ::ExceptionBase & ExcMessage(std::string arg1)
#define Assert(cond, exc)
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
const unsigned int dofs_per_cell