23 #include <deal.II/grid/tria_iterator.templates.h> 45 template <
typename DoFHandlerType,
bool lda>
46 template <
class OutputVector,
typename number>
50 OutputVector & values,
51 const unsigned int fe_index)
const 53 if (this->is_active() && !this->is_artificial())
55 if ((
dynamic_cast<DoFHandler<DoFHandlerType::dimension,
56 DoFHandlerType::space_dimension
> *>(
57 this->dof_handler) !=
nullptr) ||
61 (fe_index == this->active_fe_index()) ||
62 (fe_index == DoFHandlerType::default_fe_index))
64 this->set_dof_values(local_values, values);
68 this->dof_handler->get_fe(fe_index).dofs_per_cell,
69 ExcMessage(
"Incorrect size of local_values vector."));
72 this->get_fe().dofs_per_cell,
73 this->dof_handler->get_fe(fe_index).dofs_per_cell);
75 this->get_fe().get_interpolation_matrix(
76 this->dof_handler->get_fe(fe_index), interpolation);
82 if ((tmp.
size() > 0) && (local_values.
size() > 0))
83 interpolation.vmult(tmp, local_values);
86 this->set_dof_values(tmp, values);
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());
111 typename BaseClass::ExcVectorDoesNotMatch());
112 Assert(values.size() == this->dof_handler->n_dofs(),
113 typename BaseClass::ExcVectorDoesNotMatch());
117 for (
unsigned int child = 0; child < this->n_children(); ++child)
121 .vmult(tmp, local_values);
122 this->child(child)->set_dof_values_by_interpolation(tmp,
132 #include "dof_accessor_set.inst"
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)
#define DEAL_II_NAMESPACE_CLOSE
const unsigned int dofs_per_cell
#define DEAL_II_NAMESPACE_OPEN