16 #include <deal.II/lac/vector.h> 17 #include <deal.II/lac/block_vector.h> 18 #include <deal.II/lac/parallel_vector.h> 19 #include <deal.II/lac/parallel_block_vector.h> 20 #include <deal.II/lac/petsc_vector.h> 21 #include <deal.II/lac/petsc_block_vector.h> 22 #include <deal.II/lac/trilinos_vector.h> 23 #include <deal.II/lac/trilinos_block_vector.h> 24 #include <deal.II/lac/sparse_matrix.h> 26 #include <deal.II/dofs/dof_accessor.h> 27 #include <deal.II/dofs/dof_handler.h> 28 #include <deal.II/dofs/dof_levels.h> 29 #include <deal.II/hp/dof_handler.h> 30 #include <deal.II/grid/tria_boundary.h> 31 #include <deal.II/grid/tria_iterator.h> 32 #include <deal.II/grid/tria_iterator.templates.h> 33 #include <deal.II/fe/fe.h> 37 DEAL_II_NAMESPACE_OPEN
40 template <
typename DoFHandlerType,
bool lda>
41 template <
class OutputVector,
typename number>
46 const unsigned int fe_index)
const 48 if (!this->has_children() && !this->is_artificial ())
57 (fe_index == this->active_fe_index())
59 (fe_index == DoFHandlerType::default_fe_index))
61 this->set_dof_values (local_values, values);
64 Assert (local_values.
size() == this->dof_handler->get_fe()[fe_index].dofs_per_cell,
65 ExcMessage (
"Incorrect size of local_values vector.") );
67 FullMatrix<double> interpolation (this->get_fe().dofs_per_cell, this->dof_handler->get_fe()[fe_index].dofs_per_cell);
69 this->get_fe().get_interpolation_matrix (this->dof_handler->get_fe()[fe_index],
76 if ((tmp.
size() > 0) && (local_values.
size() > 0))
77 interpolation.vmult (tmp, local_values);
80 this->set_dof_values (tmp, values);
90 (fe_index != DoFHandlerType::default_fe_index),
91 ExcMessage (
"You cannot call this function on non-active cells " 92 "of hp::DoFHandler objects unless you provide an explicit " 93 "finite element index because they do not have naturally " 94 "associated finite element spaces associated: degrees " 95 "of freedom are only distributed on active cells for which " 96 "the active_fe_index has been set."));
101 Assert (this->dof_handler != 0,
102 typename BaseClass::ExcInvalidObject());
104 typename BaseClass::ExcVectorDoesNotMatch());
105 Assert (values.size() == this->dof_handler->n_dofs(),
106 typename BaseClass::ExcVectorDoesNotMatch());
110 for (
unsigned int child=0; child<this->n_children(); ++child)
114 .vmult (tmp, local_values);
115 this->child(child)->set_dof_values_by_interpolation (tmp, values, fe_index);
123 #include "dof_accessor_set.inst" 125 DEAL_II_NAMESPACE_CLOSE
::ExceptionBase & ExcMessage(std::string arg1)
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
#define Assert(cond, exc)
const unsigned int dofs_per_cell