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 OutputVector,
typename number>
49 OutputVector & values,
50 const unsigned int fe_index)
const 52 if (!this->has_children() && !this->is_artificial())
54 if ((
dynamic_cast<DoFHandler<DoFHandlerType::dimension,
55 DoFHandlerType::space_dimension
> *>(
56 this->dof_handler) !=
nullptr) ||
60 (fe_index == this->active_fe_index()) ||
61 (fe_index == DoFHandlerType::default_fe_index))
63 this->set_dof_values(local_values, values);
67 this->dof_handler->get_fe(fe_index).dofs_per_cell,
68 ExcMessage(
"Incorrect size of local_values vector."));
71 this->get_fe().dofs_per_cell,
72 this->dof_handler->get_fe(fe_index).dofs_per_cell);
74 this->get_fe().get_interpolation_matrix(
75 this->dof_handler->get_fe(fe_index), interpolation);
81 if ((tmp.
size() > 0) && (local_values.
size() > 0))
82 interpolation.vmult(tmp, local_values);
85 this->set_dof_values(tmp, values);
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());
110 typename BaseClass::ExcVectorDoesNotMatch());
111 Assert(values.size() == this->dof_handler->n_dofs(),
112 typename BaseClass::ExcVectorDoesNotMatch());
116 for (
unsigned int child = 0; child < this->n_children(); ++child)
120 .vmult(tmp, local_values);
121 this->child(child)->set_dof_values_by_interpolation(tmp,
131 #include "dof_accessor_set.inst" 133 DEAL_II_NAMESPACE_CLOSE
void set_dof_values_by_interpolation(const Vector< number > &local_values, OutputVector &values, const unsigned int fe_index=DoFHandlerType::default_fe_index) const
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
static ::ExceptionBase & ExcMessage(std::string arg1)
#define Assert(cond, exc)
const unsigned int dofs_per_cell