/**
* Return the indices of the dofs of this
- * quad in the standard ordering: dofs
+ * object in the standard ordering: dofs
* on vertex 0, dofs on vertex 1, etc,
* dofs on line 0, dofs on line 1, etc,
* dofs on quad 0, etc.
* inactive edges do not have
* degrees of freedom associated
* with them at all.
- */
- void get_dof_indices (std::vector<unsigned int> &dof_indices) const;
-
- /**
- * Return the values of the given vector
- * restricted to the dofs of this
- * cell in the standard ordering: dofs
- * on vertex 0, dofs on vertex 1, etc,
- * dofs on line 0, dofs on line 1, etc,
- * dofs on quad 0, etc.
- *
- * The vector has to have the
- * right size before being passed
- * to this function. This
- * function is only callable for
- * active cells.
- *
- * The input vector may be either a
- * <tt>Vector<float></tt>,
- * Vector<double>, or a
- * BlockVector<double>, or a
- * PETSc vector if deal.II is compiled to
- * support PETSc. It is in the
- * responsibility of the caller to assure
- * that the types of the numbers stored
- * in input and output vectors are
- * compatible and with similar accuracy.
- */
- template <class InputVector, typename number>
- void get_dof_values (const InputVector &values,
- Vector<number> &local_values) const;
-
- /**
- * This function is the counterpart to
- * get_dof_values(): it takes a vector
- * of values for the degrees of freedom
- * of the cell pointed to by this iterator
- * and writes these values into the global
- * data vector @p values. This function
- * is only callable for active cells.
*
- * Note that for continuous finite
- * elements, calling this function affects
- * the dof values on neighboring cells as
- * well. It may also violate continuity
- * requirements for hanging nodes, if
- * neighboring cells are less refined than
- * the present one. These requirements
- * are not taken care of and must be
- * enforced by the user afterwards.
+ * The last argument denotes the
+ * finite element index. For the
+ * standard ::DoFHandler class,
+ * this value must be equal to
+ * its default value since that
+ * class only supports the same
+ * finite element on all cells
+ * anyway.
*
- * The vector has to have the
- * right size before being passed
- * to this function.
+ * However, for hp objects
+ * (i.e. the hp::DoFHandler
+ * class), different finite
+ * element objects may be used on
+ * different cells. On faces
+ * between two cells, as well as
+ * vertices, there may therefore
+ * be two sets of degrees of
+ * freedom, one for each of the
+ * finite elements used on the
+ * adjacent cells. In order to
+ * specify which set of degrees
+ * of freedom to work on, the
+ * last argument is used to
+ * disambiguate. Finally, if this
+ * function is called for a cell
+ * object, there can only be a
+ * single set of degrees of
+ * freedom, and fe_index has to
+ * match the result of
+ * active_fe_index().
*
- * The output vector may be either a
- * Vector<float>,
- * Vector<double>, or a
- * BlockVector<double>, or a
- * PETSc vector if deal.II is compiled to
- * support PETSc. It is in the
- * responsibility of the caller to assure
- * that the types of the numbers stored
- * in input and output vectors are
- * compatible and with similar accuracy.
- */
- template <class OutputVector, typename number>
- void set_dof_values (const Vector<number> &local_values,
- OutputVector &values) const;
-
+ * For cells, there is only a
+ * single possible finite element
+ * index (namely the one for that
+ * cell, returned by
+ * <code>cell-@>active_fe_index</code>. Consequently,
+ * the derived DoFCellAccessor
+ * class has an overloaded
+ * version of this function that
+ * calls the present function
+ * with
+ * <code>cell-@>active_fe_index</code>
+ * as last argument.
+ */
+ void get_dof_indices (std::vector<unsigned int> &dof_indices,
+ const unsigned int fe_index = DH::default_fe_index) const;
+
/**
* Pointer to the <i>i</i>th line
* bounding this Object.
/**
* Return the indices of the dofs of this
- * line in the standard ordering: dofs
- * on vertex 0, dofs on vertex 1,
- * dofs on line.
+ * object in the standard ordering: dofs
+ * on vertex 0, dofs on vertex 1, etc,
+ * dofs on line 0, dofs on line 1, etc,
+ * dofs on quad 0, etc.
*
- * It is assumed that the vector already
- * has the right size beforehand.
+ * The vector has to have the
+ * right size before being passed
+ * to this function.
*
* This function is most often
* used on active objects (edges,
* inactive edges do not have
* degrees of freedom associated
* with them at all.
- */
- void get_dof_indices (std::vector<unsigned int> &dof_indices) const;
-
- /**
- * Return the values of the given vector
- * restricted to the dofs of this
- * cell in the standard ordering: dofs
- * on vertex 0, dofs on vertex 1, etc,
- * dofs on line 0, dofs on line 1, etc,
- * dofs on quad 0, etc.
- *
- * It is assumed that the vector already
- * has the right size beforehand. This
- * function is only callable for active
- * cells.
- *
- * The input vector may be either a
- * Vector<float>,
- * Vector<double>, or a
- * BlockVector<double>, or a
- * PETSc vector if deal.II is compiled to
- * support PETSc. It is in the
- * responsibility of the caller to assure
- * that the types of the numbers stored
- * in input and output vectors are
- * compatible and with similar accuracy.
- */
- template <class InputVector, typename number>
- void get_dof_values (const InputVector &values,
- Vector<number> &local_values) const;
-
- /**
- * This function is the counterpart to
- * get_dof_values(): it takes a vector
- * of values for the degrees of freedom
- * of the cell pointed to by this iterator
- * and writes these values into the global
- * data vector @p values. This function
- * is only callable for active cells.
*
- * Note that for continuous finite
- * elements, calling this function affects
- * the dof values on neighboring cells as
- * well. It may also violate continuity
- * requirements for hanging nodes, if
- * neighboring cells are less refined than
- * the present one. These requirements
- * are not taken care of and must be
- * enforced by the user afterwards.
+ * The last argument denotes the
+ * finite element index. For the
+ * standard ::DoFHandler class,
+ * this value must be equal to
+ * its default value since that
+ * class only supports the same
+ * finite element on all cells
+ * anyway.
*
- * It is assumed that both vectors already
- * have the right size beforehand.
+ * However, for hp objects
+ * (i.e. the hp::DoFHandler
+ * class), different finite
+ * element objects may be used on
+ * different cells. On faces
+ * between two cells, as well as
+ * vertices, there may therefore
+ * be two sets of degrees of
+ * freedom, one for each of the
+ * finite elements used on the
+ * adjacent cells. In order to
+ * specify which set of degrees
+ * of freedom to work on, the
+ * last argument is used to
+ * disambiguate. Finally, if this
+ * function is called for a cell
+ * object, there can only be a
+ * single set of degrees of
+ * freedom, and fe_index has to
+ * match the result of
+ * active_fe_index().
*
- * The output vector may be either a
- * Vector<float>,
- * Vector<double>, or a
- * BlockVector<double>, or a
- * PETSc vector if deal.II is compiled to
- * support PETSc. It is in the
- * responsibility of the caller to assure
- * that the types of the numbers stored
- * in input and output vectors are
- * compatible and with similar accuracy.
+ * For cells, there is only a
+ * single possible finite element
+ * index (namely the one for that
+ * cell, returned by
+ * <code>cell-@>active_fe_index</code>. Consequently,
+ * the derived DoFCellAccessor
+ * class has an overloaded
+ * version of this function that
+ * calls the present function
+ * with
+ * <code>cell-@>active_fe_index</code>
+ * as last argument.
*/
- template <class OutputVector, typename number>
- void set_dof_values (const Vector<number> &local_values,
- OutputVector &values) const;
+ void get_dof_indices (std::vector<unsigned int> &dof_indices,
+ const unsigned int fe_index = DH::default_fe_index) const;
/**
* Return the @p ith child as a DoF line
/**
* Return the indices of the dofs of this
- * quad in the standard ordering: dofs
+ * object in the standard ordering: dofs
* on vertex 0, dofs on vertex 1, etc,
* dofs on line 0, dofs on line 1, etc,
* dofs on quad 0, etc.
*
- * It is assumed that the vector already
- * has the right size beforehand.
+ * The vector has to have the
+ * right size before being passed
+ * to this function.
*
* This function is most often
* used on active objects (edges,
* inactive edges do not have
* degrees of freedom associated
* with them at all.
- */
- void get_dof_indices (std::vector<unsigned int> &dof_indices) const;
-
- /**
- * Return the values of the given vector
- * restricted to the dofs of this
- * cell in the standard ordering: dofs
- * on vertex 0, dofs on vertex 1, etc,
- * dofs on line 0, dofs on line 1, etc,
- * dofs on quad 0, etc.
- *
- * It is assumed that the vector already
- * has the right size beforehand. This
- * function is only callable for active
- * cells.
- *
- * The input vector may be either a
- * Vector<float>,
- * Vector<double>, or a
- * BlockVector<double>, or a
- * PETSc vector if deal.II is compiled to
- * support PETSc. It is in the
- * responsibility of the caller to assure
- * that the types of the numbers stored
- * in input and output vectors are
- * compatible and with similar accuracy.
- */
- template <class InputVector, typename number>
- void get_dof_values (const InputVector &values,
- Vector<number> &local_values) const;
-
- /**
- * This function is the counterpart to
- * get_dof_values(): it takes a vector
- * of values for the degrees of freedom
- * of the cell pointed to by this iterator
- * and writes these values into the global
- * data vector @p values. This function
- * is only callable for active cells.
*
- * Note that for continuous finite
- * elements, calling this function affects
- * the dof values on neighboring cells as
- * well. It may also violate continuity
- * requirements for hanging nodes, if
- * neighboring cells are less refined than
- * the present one. These requirements
- * are not taken care of and must be
- * enforced by the user afterwards.
+ * The last argument denotes the
+ * finite element index. For the
+ * standard ::DoFHandler class,
+ * this value must be equal to
+ * its default value since that
+ * class only supports the same
+ * finite element on all cells
+ * anyway.
*
- * It is assumed that both vectors already
- * have the right size beforehand.
+ * However, for hp objects
+ * (i.e. the hp::DoFHandler
+ * class), different finite
+ * element objects may be used on
+ * different cells. On faces
+ * between two cells, as well as
+ * vertices, there may therefore
+ * be two sets of degrees of
+ * freedom, one for each of the
+ * finite elements used on the
+ * adjacent cells. In order to
+ * specify which set of degrees
+ * of freedom to work on, the
+ * last argument is used to
+ * disambiguate. Finally, if this
+ * function is called for a cell
+ * object, there can only be a
+ * single set of degrees of
+ * freedom, and fe_index has to
+ * match the result of
+ * active_fe_index().
*
- * The output vector may be either a
- * Vector<float>,
- * Vector<double>, or a
- * BlockVector<double>, or a
- * PETSc vector if deal.II is compiled to
- * support PETSc. It is in the
- * responsibility of the caller to assure
- * that the types of the numbers stored
- * in input and output vectors are
- * compatible and with similar accuracy.
- */
- template <class OutputVector, typename number>
- void set_dof_values (const Vector<number> &local_values,
- OutputVector &values) const;
+ * For cells, there is only a
+ * single possible finite element
+ * index (namely the one for that
+ * cell, returned by
+ * <code>cell-@>active_fe_index</code>. Consequently,
+ * the derived DoFCellAccessor
+ * class has an overloaded
+ * version of this function that
+ * calls the present function
+ * with
+ * <code>cell-@>active_fe_index</code>
+ * as last argument.
+ */
+ void get_dof_indices (std::vector<unsigned int> &dof_indices,
+ const unsigned int fe_index = DH::default_fe_index) const;
/**
* Return a pointer to the @p ith line
/**
* Return the indices of the dofs of this
- * hex in the standard ordering: dofs
+ * object in the standard ordering: dofs
* on vertex 0, dofs on vertex 1, etc,
* dofs on line 0, dofs on line 1, etc,
* dofs on quad 0, etc.
*
- * It is assumed that the vector already
- * has the right size beforehand.
+ * The vector has to have the
+ * right size before being passed
+ * to this function.
*
* This function is most often
* used on active objects (edges,
* inactive edges do not have
* degrees of freedom associated
* with them at all.
- */
- void get_dof_indices (std::vector<unsigned int> &dof_indices) const;
-
- /**
- * Return the values of the given vector
- * restricted to the dofs of this
- * cell in the standard ordering: dofs
- * on vertex 0, dofs on vertex 1, etc,
- * dofs on line 0, dofs on line 1, etc,
- * dofs on quad 0, etc.
- *
- * It is assumed that the vector already
- * has the right size beforehand. This
- * function is only callable for active
- * cells.
- *
- * The input vector may be either a
- * Vector<float>,
- * Vector<double>, or a
- * BlockVector<double>, or a
- * PETSc vector if deal.II is compiled to
- * support PETSc. It is in the
- * responsibility of the caller to assure
- * that the types of the numbers stored
- * in input and output vectors are
- * compatible and with similar accuracy.
- */
- template <class InputVector, typename number>
- void get_dof_values (const InputVector &values,
- Vector<number> &local_values) const;
-
- /**
- * This function is the counterpart to
- * get_dof_values(): it takes a vector
- * of values for the degrees of freedom
- * of the cell pointed to by this iterator
- * and writes these values into the global
- * data vector @p values. This function
- * is only callable for active cells.
*
- * Note that for continuous finite
- * elements, calling this function affects
- * the dof values on neighboring cells as
- * well. It may also violate continuity
- * requirements for hanging nodes, if
- * neighboring cells are less refined than
- * the present one. These requirements
- * are not taken care of and must be
- * enforced by the user afterwards.
+ * The last argument denotes the
+ * finite element index. For the
+ * standard ::DoFHandler class,
+ * this value must be equal to
+ * its default value since that
+ * class only supports the same
+ * finite element on all cells
+ * anyway.
*
- * It is assumed that both vectors already
- * have the right size beforehand.
+ * However, for hp objects
+ * (i.e. the hp::DoFHandler
+ * class), different finite
+ * element objects may be used on
+ * different cells. On faces
+ * between two cells, as well as
+ * vertices, there may therefore
+ * be two sets of degrees of
+ * freedom, one for each of the
+ * finite elements used on the
+ * adjacent cells. In order to
+ * specify which set of degrees
+ * of freedom to work on, the
+ * last argument is used to
+ * disambiguate. Finally, if this
+ * function is called for a cell
+ * object, there can only be a
+ * single set of degrees of
+ * freedom, and fe_index has to
+ * match the result of
+ * active_fe_index().
*
- * The output vector may be either a
- * Vector<float>,
- * Vector<double>, or a
- * BlockVector<double>, or a
- * PETSc vector if deal.II is compiled to
- * support PETSc. It is in the
- * responsibility of the caller to assure
- * that the types of the numbers stored
- * in input and output vectors are
- * compatible and with similar accuracy.
- */
- template <class OutputVector, typename number>
- void set_dof_values (const Vector<number> &local_values,
- OutputVector &values) const;
+ * For cells, there is only a
+ * single possible finite element
+ * index (namely the one for that
+ * cell, returned by
+ * <code>cell-@>active_fe_index</code>. Consequently,
+ * the derived DoFCellAccessor
+ * class has an overloaded
+ * version of this function that
+ * calls the present function
+ * with
+ * <code>cell-@>active_fe_index</code>
+ * as last argument.
+ */
+ void get_dof_indices (std::vector<unsigned int> &dof_indices,
+ const unsigned int fe_index = DH::default_fe_index) const;
/**
* Return a pointer to the @p ith line
neighbor_child_on_subface (const unsigned int face_no,
const unsigned int subface_no) const;
+ /**
+ * Return the values of the given vector
+ * restricted to the dofs of this
+ * cell in the standard ordering: dofs
+ * on vertex 0, dofs on vertex 1, etc,
+ * dofs on line 0, dofs on line 1, etc,
+ * dofs on quad 0, etc.
+ *
+ * The vector has to have the
+ * right size before being passed
+ * to this function. This
+ * function is only callable for
+ * active cells.
+ *
+ * The input vector may be either a
+ * <tt>Vector<float></tt>,
+ * Vector<double>, or a
+ * BlockVector<double>, or a
+ * PETSc vector if deal.II is compiled to
+ * support PETSc. It is in the
+ * responsibility of the caller to assure
+ * that the types of the numbers stored
+ * in input and output vectors are
+ * compatible and with similar accuracy.
+ */
+ template <class InputVector, typename number>
+ void get_dof_values (const InputVector &values,
+ Vector<number> &local_values) const;
+
+ /**
+ * This function is the counterpart to
+ * get_dof_values(): it takes a vector
+ * of values for the degrees of freedom
+ * of the cell pointed to by this iterator
+ * and writes these values into the global
+ * data vector @p values. This function
+ * is only callable for active cells.
+ *
+ * Note that for continuous finite
+ * elements, calling this function affects
+ * the dof values on neighboring cells as
+ * well. It may also violate continuity
+ * requirements for hanging nodes, if
+ * neighboring cells are less refined than
+ * the present one. These requirements
+ * are not taken care of and must be
+ * enforced by the user afterwards.
+ *
+ * The vector has to have the
+ * right size before being passed
+ * to this function.
+ *
+ * The output vector may be either a
+ * Vector<float>,
+ * Vector<double>, or a
+ * BlockVector<double>, or a
+ * PETSc vector if deal.II is compiled to
+ * support PETSc. It is in the
+ * responsibility of the caller to assure
+ * that the types of the numbers stored
+ * in input and output vectors are
+ * compatible and with similar accuracy.
+ */
+ template <class OutputVector, typename number>
+ void set_dof_values (const Vector<number> &local_values,
+ OutputVector &values) const;
+
/**
* Return the interpolation of
* the given finite element
this->present_level,
this->line_index (i),
this->dof_handler
- );
+ );
}
this->present_level,
l->index(),
this->dof_handler
- );
+ );
}
this->present_level,
this->quad_index (i),
this->dof_handler
- );
+ );
}
template <>
inline
void
-DoFObjectAccessor<1,DoFHandler<1> >::get_dof_indices (std::vector<unsigned int> &dof_indices) const
+DoFObjectAccessor<1,DoFHandler<1> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
+ const unsigned int fe_index) const
{
+ Assert (fe_index == DoFHandler<1>::default_fe_index,
+ ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
ExcMessage ("DoFHandler not initialized"));
template <>
inline
void
-DoFObjectAccessor<1,DoFHandler<2> >::get_dof_indices (std::vector<unsigned int> &dof_indices) const
+DoFObjectAccessor<1,DoFHandler<2> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
+ const unsigned int fe_index) const
{
+ Assert (fe_index == DoFHandler<2>::default_fe_index,
+ ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
ExcMessage ("DoFHandler not initialized"));
template <>
inline
void
-DoFObjectAccessor<1,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices) const
+DoFObjectAccessor<1,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
+ const unsigned int fe_index) const
{
+ Assert (fe_index == DoFHandler<3>::default_fe_index,
+ ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
ExcMessage ("DoFHandler not initialized"));
template <>
inline
void
-DoFObjectAccessor<2,DoFHandler<2> >::get_dof_indices (std::vector<unsigned int> &dof_indices) const
+DoFObjectAccessor<2,DoFHandler<2> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
+ const unsigned int fe_index) const
{
+ Assert (fe_index == DoFHandler<2>::default_fe_index,
+ ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
Assert (this->dof_handler != 0,
DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
Assert (&this->dof_handler->get_fe() != 0,
template <>
inline
void
-DoFObjectAccessor<2,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices) const
+DoFObjectAccessor<2,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
+ const unsigned int fe_index) const
{
+ Assert (fe_index == DoFHandler<3>::default_fe_index,
+ ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
Assert (this->dof_handler != 0,
DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
Assert (&this->dof_handler->get_fe() != 0,
template <>
inline
void
-DoFObjectAccessor<3,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices) const
+DoFObjectAccessor<3,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
+ const unsigned int fe_index) const
{
+ Assert (fe_index == DoFHandler<3>::default_fe_index,
+ ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
Assert (this->dof_handler != 0,
DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
Assert (&this->dof_handler->get_fe() != 0,
template <>
inline
void
-DoFObjectAccessor<1,hp::DoFHandler<1> >::get_dof_indices (std::vector<unsigned int> &dof_indices) const
+DoFObjectAccessor<1,hp::DoFHandler<1> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
+ const unsigned int fe_index) const
{
Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
ExcMessage ("DoFHandler not initialized"));
Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
- Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[0].dofs_per_vertex +
- this->dof_handler->get_fe()[0].dofs_per_line),
+ Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
+ this->dof_handler->get_fe()[fe_index].dofs_per_line),
DoFAccessor<hp::DoFHandler<1> >::ExcVectorDoesNotMatch());
// this function really only makes
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->dof_handler->get_fe()[0].dofs_per_cell ==
- 2*this->dof_handler->get_fe()[0].dofs_per_vertex),
+ (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
+ 2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
DoFAccessor<hp::DoFHandler<1> >::ExcNotActive());
- const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
- dofs_per_line = this->dof_handler->get_fe()[0].dofs_per_line;
+ const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
+ dofs_per_line = this->dof_handler->get_fe()[fe_index].dofs_per_line;
std::vector<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<2; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
- *next++ = vertex_dof_index(vertex,d);
+ *next++ = vertex_dof_index(vertex,d,fe_index);
for (unsigned int d=0; d<dofs_per_line; ++d)
- *next++ = dof_index(d);
+ *next++ = dof_index(d,fe_index);
}
template <>
inline
void
-DoFObjectAccessor<1,hp::DoFHandler<2> >::get_dof_indices (std::vector<unsigned int> &dof_indices) const
+DoFObjectAccessor<1,hp::DoFHandler<2> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
+ const unsigned int fe_index) const
{
Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
ExcMessage ("DoFHandler not initialized"));
Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
- Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[0].dofs_per_vertex +
- this->dof_handler->get_fe()[0].dofs_per_line),
+ Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
+ this->dof_handler->get_fe()[fe_index].dofs_per_line),
DoFAccessor<hp::DoFHandler<2> >::ExcVectorDoesNotMatch());
// this function really only makes
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->dof_handler->get_fe()[0].dofs_per_cell ==
- 2*this->dof_handler->get_fe()[0].dofs_per_vertex),
+ (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
+ 2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
DoFAccessor<hp::DoFHandler<2> >::ExcNotActive());
- const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
- dofs_per_line = this->dof_handler->get_fe()[0].dofs_per_line;
+ const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
+ dofs_per_line = this->dof_handler->get_fe()[fe_index].dofs_per_line;
std::vector<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<2; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
- *next++ = vertex_dof_index(vertex,d);
+ *next++ = vertex_dof_index(vertex,d,fe_index);
for (unsigned int d=0; d<dofs_per_line; ++d)
- *next++ = dof_index(d);
+ *next++ = dof_index(d,fe_index);
}
template <>
inline
void
-DoFObjectAccessor<1,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices) const
+DoFObjectAccessor<1,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
+ const unsigned int fe_index) const
{
Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
ExcMessage ("DoFHandler not initialized"));
Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
- Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[0].dofs_per_vertex +
- this->dof_handler->get_fe()[0].dofs_per_line),
+ Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
+ this->dof_handler->get_fe()[fe_index].dofs_per_line),
DoFAccessor<hp::DoFHandler<3> >::ExcVectorDoesNotMatch());
// this function really only makes
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->dof_handler->get_fe()[0].dofs_per_cell ==
- 2*this->dof_handler->get_fe()[0].dofs_per_vertex),
+ (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
+ 2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
DoFAccessor<hp::DoFHandler<3> >::ExcNotActive());
- const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
- dofs_per_line = this->dof_handler->get_fe()[0].dofs_per_line;
+ const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
+ dofs_per_line = this->dof_handler->get_fe()[fe_index].dofs_per_line;
std::vector<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<2; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
- *next++ = vertex_dof_index(vertex,d);
+ *next++ = vertex_dof_index(vertex,d,fe_index);
for (unsigned int d=0; d<dofs_per_line; ++d)
- *next++ = dof_index(d);
+ *next++ = dof_index(d,fe_index);
}
template <>
inline
void
-DoFObjectAccessor<2,hp::DoFHandler<2> >::get_dof_indices (std::vector<unsigned int> &dof_indices) const
+DoFObjectAccessor<2,hp::DoFHandler<2> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
+ const unsigned int fe_index) const
{
Assert (this->dof_handler != 0,
DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
- Assert (dof_indices.size() == (4*this->dof_handler->get_fe()[0].dofs_per_vertex +
- 4*this->dof_handler->get_fe()[0].dofs_per_line +
- this->dof_handler->get_fe()[0].dofs_per_quad),
+ Assert (dof_indices.size() == (4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
+ 4*this->dof_handler->get_fe()[fe_index].dofs_per_line +
+ this->dof_handler->get_fe()[fe_index].dofs_per_quad),
DoFAccessor<hp::DoFHandler<2> >::ExcVectorDoesNotMatch());
// this function really only makes
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->dof_handler->get_fe()[0].dofs_per_cell ==
- 4*this->dof_handler->get_fe()[0].dofs_per_vertex),
+ (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
+ 4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
DoFAccessor<hp::DoFHandler<2> >::ExcNotActive());
Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
ExcMessage ("DoFHandler not initialized"));
- const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
- dofs_per_line = this->dof_handler->get_fe()[0].dofs_per_line,
- dofs_per_quad = this->dof_handler->get_fe()[0].dofs_per_quad;
+ const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
+ dofs_per_line = this->dof_handler->get_fe()[fe_index].dofs_per_line,
+ dofs_per_quad = this->dof_handler->get_fe()[fe_index].dofs_per_quad;
std::vector<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<4; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
- *next++ = vertex_dof_index(vertex,d);
+ *next++ = vertex_dof_index(vertex,d,fe_index);
for (unsigned int line=0; line<4; ++line)
for (unsigned int d=0; d<dofs_per_line; ++d)
- *next++ = this->line(line)->dof_index(d);
+ *next++ = this->line(line)->dof_index(d,fe_index);
for (unsigned int d=0; d<dofs_per_quad; ++d)
- *next++ = dof_index(d);
+ *next++ = dof_index(d,fe_index);
}
template <>
inline
void
-DoFObjectAccessor<2,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices) const
+DoFObjectAccessor<2,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
+ const unsigned int fe_index) const
{
Assert (this->dof_handler != 0,
DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
- Assert (dof_indices.size() == (4*this->dof_handler->get_fe()[0].dofs_per_vertex +
- 4*this->dof_handler->get_fe()[0].dofs_per_line +
- this->dof_handler->get_fe()[0].dofs_per_quad),
+ Assert (dof_indices.size() == (4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
+ 4*this->dof_handler->get_fe()[fe_index].dofs_per_line +
+ this->dof_handler->get_fe()[fe_index].dofs_per_quad),
DoFAccessor<hp::DoFHandler<3> >::ExcVectorDoesNotMatch());
// this function really only makes
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->dof_handler->get_fe()[0].dofs_per_cell ==
- 4*this->dof_handler->get_fe()[0].dofs_per_vertex),
+ (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
+ 4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
DoFAccessor<hp::DoFHandler<3> >::ExcNotActive());
Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
ExcMessage ("DoFHandler not initialized"));
- const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
- dofs_per_line = this->dof_handler->get_fe()[0].dofs_per_line,
- dofs_per_quad = this->dof_handler->get_fe()[0].dofs_per_quad;
+ const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
+ dofs_per_line = this->dof_handler->get_fe()[fe_index].dofs_per_line,
+ dofs_per_quad = this->dof_handler->get_fe()[fe_index].dofs_per_quad;
std::vector<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<4; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
- *next++ = vertex_dof_index(vertex,d);
+ *next++ = vertex_dof_index(vertex,d,fe_index);
for (unsigned int line=0; line<4; ++line)
for (unsigned int d=0; d<dofs_per_line; ++d)
- *next++ = this->line(line)->dof_index(d);
+ *next++ = this->line(line)->dof_index(d,fe_index);
for (unsigned int d=0; d<dofs_per_quad; ++d)
- *next++ = dof_index(d);
+ *next++ = dof_index(d,fe_index);
}
template <>
inline
void
-DoFObjectAccessor<3,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices) const
+DoFObjectAccessor<3,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
+ const unsigned int fe_index) const
{
Assert (this->dof_handler != 0,
DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
- Assert (dof_indices.size() == (8*this->dof_handler->get_fe()[0].dofs_per_vertex +
- 12*this->dof_handler->get_fe()[0].dofs_per_line +
- 6*this->dof_handler->get_fe()[0].dofs_per_quad +
- this->dof_handler->get_fe()[0].dofs_per_hex),
+ Assert (dof_indices.size() == (8*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
+ 12*this->dof_handler->get_fe()[fe_index].dofs_per_line +
+ 6*this->dof_handler->get_fe()[fe_index].dofs_per_quad +
+ this->dof_handler->get_fe()[fe_index].dofs_per_hex),
DoFAccessor<hp::DoFHandler<3> >::ExcVectorDoesNotMatch());
Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
ExcMessage ("DoFHandler not initialized"));
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->dof_handler->get_fe()[0].dofs_per_cell ==
- 8*this->dof_handler->get_fe()[0].dofs_per_vertex),
+ (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
+ 8*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
DoFAccessor<hp::DoFHandler<3> >::ExcNotActive());
Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
ExcMessage ("DoFHandler not initialized"));
- const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
- dofs_per_line = this->dof_handler->get_fe()[0].dofs_per_line,
- dofs_per_quad = this->dof_handler->get_fe()[0].dofs_per_quad,
- dofs_per_hex = this->dof_handler->get_fe()[0].dofs_per_hex;
+ const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
+ dofs_per_line = this->dof_handler->get_fe()[fe_index].dofs_per_line,
+ dofs_per_quad = this->dof_handler->get_fe()[fe_index].dofs_per_quad,
+ dofs_per_hex = this->dof_handler->get_fe()[fe_index].dofs_per_hex;
std::vector<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<8; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
- *next++ = vertex_dof_index(vertex,d);
+ *next++ = vertex_dof_index(vertex,d,fe_index);
for (unsigned int line=0; line<12; ++line)
for (unsigned int d=0; d<dofs_per_line; ++d)
- *next++ = this->line(line)->dof_index(d);
+ *next++ = this->line(line)->dof_index(d,fe_index);
for (unsigned int quad=0; quad<6; ++quad)
for (unsigned int d=0; d<dofs_per_quad; ++d)
- *next++ = this->quad(quad)->dof_index(d);
+ *next++ = this->quad(quad)->dof_index(d,fe_index);
for (unsigned int d=0; d<dofs_per_hex; ++d)
- *next++ = dof_index(d);
+ *next++ = dof_index(d,fe_index);
}
get_dof_indices (std::vector<unsigned int> &dof_indices) const
{
// no caching for hp::DoFHandler implemented
- DoFObjectAccessor<dim,hp::DoFHandler<dim> >::get_dof_indices (dof_indices);
+ DoFObjectAccessor<dim,hp::DoFHandler<dim> >::get_dof_indices (dof_indices,
+ this->active_fe_index());
}
get_dof_indices (std::vector<unsigned int> &dof_indices) const
{
// no caching for hp::DoFHandler implemented
- DoFObjectAccessor<dim,hp::DoFHandler<dim> >::get_dof_indices (dof_indices);
+ DoFObjectAccessor<dim,hp::DoFHandler<dim> >::get_dof_indices (dof_indices,
+ this->active_fe_index());
}
+template <>
+inline
+void
+DoFCellAccessor<hp::DoFHandler<3> >::
+get_dof_indices (std::vector<unsigned int> &dof_indices) const
+{
+ // no caching for hp::DoFHandler implemented
+ DoFObjectAccessor<dim,hp::DoFHandler<dim> >::get_dof_indices (dof_indices,
+ this->active_fe_index());
+}
+
+
+
template <class DH>
inline
const FiniteElement<DH::dimension> &
-template <>
-inline
-void
-DoFCellAccessor<hp::DoFHandler<3> >::
-get_dof_indices (std::vector<unsigned int> &dof_indices) const
-{
- // no caching for hp::DoFHandler implemented
- DoFObjectAccessor<dim,hp::DoFHandler<dim> >::get_dof_indices (dof_indices);
-}
-
-
-
template <class DH>
template <typename number, typename OutputVector>
inline
-template <class DH>
-template <class InputVector, typename number>
-void
-DoFObjectAccessor<1,DH>::get_dof_values (const InputVector &values,
- Vector<number> &local_values) const
-{
- typedef DoFAccessor<DH> BaseClass;
-
- Assert (dim==1, ExcInternalError());
-
- Assert (this->dof_handler != 0, typename BaseClass::ExcInvalidObject());
- Assert (&this->dof_handler->get_fe() != 0,
- typename BaseClass::ExcInvalidObject());
- Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
- typename BaseClass::ExcVectorDoesNotMatch());
- Assert (values.size() == this->dof_handler->n_dofs(),
- typename BaseClass::ExcVectorDoesNotMatch());
- Assert (this->has_children() == false,
- typename BaseClass::ExcNotActive());
-
- const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
- dofs_per_line = this->dof_handler->get_fe().dofs_per_line;
- typename Vector<number>::iterator next_local_value=local_values.begin();
- for (unsigned int vertex=0; vertex<2; ++vertex)
- for (unsigned int d=0; d<dofs_per_vertex; ++d)
- *next_local_value++ = values(vertex_dof_index(vertex,d));
- for (unsigned int d=0; d<dofs_per_line; ++d)
- *next_local_value++ = values(dof_index(d));
-
- Assert (next_local_value == local_values.end(),
- ExcInternalError());
-}
-
-
-
-template <class DH>
-template <class OutputVector, typename number>
-void
-DoFObjectAccessor<1,DH>::set_dof_values (const Vector<number> &local_values,
- OutputVector &values) const
-{
- typedef DoFAccessor<DH> BaseClass;
-
- Assert (dim==1, ExcInternalError());
-
- Assert (this->dof_handler != 0, typename BaseClass::ExcInvalidObject());
- Assert (&this->dof_handler->get_fe() != 0,
- typename BaseClass::ExcInvalidObject());
- Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
- typename BaseClass::ExcVectorDoesNotMatch());
- Assert (values.size() == this->dof_handler->n_dofs(),
- typename BaseClass::ExcVectorDoesNotMatch());
- Assert (this->has_children() == false,
- typename BaseClass::ExcNotActive());
-
- const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
- dofs_per_line = this->dof_handler->get_fe().dofs_per_line;
- typename Vector<number>::const_iterator next_local_value=local_values.begin();
- for (unsigned int vertex=0; vertex<2; ++vertex)
- for (unsigned int d=0; d<dofs_per_vertex; ++d)
- values(vertex_dof_index(vertex,d)) = *next_local_value++;
- for (unsigned int d=0; d<dofs_per_line; ++d)
- values(dof_index(d)) = *next_local_value++;
-
- Assert (next_local_value == local_values.end(),
- ExcInternalError());
-}
-
-
-
/*------------------------- Functions: DoFObjectAccessor<2,dim> -----------------------*/
-template <class DH>
-template <class InputVector, typename number>
-void
-DoFObjectAccessor<2,DH>::get_dof_values (const InputVector &values,
- Vector<number> &local_values) const
-{
- typedef DoFAccessor<DH> BaseClass;
-
- Assert (dim==2, ExcInternalError());
-
- Assert (this->dof_handler != 0,
- typename BaseClass::ExcInvalidObject());
- Assert (&this->dof_handler->get_fe() != 0,
- typename BaseClass::ExcInvalidObject());
- Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
- typename BaseClass::ExcVectorDoesNotMatch());
- Assert (values.size() == this->dof_handler->n_dofs(),
- typename BaseClass::ExcVectorDoesNotMatch());
- Assert (this->has_children() == false,
- typename BaseClass::ExcNotActive());
-
- const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
- dofs_per_line = this->dof_handler->get_fe().dofs_per_line,
- dofs_per_quad = this->dof_handler->get_fe().dofs_per_quad;
- typename Vector<number>::iterator next_local_value=local_values.begin();
- for (unsigned int vertex=0; vertex<4; ++vertex)
- for (unsigned int d=0; d<dofs_per_vertex; ++d)
- *next_local_value++ = values(vertex_dof_index(vertex,d));
- for (unsigned int line=0; line<4; ++line)
- for (unsigned int d=0; d<dofs_per_line; ++d)
- *next_local_value++ = values(this->line(line)->dof_index(d));
- for (unsigned int d=0; d<dofs_per_quad; ++d)
- *next_local_value++ = values(dof_index(d));
-
- Assert (next_local_value == local_values.end(),
- ExcInternalError());
-}
-
-
-
-template <class DH>
-template <class OutputVector, typename number>
-void
-DoFObjectAccessor<2,DH>::set_dof_values (const Vector<number> &local_values,
- OutputVector &values) const
-{
- typedef DoFAccessor<DH> BaseClass;
-
- Assert (dim==2, ExcInternalError());
-
- Assert (this->dof_handler != 0,
- typename BaseClass::ExcInvalidObject());
- Assert (&this->dof_handler->get_fe() != 0,
- typename BaseClass::ExcInvalidObject());
- Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
- typename BaseClass::ExcVectorDoesNotMatch());
- Assert (values.size() == this->dof_handler->n_dofs(),
- typename BaseClass::ExcVectorDoesNotMatch());
- Assert (this->has_children() == false,
- typename BaseClass::ExcNotActive());
-
- const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
- dofs_per_line = this->dof_handler->get_fe().dofs_per_line,
- dofs_per_quad = this->dof_handler->get_fe().dofs_per_quad;
- typename Vector<number>::const_iterator next_local_value=local_values.begin();
- for (unsigned int vertex=0; vertex<4; ++vertex)
- for (unsigned int d=0; d<dofs_per_vertex; ++d)
- values(vertex_dof_index(vertex,d)) = *next_local_value++;
- for (unsigned int line=0; line<4; ++line)
- for (unsigned int d=0; d<dofs_per_line; ++d)
- values(this->line(line)->dof_index(d)) = *next_local_value++;
- for (unsigned int d=0; d<dofs_per_quad; ++d)
- values(dof_index(d)) = *next_local_value++;
-
- Assert (next_local_value == local_values.end(),
- ExcInternalError());
-}
-
-
/*------------------------- Functions: DoFObjectAccessor<3,dim> -----------------------*/
-template <class DH>
-template <class InputVector, typename number>
-void
-DoFObjectAccessor<3,DH>::get_dof_values (const InputVector &values,
- Vector<number> &local_values) const
-{
- typedef DoFAccessor<DH> BaseClass;
-
- Assert (dim==3, ExcInternalError());
-
- Assert (this->dof_handler != 0,
- typename BaseClass::ExcInvalidObject());
- Assert (&this->dof_handler->get_fe() != 0,
- typename BaseClass::ExcInvalidObject());
- Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
- typename BaseClass::ExcVectorDoesNotMatch());
- Assert (values.size() == this->dof_handler->n_dofs(),
- typename BaseClass::ExcVectorDoesNotMatch());
- Assert (this->has_children() == false,
- typename BaseClass::ExcNotActive());
-
- const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
- dofs_per_line = this->dof_handler->get_fe().dofs_per_line,
- dofs_per_quad = this->dof_handler->get_fe().dofs_per_quad,
- dofs_per_hex = this->dof_handler->get_fe().dofs_per_hex;
- typename Vector<number>::iterator next_local_value = local_values.begin();
- for (unsigned int vertex=0; vertex<GeometryInfo<3>::vertices_per_cell; ++vertex)
- for (unsigned int d=0; d<dofs_per_vertex; ++d)
- *next_local_value++ = values(vertex_dof_index(vertex,d));
- for (unsigned int line=0; line<GeometryInfo<3>::lines_per_cell; ++line)
- for (unsigned int d=0; d<dofs_per_line; ++d)
- *next_local_value++ = values(this->line(line)->dof_index(d));
- for (unsigned int quad=0; quad<GeometryInfo<3>::quads_per_cell; ++quad)
- for (unsigned int d=0; d<dofs_per_quad; ++d)
- *next_local_value++ = values(this->quad(quad)->dof_index(d));
- for (unsigned int d=0; d<dofs_per_hex; ++d)
- *next_local_value++ = values(dof_index(d));
-
- Assert (next_local_value == local_values.end(),
- ExcInternalError());
-}
-
-
-
-template <class DH>
-template <class OutputVector, typename number>
-void
-DoFObjectAccessor<3,DH>::set_dof_values (const Vector<number> &local_values,
- OutputVector &values) const
-{
- typedef DoFAccessor<DH> BaseClass;
-
- Assert (dim==3, ExcInternalError());
-
- Assert (this->dof_handler != 0,
- typename BaseClass::ExcInvalidObject());
- Assert (&this->dof_handler->get_fe() != 0,
- typename BaseClass::ExcInvalidObject());
- Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
- typename BaseClass::ExcVectorDoesNotMatch());
- Assert (values.size() == this->dof_handler->n_dofs(),
- typename BaseClass::ExcVectorDoesNotMatch());
- Assert (this->has_children() == false,
- typename BaseClass::ExcNotActive());
-
- const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
- dofs_per_line = this->dof_handler->get_fe().dofs_per_line,
- dofs_per_quad = this->dof_handler->get_fe().dofs_per_quad,
- dofs_per_hex = this->dof_handler->get_fe().dofs_per_hex;
- typename Vector<number>::const_iterator next_local_value=local_values.begin();
- for (unsigned int vertex=0; vertex<GeometryInfo<dim>::vertices_per_cell; ++vertex)
- for (unsigned int d=0; d<dofs_per_vertex; ++d)
- values(vertex_dof_index(vertex,d)) = *next_local_value++;
- for (unsigned int line=0; line<GeometryInfo<dim>::lines_per_cell; ++line)
- for (unsigned int d=0; d<dofs_per_line; ++d)
- values(this->line(line)->dof_index(d)) = *next_local_value++;
- for (unsigned int quad=0; quad<GeometryInfo<dim>::quads_per_cell; ++quad)
- for (unsigned int d=0; d<dofs_per_quad; ++d)
- values(this->quad(quad)->dof_index(d)) = *next_local_value++;
- for (unsigned int d=0; d<dofs_per_hex; ++d)
- values(dof_index(d)) = *next_local_value++;
-
- Assert (next_local_value == local_values.end(),
- ExcInternalError());
-}
-
-
// --------------- hp::DoFHandler specializations for 1d objects -----------
index);
}
-template <>
-template <class InputVector, typename number>
-void
-DoFObjectAccessor<1,hp::DoFHandler<1> >::get_dof_values (const InputVector &/*values*/,
- Vector<number> &/*local_values*/) const
-{
- Assert (false, ExcNotImplemented());
-}
-
-template <>
-template <class OutputVector, typename number>
-void
-DoFObjectAccessor<1,hp::DoFHandler<1> >::set_dof_values (const Vector<number> &/*local_values*/,
- OutputVector &/*values*/) const
-{
- Assert (false, ExcNotImplemented());
-}
#endif
index);
}
-template <>
-template <class InputVector, typename number>
-void
-DoFObjectAccessor<1,hp::DoFHandler<2> >::get_dof_values (const InputVector &/*values*/,
- Vector<number> &/*local_values*/) const
-{
- Assert (false, ExcNotImplemented());
-}
-
-template <>
-template <class InputVector, typename number>
-void
-DoFObjectAccessor<2,hp::DoFHandler<2> >::get_dof_values (const InputVector &/*values*/,
- Vector<number> &/*local_values*/) const
-{
- Assert (false, ExcNotImplemented());
-}
-
-template <>
-template <class OutputVector, typename number>
-void
-DoFObjectAccessor<1,hp::DoFHandler<2> >::set_dof_values (const Vector<number> &/*local_values*/,
- OutputVector &/*values*/) const
-{
- Assert (false, ExcNotImplemented());
-}
-
-
-template <>
-template <class OutputVector, typename number>
-void
-DoFObjectAccessor<2,hp::DoFHandler<2> >::set_dof_values (const Vector<number> &/*local_values*/,
- OutputVector &/*values*/) const
-{
- Assert (false, ExcNotImplemented());
-}
#endif
}
-template <>
-template <class InputVector, typename number>
-void
-DoFObjectAccessor<1,hp::DoFHandler<3> >::get_dof_values (const InputVector &/*values*/,
- Vector<number> &/*local_values*/) const
-{
- Assert (false, ExcNotImplemented());
-}
-
-template <>
-template <class InputVector, typename number>
-void
-DoFObjectAccessor<2,hp::DoFHandler<3> >::get_dof_values (const InputVector &/*values*/,
- Vector<number> &/*local_values*/) const
-{
- Assert (false, ExcNotImplemented());
-}
-
-
-template <>
-template <class InputVector, typename number>
-void
-DoFObjectAccessor<3,hp::DoFHandler<3> >::get_dof_values (const InputVector &/*values*/,
- Vector<number> &/*local_values*/) const
-{
- Assert (false, ExcNotImplemented());
-}
-
-
-template <>
-template <class OutputVector, typename number>
-void
-DoFObjectAccessor<1,hp::DoFHandler<3> >::set_dof_values (const Vector<number> &/*local_values*/,
- OutputVector &/*values*/) const
-{
- Assert (false, ExcNotImplemented());
-}
-
-template <>
-template <class OutputVector, typename number>
-void
-DoFObjectAccessor<2,hp::DoFHandler<3> >::set_dof_values (const Vector<number> &/*local_values*/,
- OutputVector &/*values*/) const
-{
- Assert (false, ExcNotImplemented());
-}
-
-template <>
-template <class OutputVector, typename number>
-void
-DoFObjectAccessor<3,hp::DoFHandler<3> >::set_dof_values (const Vector<number> &/*local_values*/,
- OutputVector &/*values*/) const
-{
- Assert (false, ExcNotImplemented());
-}
-
-
#endif
+template <class DH>
+template <class InputVector, typename number>
+void
+DoFCellAccessor<DH>::get_dof_values (const InputVector &values,
+ Vector<number> &local_values) const
+{
+//TODO[WB]: this function can be made more efficient using the fact that we have cached the result of get_dof_indices; we should therefore be able to get away without having to allocate memory
+
+ const unsigned int dofs_per_cell = this->get_fe().dofs_per_cell;
+
+ std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ this->get_dof_indices (local_dof_indices);
+
+ for (unsigned int i=0; i<dofs_per_cell; ++i)
+ local_values(i) = values(local_dof_indices[i]);
+}
+
+
+
+template <class DH>
+template <class OutputVector, typename number>
+void
+DoFCellAccessor<DH>::set_dof_values (const Vector<number> &local_values,
+ OutputVector &values) const
+{
+//TODO[WB]: this function can be made more efficient using the fact that we have cached the result of get_dof_indices; we should therefore be able to get away without having to allocate memory
+
+ const unsigned int dofs_per_cell = this->get_fe().dofs_per_cell;
+
+ std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ this->get_dof_indices (local_dof_indices);
+
+ for (unsigned int i=0; i<dofs_per_cell; ++i)
+ values(local_dof_indices[i]) = local_values(i);
+}
+
+
+
+
template <class DH>
template <class InputVector, typename number>
void
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::get_dof_values<Vector<double>,double>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::get_dof_values<Vector<double>,double>
(const Vector<double>&, Vector<double>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::set_dof_values<Vector<double>,double>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::set_dof_values<Vector<double>,double>
(const Vector<double>&, Vector<double>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::get_dof_values<Vector<double>,float>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::get_dof_values<Vector<double>,float>
(const Vector<double>&, Vector<float>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::set_dof_values<Vector<float>,double>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::set_dof_values<Vector<float>,double>
(const Vector<double>&, Vector<float>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::get_dof_values<Vector<float>,double>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::get_dof_values<Vector<float>,double>
(const Vector<float>&, Vector<double>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::set_dof_values<Vector<double>,float>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::set_dof_values<Vector<double>,float>
(const Vector<float>&, Vector<double>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::get_dof_values<Vector<float>,float>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::get_dof_values<Vector<float>,float>
(const Vector<float>&, Vector<float>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::set_dof_values<Vector<float>,float>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::set_dof_values<Vector<float>,float>
(const Vector<float>&, Vector<float>&) const;
// for block vector
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<double>,double>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<double>,double>
(const BlockVector<double> &, Vector<double>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<double>,double>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<double>,double>
(const Vector<double>&, BlockVector<double>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<double>,float>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<double>,float>
(const BlockVector<double> &, Vector<float>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<float>,double>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<float>,double>
(const Vector<double>&, BlockVector<float>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<float>,double>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<float>,double>
(const BlockVector<float> &, Vector<double>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<double>,float>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<double>,float>
(const Vector<float>&, BlockVector<double>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<float>,float>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<float>,float>
(const BlockVector<float>&, Vector<float>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<float>,float>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<float>,float>
(const Vector<float>&, BlockVector<float>&) const;
// for Petsc vectors
#ifdef DEAL_II_USE_PETSC
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::Vector,double>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::Vector,double>
(const PETScWrappers::Vector &, Vector<double>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::Vector,float>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::Vector,float>
(const PETScWrappers::Vector &, Vector<float>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::Vector,double>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::Vector,double>
(const Vector<double> &, PETScWrappers::Vector&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::Vector,float>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::Vector,float>
(const Vector<float>&, PETScWrappers::Vector&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::BlockVector,double>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::BlockVector,double>
(const PETScWrappers::BlockVector &, Vector<double>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::BlockVector,float>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::BlockVector,float>
(const PETScWrappers::BlockVector &, Vector<float>&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::BlockVector,double>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::BlockVector,double>
(const Vector<double> &, PETScWrappers::BlockVector&) const;
template
void
-DoFObjectAccessor<1,DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::BlockVector,float>
+DoFCellAccessor<DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::BlockVector,float>
(const Vector<float>&, PETScWrappers::BlockVector&) const;
#endif
-
-#if deal_II_dimension >= 2
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::get_dof_values<Vector<double>,double>
-(const Vector<double>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::set_dof_values<Vector<double>,double>
-(const Vector<double>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::get_dof_values<Vector<double>,float>
-(const Vector<double>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::set_dof_values<Vector<float>,double>
-(const Vector<double>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::get_dof_values<Vector<float>,double>
-(const Vector<float>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::set_dof_values<Vector<double>,float>
-(const Vector<float>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::get_dof_values<Vector<float>,float>
-(const Vector<float>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::set_dof_values<Vector<float>,float>
-(const Vector<float>&, Vector<float>&) const;
-
-
-// for block vector
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<double>,double>
-(const BlockVector<double>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<double>,double>
-(const Vector<double>&, BlockVector<double>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<double>,float>
-(const BlockVector<double>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<float>,double>
-(const Vector<double>&, BlockVector<float>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<float>,double>
-(const BlockVector<float>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<double>,float>
-(const Vector<float>&, BlockVector<double>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<float>,float>
-(const BlockVector<float>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<float>,float>
-(const Vector<float>&, BlockVector<float>&) const;
-
-// for Petsc vectors
-#ifdef DEAL_II_USE_PETSC
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::Vector,double>
-(const PETScWrappers::Vector &, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::Vector,float>
-(const PETScWrappers::Vector &, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::Vector,double>
-(const Vector<double> &, PETScWrappers::Vector&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::Vector,float>
-(const Vector<float>&, PETScWrappers::Vector&) const;
-
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::BlockVector,double>
-(const PETScWrappers::BlockVector &, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::BlockVector,float>
-(const PETScWrappers::BlockVector &, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::BlockVector,double>
-(const Vector<double> &, PETScWrappers::BlockVector&) const;
-template
-void
-DoFObjectAccessor<2,DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::BlockVector,float>
-(const Vector<float>&, PETScWrappers::BlockVector&) const;
-#endif
-#endif
-
-#if deal_II_dimension >= 3
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::get_dof_values<Vector<double>,double>
-(const Vector<double>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::set_dof_values<Vector<double>,double>
-(const Vector<double>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::get_dof_values<Vector<double>,float>
-(const Vector<double>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::set_dof_values<Vector<float>,double>
-(const Vector<double>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::get_dof_values<Vector<float>,double>
-(const Vector<float>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::set_dof_values<Vector<double>,float>
-(const Vector<float>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::get_dof_values<Vector<float>,float>
-(const Vector<float>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::set_dof_values<Vector<float>,float>
-(const Vector<float>&, Vector<float>&) const;
-
-
-
-// for block vector
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<double>,double>
-(const BlockVector<double>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<double>,double>
-(const Vector<double>&, BlockVector<double>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<double>,float>
-(const BlockVector<double>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<float>,double>
-(const Vector<double>&, BlockVector<float>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<float>,double>
-(const BlockVector<float>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<double>,float>
-(const Vector<float>&, BlockVector<double>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<float>,float>
-(const BlockVector<float>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<float>,float>
-(const Vector<float>&, BlockVector<float>&) const;
-
-// for Petsc vectors
-#if DEAL_II_USE_PETSC
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::Vector,double>
-(const PETScWrappers::Vector &, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::Vector,float>
-(const PETScWrappers::Vector &, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::Vector,double>
-(const Vector<double> &, PETScWrappers::Vector&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::Vector,float>
-(const Vector<float>&, PETScWrappers::Vector&) const;
-
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::BlockVector,double>
-(const PETScWrappers::BlockVector &, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::BlockVector,float>
-(const PETScWrappers::BlockVector &, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::BlockVector,double>
-(const Vector<double> &, PETScWrappers::BlockVector&) const;
-template
-void
-DoFObjectAccessor<3,DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::BlockVector,float>
-(const Vector<float>&, PETScWrappers::BlockVector&) const;
-#endif
-#endif
-
-
+
+
template
void
// --------------------------------------------------------------------------
// explicit instantiations (for hp::DoFHandler)
-
template
void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::get_dof_values<Vector<double>,double>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::get_dof_values<Vector<double>,double>
(const Vector<double>&, Vector<double>&) const;
template
void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::set_dof_values<Vector<double>,double>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::set_dof_values<Vector<double>,double>
(const Vector<double>&, Vector<double>&) const;
template
void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::get_dof_values<Vector<double>,float>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::get_dof_values<Vector<double>,float>
(const Vector<double>&, Vector<float>&) const;
template
void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::set_dof_values<Vector<float>,double>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::set_dof_values<Vector<float>,double>
(const Vector<double>&, Vector<float>&) const;
template
void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::get_dof_values<Vector<float>,double>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::get_dof_values<Vector<float>,double>
(const Vector<float>&, Vector<double>&) const;
template
void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::set_dof_values<Vector<double>,float>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::set_dof_values<Vector<double>,float>
(const Vector<float>&, Vector<double>&) const;
template
void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::get_dof_values<Vector<float>,float>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::get_dof_values<Vector<float>,float>
(const Vector<float>&, Vector<float>&) const;
template
void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::set_dof_values<Vector<float>,float>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::set_dof_values<Vector<float>,float>
(const Vector<float>&, Vector<float>&) const;
// for block vector
template
void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<double>,double>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<double>,double>
(const BlockVector<double> &, Vector<double>&) const;
template
void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<double>,double>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<double>,double>
(const Vector<double>&, BlockVector<double>&) const;
template
void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<double>,float>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<double>,float>
(const BlockVector<double> &, Vector<float>&) const;
template
void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<float>,double>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<float>,double>
(const Vector<double>&, BlockVector<float>&) const;
template
void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<float>,double>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<float>,double>
(const BlockVector<float> &, Vector<double>&) const;
template
void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<double>,float>
-(const Vector<float>&, BlockVector<double>&) const;
-template
-void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<float>,float>
-(const BlockVector<float>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<float>,float>
-(const Vector<float>&, BlockVector<float>&) const;
-
-// for Petsc vectors
-#if DEAL_II_USE_PETSC
-template
-void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::Vector,double>
-(const PETScWrappers::Vector &, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::Vector,float>
-(const PETScWrappers::Vector &, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::Vector,double>
-(const Vector<double> &, PETScWrappers::Vector&) const;
-template
-void
-DoFObjectAccessor<1,hp::DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::Vector,float>
-(const Vector<float>&, PETScWrappers::Vector&) const;
-#endif
-
-
-#if deal_II_dimension >= 2
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::get_dof_values<Vector<double>,double>
-(const Vector<double>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::set_dof_values<Vector<double>,double>
-(const Vector<double>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::get_dof_values<Vector<double>,float>
-(const Vector<double>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::set_dof_values<Vector<float>,double>
-(const Vector<double>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::get_dof_values<Vector<float>,double>
-(const Vector<float>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::set_dof_values<Vector<double>,float>
-(const Vector<float>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::get_dof_values<Vector<float>,float>
-(const Vector<float>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::set_dof_values<Vector<float>,float>
-(const Vector<float>&, Vector<float>&) const;
-
-
-// for block vector
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<double>,double>
-(const BlockVector<double>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<double>,double>
-(const Vector<double>&, BlockVector<double>&) const;
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<double>,float>
-(const BlockVector<double>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<float>,double>
-(const Vector<double>&, BlockVector<float>&) const;
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<float>,double>
-(const BlockVector<float>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<double>,float>
-(const Vector<float>&, BlockVector<double>&) const;
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<float>,float>
-(const BlockVector<float>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<float>,float>
-(const Vector<float>&, BlockVector<float>&) const;
-
-// for Petsc vectors
-#if DEAL_II_USE_PETSC
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::Vector,double>
-(const PETScWrappers::Vector &, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::Vector,float>
-(const PETScWrappers::Vector &, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::Vector,double>
-(const Vector<double> &, PETScWrappers::Vector&) const;
-template
-void
-DoFObjectAccessor<2,hp::DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::Vector,float>
-(const Vector<float>&, PETScWrappers::Vector&) const;
-#endif
-
-#endif
-
-#if deal_II_dimension >= 3
-// for double
-template
-void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::get_dof_values<Vector<double>,double>
-(const Vector<double>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::set_dof_values<Vector<double>,double>
-(const Vector<double>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::get_dof_values<Vector<double>,float>
-(const Vector<double>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::set_dof_values<Vector<float>,double>
-(const Vector<double>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::get_dof_values<Vector<float>,double>
-(const Vector<float>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::set_dof_values<Vector<double>,float>
-(const Vector<float>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::get_dof_values<Vector<float>,float>
-(const Vector<float>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::set_dof_values<Vector<float>,float>
-(const Vector<float>&, Vector<float>&) const;
-
-
-
-// for block vector
-template
-void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<double>,double>
-(const BlockVector<double>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<double>,double>
-(const Vector<double>&, BlockVector<double>&) const;
-template
-void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<double>,float>
-(const BlockVector<double>&, Vector<float>&) const;
-template
-void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<float>,double>
-(const Vector<double>&, BlockVector<float>&) const;
-template
-void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<float>,double>
-(const BlockVector<float>&, Vector<double>&) const;
-template
-void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<double>,float>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<double>,float>
(const Vector<float>&, BlockVector<double>&) const;
template
void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<float>,float>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::get_dof_values<BlockVector<float>,float>
(const BlockVector<float>&, Vector<float>&) const;
template
void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<float>,float>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::set_dof_values<BlockVector<float>,float>
(const Vector<float>&, BlockVector<float>&) const;
-
// for Petsc vectors
#ifdef DEAL_II_USE_PETSC
template
void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::Vector,double>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::Vector,double>
(const PETScWrappers::Vector &, Vector<double>&) const;
template
void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::Vector,float>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::Vector,float>
(const PETScWrappers::Vector &, Vector<float>&) const;
template
void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::Vector,double>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::Vector,double>
(const Vector<double> &, PETScWrappers::Vector&) const;
template
void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::Vector,float>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::Vector,float>
(const Vector<float>&, PETScWrappers::Vector&) const;
template
void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::BlockVector,double>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::BlockVector,double>
(const PETScWrappers::BlockVector &, Vector<double>&) const;
template
void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::BlockVector,float>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::get_dof_values<PETScWrappers::BlockVector,float>
(const PETScWrappers::BlockVector &, Vector<float>&) const;
template
void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::BlockVector,double>
-(const Vector<double>&, PETScWrappers::BlockVector &) const;
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::BlockVector,double>
+(const Vector<double> &, PETScWrappers::BlockVector&) const;
template
void
-DoFObjectAccessor<3,hp::DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::BlockVector,float>
+DoFCellAccessor<hp::DoFHandler<deal_II_dimension> >::set_dof_values<PETScWrappers::BlockVector,float>
(const Vector<float>&, PETScWrappers::BlockVector&) const;
#endif
-#endif
-
template
<h3>deal.II</h3>
<ol>
+ <li> <p>
+ Changed: The <code>DoFObjectAccessor::get_dof_values</code> and
+ <code>DoFObjectAccessor::set_dof_values</code> were part of the
+ accessors for lines, quads, and hexes. However, they could not
+ be called for these objects unless the object was actually a
+ cell, i.e. one could never call this function for a line or
+ face in 3d, for example. The functions have therefore been
+ moved to the <code>DoFCellAccessor</code> class that provides
+ access to cells (i.e. lines in 1d, quads in 2d, and hexes in
+ 3d) for which this operation is actually useful.
+ <br>
+ (WB 2006/05/01)
+ </p>
<li> <p> Fixed: second derivatives where not computed correctly in <code
- class="class">FEFaceValuesBase</code>.
- <br>
- (GK 2006/04/28)
- </p>
+ class="class">FEFaceValuesBase</code>, i.e. when evaluating
+ second derivatives on faces of cells. This is now fixed. Using
+ second derivatives evaluated at quadrature points within a cell
+ was not affected by this problem.
+ <br>
+ (GK 2006/04/28)
+ </p>
<li> <p>
New: The functions <code>Triangulation::clear_user_flags_line</code>,