From: bangerth Date: Sat, 13 Dec 2008 18:25:41 +0000 (+0000) Subject: Move the declaration of a few member classes to the .cc file -- they are not used... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d989cea4d16d5101bc4c592b96c7c2a4103a7368;p=dealii-svn.git Move the declaration of a few member classes to the .cc file -- they are not used anywhere outside the implementation of this class and so their definition doesn't need to be seen to everyone who uses the header file. git-svn-id: https://svn.dealii.org/trunk@17932 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/fe/fe_values.h b/deal.II/deal.II/include/fe/fe_values.h index a7f45fb9f1..6be9c7dd52 100644 --- a/deal.II/deal.II/include/fe/fe_values.h +++ b/deal.II/deal.II/include/fe/fe_values.h @@ -1050,7 +1050,7 @@ class FEValuesData * @author Wolfgang Bangerth, 1998, 2003, Guido Kanschat, 2001 */ template - class FEValuesBase : protected FEValuesData, +class FEValuesBase : protected FEValuesData, public Subscriptor { public: @@ -2254,440 +2254,14 @@ template #endif }; - - /** - * Implementation of derived - * classes of the - * CellIteratorBase - * interface. See there for a - * description of the use of - * these classes. - * - * @author Wolfgang Bangerth, 2003 - */ - template - class CellIterator : public CellIteratorBase - { - public: - /** - * Constructor. Take an - * iterator and store it in - * this class. - */ - CellIterator (const CI &cell); - - /** - * Conversion operator to an - * iterator for - * triangulations. This - * conversion is implicit for - * the original iterators, - * since they are derived - * classes. However, since - * here we have kind of a - * parallel class hierarchy, - * we have to have a - * conversion operator. - */ - virtual - operator const typename Triangulation::cell_iterator () const; - - /** - * Return the number of - * degrees of freedom the DoF - * handler object has to - * which the iterator belongs - * to. - */ - virtual - unsigned int - n_dofs_for_dof_handler () const; - - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const Vector &in, - Vector &out) const; - - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const Vector &in, - Vector &out) const; - - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const Vector &in, - Vector &out) const; - - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const BlockVector &in, - Vector &out) const; - - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const BlockVector &in, - Vector &out) const; - - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const BlockVector &in, - Vector &out) const; - -#ifdef DEAL_II_USE_PETSC - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const PETScWrappers::Vector &in, - Vector &out) const; - - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const PETScWrappers::BlockVector &in, - Vector &out) const; -#endif - -#ifdef DEAL_II_USE_TRILINOS - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const TrilinosWrappers::Vector &in, - Vector &out) const; - - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const TrilinosWrappers::BlockVector &in, - Vector &out) const; - - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const TrilinosWrappers::MPI::Vector &in, - Vector &out) const; - - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const TrilinosWrappers::MPI::BlockVector &in, - Vector &out) const; -#endif - - private: - /** - * Copy of the iterator which - * we use in this object. - */ - const CI cell; - }; - - - /** - * Implementation of a derived - * class of the - * CellIteratorBase - * interface. See there for a - * description of the use of - * these classes. - * - * This class is basically a - * specialization of the general - * template for iterators into - * Triangulation objects (but - * since C++ does not allow - * something like this for nested - * classes, it runs under a - * separate name). Since these do - * not implement the interface - * that we would like to call, - * the functions of this class - * cannot be implemented - * meaningfully. However, most - * functions of the FEValues - * class do not make any use of - * degrees of freedom at all, so - * it should be possible to call - * FEValues::reinit() with a tria - * iterator only; this class - * makes this possible, but - * whenever one of the functions - * of FEValues tries to call - * any of the functions of this - * class, an exception will be - * raised reminding the user that - * if she wants to use these - * features, then the - * FEValues object has to be - * reinitialized with a cell - * iterator that allows to - * extract degree of freedom - * information. - * - * @author Wolfgang Bangerth, 2003 - */ - class TriaCellIterator : public CellIteratorBase - { - public: - /** - * Constructor. Take an - * iterator and store it in - * this class. - */ - TriaCellIterator (const typename Triangulation::cell_iterator &cell); - - /** - * Conversion operator to an - * iterator for - * triangulations. This - * conversion is implicit for - * the original iterators, - * since they are derived - * classes. However, since - * here we have kind of a - * parallel class hierarchy, - * we have to have a - * conversion operator. Here, - * the conversion is trivial, - * from and to the same time. - */ - virtual - operator const typename Triangulation::cell_iterator () const; - - /** - * Implement the respective - * function of the base - * class. Since this is not - * possible, we just raise an - * error. - */ - virtual - unsigned int - n_dofs_for_dof_handler () const; - - /** - * Implement the respective - * function of the base - * class. Since this is not - * possible, we just raise an - * error. - */ - virtual - void - get_interpolated_dof_values (const Vector &in, - Vector &out) const; - - /** - * Implement the respective - * function of the base - * class. Since this is not - * possible, we just raise an - * error. - */ - virtual - void - get_interpolated_dof_values (const Vector &in, - Vector &out) const; - - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const Vector &in, - Vector &out) const; - - /** - * Implement the respective - * function of the base - * class. Since this is not - * possible, we just raise an - * error. - */ - virtual - void - get_interpolated_dof_values (const BlockVector &in, - Vector &out) const; - - /** - * Implement the respective - * function of the base - * class. Since this is not - * possible, we just raise an - * error. - */ - virtual - void - get_interpolated_dof_values (const BlockVector &in, - Vector &out) const; - - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const BlockVector &in, - Vector &out) const; - -#ifdef DEAL_II_USE_PETSC - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const PETScWrappers::Vector &in, - Vector &out) const; - - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const PETScWrappers::BlockVector &in, - Vector &out) const; -#endif - -#ifdef DEAL_II_USE_TRILINOS - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const TrilinosWrappers::Vector &in, - Vector &out) const; - - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const TrilinosWrappers::BlockVector &in, - Vector &out) const; - - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const TrilinosWrappers::MPI::Vector &in, - Vector &out) const; - - /** - * Call - * @p get_interpolated_dof_values - * of the iterator with the - * given arguments. - */ - virtual - void - get_interpolated_dof_values (const TrilinosWrappers::MPI::BlockVector &in, - Vector &out) const; -#endif - - private: - /** - * Copy of the iterator which - * we use in this object. - */ - const typename Triangulation::cell_iterator cell; - - /** - * String to be displayed - * whenever one of the - * functions of this class is - * called. Make it a static - * member variable, since we - * show the same message for - * all member functions. - */ - static const char * const message_string; - }; + /** + * Forward declaration of classes derived + * from CellIteratorBase. Their + * definition and implementation is given + * in the .cc file. + */ + template class CellIterator; + class TriaCellIterator; /** * Store the cell selected last time diff --git a/deal.II/deal.II/source/fe/fe_values.cc b/deal.II/deal.II/source/fe/fe_values.cc index ad9347ebd3..235a58f586 100644 --- a/deal.II/deal.II/source/fe/fe_values.cc +++ b/deal.II/deal.II/source/fe/fe_values.cc @@ -276,6 +276,446 @@ template FEValuesBase::CellIteratorBase::~CellIteratorBase () {} +/* ---------------- classes derived from FEValuesBase::CellIteratorBase --------- */ + + + /** + * Implementation of derived + * classes of the + * CellIteratorBase + * interface. See there for a + * description of the use of + * these classes. + * + * @author Wolfgang Bangerth, 2003 + */ +template +template +class FEValuesBase::CellIterator : public FEValuesBase::CellIteratorBase +{ + public: + /** + * Constructor. Take an + * iterator and store it in + * this class. + */ + CellIterator (const CI &cell); + + /** + * Conversion operator to an + * iterator for + * triangulations. This + * conversion is implicit for + * the original iterators, + * since they are derived + * classes. However, since + * here we have kind of a + * parallel class hierarchy, + * we have to have a + * conversion operator. + */ + virtual + operator const typename Triangulation::cell_iterator () const; + + /** + * Return the number of + * degrees of freedom the DoF + * handler object has to + * which the iterator belongs + * to. + */ + virtual + unsigned int + n_dofs_for_dof_handler () const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const Vector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const Vector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const Vector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const BlockVector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const BlockVector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const BlockVector &in, + Vector &out) const; + +#ifdef DEAL_II_USE_PETSC + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const PETScWrappers::Vector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const PETScWrappers::BlockVector &in, + Vector &out) const; +#endif + +#ifdef DEAL_II_USE_TRILINOS + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const TrilinosWrappers::Vector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const TrilinosWrappers::BlockVector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const TrilinosWrappers::MPI::Vector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const TrilinosWrappers::MPI::BlockVector &in, + Vector &out) const; +#endif + + private: + /** + * Copy of the iterator which + * we use in this object. + */ + const CI cell; +}; + + + /** + * Implementation of a derived + * class of the + * CellIteratorBase + * interface. See there for a + * description of the use of + * these classes. + * + * This class is basically a + * specialization of the general + * template for iterators into + * Triangulation objects (but + * since C++ does not allow + * something like this for nested + * classes, it runs under a + * separate name). Since these do + * not implement the interface + * that we would like to call, + * the functions of this class + * cannot be implemented + * meaningfully. However, most + * functions of the FEValues + * class do not make any use of + * degrees of freedom at all, so + * it should be possible to call + * FEValues::reinit() with a tria + * iterator only; this class + * makes this possible, but + * whenever one of the functions + * of FEValues tries to call + * any of the functions of this + * class, an exception will be + * raised reminding the user that + * if she wants to use these + * features, then the + * FEValues object has to be + * reinitialized with a cell + * iterator that allows to + * extract degree of freedom + * information. + * + * @author Wolfgang Bangerth, 2003 + */ +template +class FEValuesBase::TriaCellIterator : public FEValuesBase::CellIteratorBase +{ + public: + /** + * Constructor. Take an + * iterator and store it in + * this class. + */ + TriaCellIterator (const typename Triangulation::cell_iterator &cell); + + /** + * Conversion operator to an + * iterator for + * triangulations. This + * conversion is implicit for + * the original iterators, + * since they are derived + * classes. However, since + * here we have kind of a + * parallel class hierarchy, + * we have to have a + * conversion operator. Here, + * the conversion is trivial, + * from and to the same time. + */ + virtual + operator const typename Triangulation::cell_iterator () const; + + /** + * Implement the respective + * function of the base + * class. Since this is not + * possible, we just raise an + * error. + */ + virtual + unsigned int + n_dofs_for_dof_handler () const; + + /** + * Implement the respective + * function of the base + * class. Since this is not + * possible, we just raise an + * error. + */ + virtual + void + get_interpolated_dof_values (const Vector &in, + Vector &out) const; + + /** + * Implement the respective + * function of the base + * class. Since this is not + * possible, we just raise an + * error. + */ + virtual + void + get_interpolated_dof_values (const Vector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const Vector &in, + Vector &out) const; + + /** + * Implement the respective + * function of the base + * class. Since this is not + * possible, we just raise an + * error. + */ + virtual + void + get_interpolated_dof_values (const BlockVector &in, + Vector &out) const; + + /** + * Implement the respective + * function of the base + * class. Since this is not + * possible, we just raise an + * error. + */ + virtual + void + get_interpolated_dof_values (const BlockVector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const BlockVector &in, + Vector &out) const; + +#ifdef DEAL_II_USE_PETSC + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const PETScWrappers::Vector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const PETScWrappers::BlockVector &in, + Vector &out) const; +#endif + +#ifdef DEAL_II_USE_TRILINOS + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const TrilinosWrappers::Vector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const TrilinosWrappers::BlockVector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const TrilinosWrappers::MPI::Vector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const TrilinosWrappers::MPI::BlockVector &in, + Vector &out) const; +#endif + + private: + /** + * Copy of the iterator which + * we use in this object. + */ + const typename Triangulation::cell_iterator cell; + + /** + * String to be displayed + * whenever one of the + * functions of this class is + * called. Make it a static + * member variable, since we + * show the same message for + * all member functions. + */ + static const char * const message_string; +}; + + /* ---------------- FEValuesBase::CellIterator --------- */