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_vector.h> 36 #include <deal.II/lac/vector.h> 40 DEAL_II_NAMESPACE_OPEN
43 template <
typename DoFHandlerType,
bool lda>
44 template <
class InputVector,
typename number>
47 const InputVector &values,
49 const unsigned int fe_index)
const 51 if (!this->has_children())
56 if ((
dynamic_cast<DoFHandler<DoFHandlerType::dimension,
57 DoFHandlerType::space_dimension
> *>(
58 this->dof_handler) !=
nullptr) ||
62 (fe_index == this->active_fe_index()) ||
63 (fe_index == DoFHandlerType::default_fe_index))
64 this->get_dof_values(values, interpolated_values);
71 this->get_dof_values(values, tmp);
74 this->dof_handler->get_fe(fe_index).dofs_per_cell,
75 this->get_fe().dofs_per_cell);
76 this->dof_handler->get_fe(fe_index).get_interpolation_matrix(
77 this->get_fe(), interpolation);
78 interpolation.
vmult(interpolated_values, tmp);
92 DoFHandlerType::space_dimension
> *>(
93 this->dof_handler) !=
nullptr) ||
94 (fe_index != DoFHandlerType::default_fe_index),
96 "You cannot call this function on non-active cells " 97 "of hp::DoFHandler objects unless you provide an explicit " 98 "finite element index because they do not have naturally " 99 "associated finite element spaces associated: degrees " 100 "of freedom are only distributed on active cells for which " 101 "the active_fe_index has been set."));
104 this->get_dof_handler().get_fe(fe_index);
107 Assert(this->dof_handler !=
nullptr,
108 typename BaseClass::ExcInvalidObject());
109 Assert(interpolated_values.
size() == dofs_per_cell,
110 typename BaseClass::ExcVectorDoesNotMatch());
111 Assert(values.size() == this->dof_handler->n_dofs(),
112 typename BaseClass::ExcVectorDoesNotMatch());
125 interpolated_values = 0;
152 for (
unsigned int child = 0; child < this->n_children(); ++child)
158 this->child(child)->get_interpolated_dof_values(values,
166 for (
unsigned int i = 0; i < dofs_per_cell; ++i)
168 interpolated_values(i) += tmp2(i);
169 else if (tmp2(i) != number())
170 interpolated_values(i) = tmp2(i);
179 #include "dof_accessor_get.inst" 181 DEAL_II_NAMESPACE_CLOSE
void get_interpolated_dof_values(const InputVector &values, Vector< number > &interpolated_values, const unsigned int fe_index=DoFHandlerType::default_fe_index) const
void vmult(Vector< number2 > &w, const Vector< number2 > &v, const bool adding=false) const
static::ExceptionBase & ExcMessage(std::string arg1)
#define Assert(cond, exc)
const unsigned int dofs_per_cell
bool restriction_is_additive(const unsigned int index) const
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const