From dc9eda022566ed4e506870f4e974895ea965e7b3 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 25 Jun 2010 19:52:09 +0000 Subject: [PATCH] Fix a number of places where doxygen 1.7.1 complains about invalid markup. git-svn-id: https://svn.dealii.org/trunk@21377 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/dofs/dof_accessor.h | 52 ++-- .../deal.II/include/grid/grid_reordering.h | 22 +- deal.II/deal.II/include/grid/tria_iterator.h | 84 +++--- deal.II/deal.II/include/numerics/matrices.h | 56 ++-- .../include/numerics/solution_transfer.h | 76 ++--- .../deal.II/include/numerics/time_dependent.h | 138 ++++----- deal.II/doc/doxygen/headers/iterators.h | 46 +-- deal.II/doc/news/6.1.0-vs-6.2.0.h | 6 +- deal.II/examples/step-15/step-15.cc | 68 ++--- deal.II/examples/step-22/step-22.cc | 23 +- deal.II/examples/step-28/step-28.cc | 264 +++++++++--------- deal.II/examples/step-5/doc/results.dox | 14 +- deal.II/examples/step-6/step-6.cc | 60 ++-- deal.II/examples/step-8/step-8.cc | 82 +++--- deal.II/examples/step-9/step-9.cc | 116 ++++---- deal.II/lac/include/lac/constraint_matrix.h | 8 +- deal.II/lac/include/lac/solver_gmres.h | 5 +- 17 files changed, 561 insertions(+), 559 deletions(-) diff --git a/deal.II/deal.II/include/dofs/dof_accessor.h b/deal.II/deal.II/include/dofs/dof_accessor.h index dcddcae4b4..975d7b6ee3 100644 --- a/deal.II/deal.II/include/dofs/dof_accessor.h +++ b/deal.II/deal.II/include/dofs/dof_accessor.h @@ -77,11 +77,11 @@ namespace internal * under consideration has full dimension, i.e. constitutes a cell. * * @ingroup dofs - * @ingroup Accessors + * @ingroup Accessors * @author Wolfgang Bangerth, 1999 */ template - struct Inheritance + struct Inheritance { /** * Declaration of the @p typedef. @@ -148,7 +148,7 @@ namespace internal * since they are more secure to changes in the class naming and * template interface as well as providing easier typing (much less * complicated names!). - * + * * *

Inheritance

* @@ -207,14 +207,14 @@ class DoFAccessor : public internal::DoFAccessor::Inheritance & operator = (const DoFAccessor &da); - + /** * Implement the copy operator needed * for the iterator classes. @@ -288,7 +288,7 @@ class DoFAccessor : public internal::DoFAccessor::Inheritance &da); - + /** * @name Accessing sub-objects */ @@ -327,7 +327,7 @@ class DoFAccessor : public internal::DoFAccessor::Inheritance * Extract space dimension from DH. */ static const unsigned int spacedim = DH::space_dimension; - + /** * Declare the data type that * this accessor class expects to @@ -839,7 +839,7 @@ class DoFCellAccessor : public DoFAccessor /** * @{ */ - + /** * Return the @p ith neighbor as * a DoF cell iterator. This @@ -869,8 +869,8 @@ class DoFCellAccessor : public DoFAccessor * of this cell. * * This function is not implemented in - * 1D, and maps to DoFAccessor<2, - * dim>::line in 2D. + * 1D, and maps to DoFAccessor::line + * in 2D. */ typename internal::DoFHandler::Iterators::face_iterator face (const unsigned int i) const; @@ -1040,7 +1040,7 @@ class DoFCellAccessor : public DoFAccessor template void set_dof_values (const Vector &local_values, OutputVector &values) const; - + /** * Return the interpolation of * the given finite element @@ -1250,7 +1250,7 @@ class DoFCellAccessor : public DoFAccessor void distribute_local_to_global (const FullMatrix &local_source, OutputMatrix &global_destination) const; - + /** * This function does what the two * distribute_local_to_global @@ -1263,7 +1263,7 @@ class DoFCellAccessor : public DoFAccessor const Vector &local_vector, OutputMatrix &global_matrix, OutputVector &global_vector) const; - + /** * @} */ @@ -1274,7 +1274,7 @@ class DoFCellAccessor : public DoFAccessor /** * @{ */ - + /** * Return the indices of the dofs of this * quad in the standard ordering: dofs @@ -1362,7 +1362,7 @@ class DoFCellAccessor : public DoFAccessor /** * @} */ - + private: /** * Update the cache in which we diff --git a/deal.II/deal.II/include/grid/grid_reordering.h b/deal.II/deal.II/include/grid/grid_reordering.h index 49d0c73dbc..ec62be8743 100644 --- a/deal.II/deal.II/include/grid/grid_reordering.h +++ b/deal.II/deal.II/include/grid/grid_reordering.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by the deal.II authors +// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -35,7 +35,7 @@ DEAL_II_NAMESPACE_OPEN * version 5.2. That is, the vertex and face ordering in 2d is assumed * to be * @verbatim - * 2 + * 2 * 3--->---2 * | | * 3^ ^1 @@ -76,7 +76,7 @@ DEAL_II_NAMESPACE_OPEN * Triangulation::create_triangulation_compatibility() (and not the * Triangulation::create_triangulation()) function must be used. For * a typical use of the reorder_cells() function see the - * implementation of the GridIn ::read_*() functions. + * implementation of the GridIn read_*() functions. * * *

Statement of problems

@@ -124,9 +124,9 @@ DEAL_II_NAMESPACE_OPEN * @verbatim * o * / \ - * o o + * o o * | \ / | - * | o | + * | o | * | | | * o---o---o * @endverbatim @@ -134,7 +134,7 @@ DEAL_II_NAMESPACE_OPEN * directions; it will soon be obvious that there can't exists such a * thing, even if we allow that there might be cells with clockwise * and counterclockwise orientation of the lines at the same time.) - * + * * One might argue that the definition of unique directions for faces * and edges, and the definition of directions relative to the cells * they bound, is a misfeature of deal.II. In fact, it makes reading @@ -171,7 +171,7 @@ DEAL_II_NAMESPACE_OPEN * ends of the string of cells, the string is twisted by 180 degrees, * then no such orientation is possible any more, as can easily be * checked. In effect, some meshes could not be used in deal.II. - * In order to overcome this problem, the face_rotation, + * In order to overcome this problem, the face_rotation, * face_flip and line_orientation flags have * been introduced. With these, it is possible to treat all purely hexahedral * meshes. However, in order to reduce the effect of possible bugs, it should @@ -234,7 +234,7 @@ DEAL_II_NAMESPACE_OPEN * 0->-1------2 * @endverbatim * - * The point here is the following: assume we wanted to prolong the grid to + * The point here is the following: assume we wanted to prolong the grid to * the left like this: * @verbatim * o---o---o---o---o------o @@ -494,7 +494,7 @@ DEAL_II_NAMESPACE_OPEN * implemented in 2000 by Wolfgang Bangerth. Although it is no longer used * here is how it works, and why it doesn't always work for large meshes since * its run-time can exponential in bad cases. - * + * * The first observation is that although there are counterexamples, * problems are usually local. For example, in the second example * mentioned above, if we had numbered the cells in a way that @@ -647,7 +647,7 @@ template class GridReordering { public: - + /** * This is the main function, * doing what is announced in @@ -693,7 +693,7 @@ class GridReordering */ static void invert_all_cells_of_negative_grid( const std::vector > &all_vertices, - std::vector > &original_cells); + std::vector > &original_cells); }; diff --git a/deal.II/deal.II/include/grid/tria_iterator.h b/deal.II/deal.II/include/grid/tria_iterator.h index 736aa0d48e..5b59ddb550 100644 --- a/deal.II/deal.II/include/grid/tria_iterator.h +++ b/deal.II/deal.II/include/grid/tria_iterator.h @@ -64,7 +64,7 @@ template class TriaActiveIterator; * @code * i->set_refine_flag (); * @endcode - * + * * Iterators are used whenever a loop over all lines, quads, cells * etc. is to be performed. These loops can then be coded like this: * @code @@ -80,7 +80,7 @@ template class TriaActiveIterator; * a fixed value end inside the loop instead of * tria.end(), since the creation and copying of these * iterators is rather expensive compared to normal pointers. - * + * * The objects pointed to are accessors, derived from * TriaAccessorBase. Which kind of accessor is determined by the template * argument Accessor. These accessors are not so much data @@ -132,7 +132,7 @@ template class TriaActiveIterator; * functions from the algorithm section of the C++ standard, * e.g. count_if (see the documentation for Triangulation for * an example) and several others. - * + * *

Implementation

* * The iterator class itself does not have much functionality. It only @@ -174,7 +174,7 @@ template class TriaActiveIterator; * TriaAccessor, DoFAccessor and MGDoFAccessor, * respectively. In each group, there is an accessor to cells, which * have more functionality. - * + * * @attention It seems impossible to preserve constness of a * triangulation through iterator usage. Thus, if you declare pointers * to a const triangulation object, you should be well aware @@ -185,9 +185,9 @@ template class TriaActiveIterator; * in the documentation of TriaAccessorBase, where the iterator states are * checked and implemented. * - * + * *

Past-the-end iterators

- * + * * There is a representation of past-the-end-pointers, denoted by special * values of the member variables @p present_level and @p present_index: * If present_level>=0 and present_index>=0, then the object is valid @@ -217,7 +217,7 @@ template class TriaActiveIterator; * Past-the-end iterators may also be used to compare an iterator with the * before-the-start value, when running backwards. There is no * distiction between the iterators pointing past the two ends of a vector. - * + * * By defining only one value to be past-the-end and making all other values * invalid provides a second track of security: if we should have forgotten * a check in the library when an iterator is incremented or decremented, @@ -233,7 +233,7 @@ template class TriaActiveIterator; */ template class TriaRawIterator : -#ifdef HAVE_STD_ITERATOR_CLASS +#ifdef HAVE_STD_ITERATOR_CLASS public std::iterator #else public bidirectional_iterator @@ -248,7 +248,7 @@ class TriaRawIterator : * implementation actually is. */ typedef Accessor AccessorType; - + /** * Empty constructor. Such an object * is not usable! @@ -286,7 +286,7 @@ class TriaRawIterator : */ template TriaRawIterator (const OtherAccessor &a); - + /** * Proper constructor, initialized * with the triangulation, the @@ -310,8 +310,8 @@ class TriaRawIterator : * class of this object. One such path * would be derived class to base class, * which for example may be used to get - * a Triangulation@p ::raw_cell_iterator from - * a DoFHandler@p ::raw_cell_iterator, since + * a Triangulation::raw_cell_iterator from + * a DoFHandler::raw_cell_iterator, since * the DoFAccessor class is derived from * the TriaAccessorBase class. */ @@ -337,7 +337,7 @@ class TriaRawIterator : */ template TriaRawIterator (const TriaActiveIterator &i); - + /** * @name Dereferencing */ @@ -359,13 +359,13 @@ class TriaRawIterator : * past the end iterators. */ const Accessor & operator * () const; - + /** * Dereferencing operator, non-@p const * version. */ Accessor & operator * (); - + /** * Dereferencing operator, returns a * reference of the cell pointed to. @@ -375,42 +375,42 @@ class TriaRawIterator : * version. */ const Accessor * operator -> () const; - + /** * Dereferencing operator, non-@p const * version. */ Accessor * operator -> (); /*@}*/ - + /** * Assignment operator. */ TriaRawIterator & operator = (const TriaRawIterator &); - + /** * Assignment operator. */ // template // TriaRawIterator & operator = (const TriaRawIterator&); - + /** * Assignment operator. */ // template // TriaRawIterator & operator = (const TriaIterator&); - + /** * Assignment operator. */ // template // TriaRawIterator & operator = (const TriaActiveIterator&); - + /** * Compare for equality. */ bool operator == (const TriaRawIterator &) const; - + /** * Compare for inequality. */ @@ -434,7 +434,7 @@ class TriaRawIterator : * is returned in that case. */ bool operator < (const TriaRawIterator &) const; - + /**@name Advancement of iterators*/ /*@{*/ /** @@ -452,7 +452,7 @@ class TriaRawIterator : * faces have no level. */ TriaRawIterator & operator ++ (); - + /** * Postfix ++ operator: i++. This * operator advances the iterator to @@ -487,7 +487,7 @@ class TriaRawIterator : * faces have no level. */ TriaRawIterator & operator -- (); - + /** * Postfix @p -- operator: @p i--. This * operator advances the iterator to @@ -507,7 +507,7 @@ class TriaRawIterator : */ TriaRawIterator operator -- (int); /*@}*/ - + /** * Return the state of the iterator. */ @@ -560,7 +560,7 @@ class TriaRawIterator : << (arg1.state() == IteratorState::valid ? "valid" : (arg1.state() == IteratorState::past_the_end ? "past_the_end" : "invalid"))); - + /** * Exception */ @@ -569,7 +569,7 @@ class TriaRawIterator : * Exception */ DeclException0 (ExcInvalidComparison); - + /*@}*/ protected: /** @@ -605,7 +605,7 @@ class TriaRawIterator : * @ingroup Iterators */ template -class TriaIterator : public TriaRawIterator +class TriaIterator : public TriaRawIterator { public: /** @@ -648,7 +648,7 @@ class TriaIterator : public TriaRawIterator const int level, const int index, const typename Accessor::AccessorData *local_data = 0); - + /** * This is a conversion operator * (constructor) which takes another @@ -659,8 +659,8 @@ class TriaIterator : public TriaRawIterator * class of this object. One such path * would be derived class to base class, * which for example may be used to get - * a Triangulation@p ::cell_iterator from - * a DoFHandler@p ::cell_iterator, since + * a Triangulation::cell_iterator from + * a DoFHandler::cell_iterator, since * the DoFAccessor class is derived from * the TriaAccessorBase class. */ @@ -684,13 +684,13 @@ class TriaIterator : public TriaRawIterator */ template TriaIterator (const TriaActiveIterator &i); - + /** * Assignment operator. */ TriaIterator & operator = (const TriaIterator&); - + /** * Cross assignment operator. This * assignment is only valid if the @@ -699,7 +699,7 @@ class TriaIterator : public TriaRawIterator */ TriaIterator & operator = (const TriaRawIterator&); - + /** * Assignment * operator. Requires, that @@ -764,7 +764,7 @@ class TriaIterator : public TriaRawIterator */ TriaIterator operator -- (int); /*@}*/ - + /** * Exception */ @@ -782,7 +782,7 @@ class TriaIterator : public TriaRawIterator * @ingroup Iterators */ template -class TriaActiveIterator : public TriaIterator +class TriaActiveIterator : public TriaIterator { public: /** @@ -848,8 +848,8 @@ class TriaActiveIterator : public TriaIterator * class of this object. One such path * would be derived class to base class, * which for example may be used to get - * a Triangulation@p ::active_cell_iterator from - * a DoFHandler@p ::active_cell_iterator, since + * a Triangulation::active_cell_iterator from + * a DoFHandler::active_cell_iterator, since * the DoFAccessor class is derived from * the TriaAccessorBase class. */ @@ -968,7 +968,7 @@ class TriaActiveIterator : public TriaIterator */ TriaActiveIterator operator -- (int); /*@}*/ - + /** * Exception */ @@ -1044,7 +1044,7 @@ TriaRawIterator::operator * () const Assert (Accessor::structure_dimension==Accessor::dimension || state() == IteratorState::valid, ExcDereferenceInvalidObject(accessor)); - + return accessor; } @@ -1251,7 +1251,7 @@ TriaActiveIterator::TriaActiveIterator (const TriaRawIteratorstate() != IteratorState::past_the_end) + if (this->state() != IteratorState::past_the_end) Assert (this->accessor.has_children()==false, ExcAssignmentOfInactiveObject()); #endif diff --git a/deal.II/deal.II/include/numerics/matrices.h b/deal.II/deal.II/include/numerics/matrices.h index 07ff818112..3495283087 100644 --- a/deal.II/deal.II/include/numerics/matrices.h +++ b/deal.II/deal.II/include/numerics/matrices.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -112,7 +112,7 @@ namespace TrilinosWrappers * want to add several matrices and could then condense afterwards * only once, instead of for every matrix. To actually do computations * with these matrices, you have to condense the matrix using the - * ConstraintMatrix@p ::condense function; you also have to + * ConstraintMatrix::condense function; you also have to * condense the right hand side accordingly and distribute the * solution afterwards. * @@ -186,9 +186,9 @@ namespace TrilinosWrappers * top of a corresponding sparsity pattern. Since we only work on a subset of * the degrees of freedom, we can't use the matrices and sparsity patterns * that are created for the entire set of degrees of freedom. Rather, you - * should use the DoFHandler@p ::make_boundary_sparsity_pattern() function to + * should use the DoFHandler::make_boundary_sparsity_pattern() function to * create the correct sparsity pattern, and build a matrix on top of it. - * + * * Note that at present there is no function that computes the mass matrix for * all shape functions, though such a function would be trivial to * implement. @@ -213,7 +213,7 @@ class MatrixCreator { public: /** - * Assemble the mass matrix. If no + * Assemble the mass matrix. If no * coefficient is given, it is assumed * to be unity. * @@ -322,7 +322,7 @@ class MatrixCreator Vector &rhs_vector, const Function * const a = 0); - + /** * Assemble the mass matrix and a * right hand side vector along @@ -465,7 +465,7 @@ class MatrixCreator * matrix. If no coefficient is * given, it is assumed to be * constant one. - * + * * If the library is configured * to use multithreading, this * function works in parallel. @@ -479,7 +479,7 @@ class MatrixCreator const Quadrature &q, SparseMatrix &matrix, const Function * const a = 0); - + /** * Calls the * create_laplace_matrix() @@ -498,7 +498,7 @@ class MatrixCreator * vector. If no coefficient is * given, it is assumed to be * constant one. - * + * * If the library is configured * to use multithreading, this * function works in parallel. @@ -540,7 +540,7 @@ class MatrixCreator const hp::QCollection &q, SparseMatrix &matrix, const Function * const a = 0); - + /** * Like the functions above, but for hp * dof handlers, mappings, and quadrature @@ -582,7 +582,7 @@ class MatrixCreator /** * Exception */ - DeclException0 (ExcComponentMismatch); + DeclException0 (ExcComponentMismatch); private: /** * Convenience abbreviation for @@ -594,7 +594,7 @@ class MatrixCreator * dof handler that shouls be used. */ template - struct IteratorRange + struct IteratorRange { /** * Typedef for the iterator type. @@ -606,7 +606,7 @@ class MatrixCreator * iterators. */ typedef std::pair iterator_pair; - + /** * Constructor. Initialize * the two values by the @@ -621,14 +621,14 @@ class MatrixCreator * initialization. */ IteratorRange (const iterator_pair &ip); - + /** * Pair of iterators denoting * a half-open range. */ active_cell_iterator first, second; }; - + /** * Version of the same function * (without suffix @p _1) with @@ -690,7 +690,7 @@ class MatrixCreator * * There are two ways to incorporate fixed degrees of freedom such as boundary * nodes into a linear system, as discussed below. - * + * * *

Global elimination

* @@ -761,7 +761,7 @@ class MatrixCreator * processed node is zero, the Gauss step does not change the right * hand side. We need therefore not take special care of other * boundary nodes. - * + * * To make solving faster, we preset the solution vector with the right * boundary values (as to why this is necessary, see the discussion below in * the description of local elimination). It it not clear whether the deletion @@ -870,7 +870,7 @@ class MatrixCreator * In conclusion, local elimination of boundary nodes only works if * there are no hanging nodes and even then doesn't always work fully * satisfactorily. - * + * * @ingroup numerics * @author Wolfgang Bangerth, 1998, 2000, 2004, 2005 */ @@ -916,7 +916,7 @@ class MatrixTools : public MatrixCreator * documentation. This function works on * the classes that are used to wrap * PETSc objects. - * + * * Note that this function is not very * efficient: it needs to alternatingly * read and write into the matrix, a @@ -995,17 +995,17 @@ class MatrixTools : public MatrixCreator PETScWrappers::Vector &solution, PETScWrappers::MPI::Vector &right_hand_side, const bool eliminate_columns = true); - + /** * Same as above but for BlockSparseMatrix. - */ + */ static void apply_boundary_values (const std::map &boundary_values, PETScWrappers::MPI::BlockSparseMatrix &matrix, PETScWrappers::MPI::BlockVector &solution, PETScWrappers::MPI::BlockVector &right_hand_side, const bool eliminate_columns = true); - + #endif #ifdef DEAL_II_USE_TRILINOS @@ -1017,7 +1017,7 @@ class MatrixTools : public MatrixCreator * function works on the classes * that are used to wrap Trilinos * objects. - * + * * Note that this function is not * very efficient: it needs to * alternatingly read and write @@ -1053,7 +1053,7 @@ class MatrixTools : public MatrixCreator TrilinosWrappers::Vector &solution, TrilinosWrappers::Vector &right_hand_side, const bool eliminate_columns = true); - + /** * This function does the same as * the one above, except now @@ -1074,7 +1074,7 @@ class MatrixTools : public MatrixCreator * function works on the classes * that are used to wrap Trilinos * objects. - * + * * Note that this function is not * very efficient: it needs to * alternatingly read and write @@ -1108,7 +1108,7 @@ class MatrixTools : public MatrixCreator TrilinosWrappers::MPI::Vector &solution, TrilinosWrappers::MPI::Vector &right_hand_side, const bool eliminate_columns = true); - + /** * This function does the same as * the one above, except now working @@ -1121,7 +1121,7 @@ class MatrixTools : public MatrixCreator TrilinosWrappers::MPI::BlockVector &right_hand_side, const bool eliminate_columns = true); #endif - + /** * Rather than applying boundary * values to the global matrix @@ -1164,7 +1164,7 @@ class MatrixTools : public MatrixCreator FullMatrix &local_matrix, Vector &local_rhs, const bool eliminate_columns); - + /** * Exception */ diff --git a/deal.II/deal.II/include/numerics/solution_transfer.h b/deal.II/deal.II/include/numerics/solution_transfer.h index bd49a045e4..60520bd6ed 100644 --- a/deal.II/deal.II/include/numerics/solution_transfer.h +++ b/deal.II/deal.II/include/numerics/solution_transfer.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -33,11 +33,11 @@ DEAL_II_NAMESPACE_OPEN * vector is reinitialized to the new size and filled with the interpolated * values. This class is used in the step-15, * step-31, and step-33 tutorial programs. - * + * *

Usage

* * As the interpolation while - * coarsening is much more complicated to organize + * coarsening is much more complicated to organize * (see further documentation below) than interpolation while pure refinement, * @p SolutionTransfer offers two possible usages. *
    @@ -110,12 +110,12 @@ DEAL_II_NAMESPACE_OPEN * soltrans.interpolate(solution, interpolated_solution); * @endverbatim * - * Multiple calls to the function + * Multiple calls to the function * interpolate (const Vector &in, Vector &out) * are NOT allowed. Interpolating several functions can be performed in one step - * by using + * by using * void interpolate (const vector >&all_in, vector >&all_out) const, - * and using the respective @p prepare_for_coarsening_and_refinement function + * and using the respective @p prepare_for_coarsening_and_refinement function * taking several vectors as input before actually refining and coarsening the * triangulation (see there). *
@@ -148,50 +148,50 @@ DEAL_II_NAMESPACE_OPEN * discrete function @p in interpolated on the refined mesh. * * The refine_interpolate(in,out) function can be called multiple times for - * arbitrary many discrete functions (solution vectors) on the original grid. + * arbitrary many discrete functions (solution vectors) on the original grid. * - *
  • Solution transfer while coarsening and refinement. After - * calling Triangulation@p ::prepare_coarsening_and_refinement the - * coarsen flags of either all or none of the children of a - * (father-)cell are set. While coarsening - * (Triangulation@p ::execute_coarsening_and_refinement) + *
  • Solution transfer while coarsening and refinement. After + * calling Triangulation::prepare_coarsening_and_refinement the + * coarsen flags of either all or none of the children of a + * (father-)cell are set. While coarsening + * (Triangulation::execute_coarsening_and_refinement) * the cells that are not needed any more will be deleted from the Triangulation. - * + * * For the interpolation from the (to be coarsenend) children to their father * the children cells are needed. Hence this interpolation * and the storing of the interpolated values of each of the discrete functions * that we want to interpolate needs to take place before these children cells * are coarsened (and deleted!!). Again a pointers for the relevant cells is - * set to point to these values (see below). + * set to point to these values (see below). * Additionally the DoF indices of the cells * that will not be coarsened need to be stored according to the solution * transfer while pure refinement (cf there). All this is performed by - * prepare_for_coarsening_and_refinement(all_in) where the + * prepare_for_coarsening_and_refinement(all_in) where the * vector >vector all_in includes * all discrete functions to be interpolated onto the new grid. * * As we need two different kinds of pointers (vector * for the Dof * indices and vector > * for the interpolated DoF values) * we use the @p Pointerstruct that includes both of these pointers and - * the pointer for each cell points to these @p Pointerstructs. - * On each cell only one of the two different pointers is used at one time + * the pointer for each cell points to these @p Pointerstructs. + * On each cell only one of the two different pointers is used at one time * hence we could use a - * void * pointer as vector * at one time and as + * void * pointer as vector * at one time and as * vector > * at the other but using this @p Pointerstruct * in between makes the use of these pointers more safe and gives better * possibility to expand their usage. - * + * * In interpolate(all_in, all_out) the refined cells are treated according * to the solution transfer while pure refinement. Additionally, on each - * cell that is coarsened (hence previously was a father cell), + * cell that is coarsened (hence previously was a father cell), * the values of the discrete - * functions in @p all_out are set to the stored local interpolated values - * that are accessible due to the 'vector > *' pointer in + * functions in @p all_out are set to the stored local interpolated values + * that are accessible due to the 'vector > *' pointer in * @p Pointerstruct that is pointed to by the pointer of that cell. * It is clear that interpolate(all_in, all_out) only can be called with * the vector > all_in that previously was the parameter - * of the prepare_for_coarsening_and_refinement(all_in) function. Hence - * interpolate(all_in, all_out) can (in contrast to + * of the prepare_for_coarsening_and_refinement(all_in) function. Hence + * interpolate(all_in, all_out) can (in contrast to * refine_interpolate(in, out)) only be called once. * * @@ -202,7 +202,7 @@ template, class DH=DoFHandler > class SolutionTransfer { public: - + /** * Constructor, takes the current DoFHandler * as argument. @@ -213,7 +213,7 @@ class SolutionTransfer * Destructor */ ~SolutionTransfer(); - + /** * Reinit this class to the state that * it has @@ -225,7 +225,7 @@ class SolutionTransfer * Prepares the @p SolutionTransfer for * pure refinement. It * stores the dof indices of each cell. - * After calling this function + * After calling this function * only calling the @p refine_interpolate * functions is allowed. */ @@ -243,14 +243,14 @@ class SolutionTransfer * coarsenend) grid. */ void prepare_for_coarsening_and_refinement (const std::vector &all_in); - + /** * Same as previous function * but for only one discrete function * to be interpolated. */ void prepare_for_coarsening_and_refinement (const VECTOR &in); - + /** * This function * interpolates the discrete function @p in, @@ -271,7 +271,7 @@ class SolutionTransfer */ void refine_interpolate (const VECTOR &in, VECTOR &out) const; - + /** * This function * interpolates the discrete functions @@ -286,11 +286,11 @@ class SolutionTransfer * * Calling this function is * allowed only if first - * Triangulation@p ::prepare_coarsening_and_refinement, + * Triangulation::prepare_coarsening_and_refinement, * second * @p SolutionTransfer::prepare_for_coarsening_and_refinement, * an then third - * Triangulation@p ::execute_coarsening_and_refinement + * Triangulation::execute_coarsening_and_refinement * are called before. Multiple * calling of this function is * NOT allowed. Interpolating @@ -308,14 +308,14 @@ class SolutionTransfer */ void interpolate (const std::vector&all_in, std::vector &all_out) const; - + /** * Same as the previous function. * It interpolates only one function. * It assumes the vectors having the * right sizes (i.e. in.size()==n_dofs_old, * out.size()==n_dofs_refined) - * + * * Multiple calling of this function is * NOT allowed. Interpolating * several functions can be performed @@ -346,12 +346,12 @@ class SolutionTransfer * Exception */ DeclException0(ExcAlreadyPrepForCoarseAndRef); - + /** * Exception */ DeclException0(ExcTriaPrepCoarseningNotCalledBefore); - + /** * Exception */ @@ -374,7 +374,7 @@ class SolutionTransfer * to work with. */ SmartPointer > dof_handler; - + /** * Stores the number of DoFs before the * refinement and/or coarsening. @@ -433,7 +433,7 @@ class SolutionTransfer struct Pointerstruct { Pointerstruct(); unsigned int memory_consumption () const; - + std::vector *indices_ptr; std::vector > *dof_values_ptr; }; diff --git a/deal.II/deal.II/include/numerics/time_dependent.h b/deal.II/deal.II/include/numerics/time_dependent.h index 2f04bf087d..2dd19f618a 100644 --- a/deal.II/deal.II/include/numerics/time_dependent.h +++ b/deal.II/deal.II/include/numerics/time_dependent.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -82,7 +82,7 @@ template class Triangulation; * for i=0 to n_timesteps-1 * initialize timestep i for this sweep, e.g. for setting up * data structures, creating temporary files, etc. - * + * * for i=0 to n_timesteps-1 * prepare timestep i for loop 0 * for i=0 to n_timesteps-1 @@ -192,43 +192,43 @@ template class Triangulation; * void TimeDependent_Wave::run_sweep (const unsigned int sweep_no) * { * start_sweep (sweep_no); - * + * * solve_primal_problem (); - * + * * if (compute_dual_problem) * solve_dual_problem (); - * + * * postprocess (); - * + * * if (sweep_no != number_of_sweeps-1) * refine_grids (); - * + * * write_statistics (); - * + * * end_sweep (); * }; - * - * - * + * + * + * * template - * void WaveProblem::run () + * void WaveProblem::run () * { * for (unsigned int sweep=0; sweep class Triangulation; * timesteps[step]->set_timestep_no (step); * timesteps[step]->set_sweep_no (sweep_no); * }; - * + * * for (unsigned int step=0; stepstart_sweep (); * }; - * - * + * + * * void - * TimeDependent::solve_primal_problem () + * TimeDependent::solve_primal_problem () * { * do_loop (mem_fun(&TimeStepBase::init_for_primal_problem), * mem_fun(&TimeStepBase::solve_primal_problem), @@ -260,7 +260,7 @@ template class Triangulation; * invoked (@p solve_primal_problem, @p solve_dual_problem, @p postprocess, * @p refine_grids and @p write_statistics all have this form, where the * latter two give functions of the derived timestep class, rather than - * from the base class). The function TimeStepBase@p ::init_for_primal_problem + * from the base class). The function TimeStepBase::init_for_primal_problem * and the respective ones for the other operations defined by that class * are only used to store the type of operation which the loop presently * performed will do. @@ -312,13 +312,13 @@ template class Triangulation; * for (unsigned int step=0; step * (timesteps[step])); - * + * * // wake up the first few time levels * for (int step=-timestepping_data.look_ahead; step<0; ++step) * for (int look_ahead=0; look_ahead<=timestepping_data.look_ahead; ++look_ahead) * timesteps[step+look_ahead]->wake_up(look_ahead); - * - * + * + * * for (unsigned int step=0; step class Triangulation; * for (unsigned int look_ahead=0; * look_ahead<=timestepping_data.look_ahead; ++look_ahead) * timesteps[step+look_ahead]->wake_up(look_ahead); - * - * + * + * * // actually do the work * loop_function (static_cast * (timesteps[step])); - * + * * // let the timesteps behind sleep * for (unsigned int look_back=0; look_back<=timestepping_data.look_back; ++look_back) * timesteps[step-look_back]->sleep(look_back); * }; - * + * * // make the last few timesteps sleep * for (int step=n_timesteps; n_timesteps+timestepping_data.look_back; ++step) * for (int look_back=0; look_back<=timestepping_data.look_back; ++look_back) @@ -347,7 +347,7 @@ template class Triangulation; * * @author Wolfgang Bangerth, 1999 */ -class TimeDependent +class TimeDependent { public: /** @@ -369,7 +369,7 @@ class TimeDependent */ TimeSteppingData (const unsigned int look_ahead, const unsigned int look_back); - + /** * This denotes the number of timesteps * the timestepping algorithm needs to @@ -400,7 +400,7 @@ class TimeDependent * time step. */ const unsigned int look_ahead; - + /** * This is the opposite variable to the * above one. It denotes the number of @@ -524,7 +524,7 @@ class TimeDependent * used in the previous sweep. */ void delete_timestep (const unsigned int position); - + /** * Solve the primal problem; uses the * functions @p init_for_primal_problem @@ -563,7 +563,7 @@ class TimeDependent * object given to the constructor. */ void postprocess (); - + /** * Do a loop over all timesteps, call the * @p init_function at the beginning and @@ -595,7 +595,7 @@ class TimeDependent * * Instead of using the above form, you can * equally well use - * bind2nd(mem_fun1(&X::unary_function), arg) + * bind2nd(mem_fun1(&X::unary_function), arg) * which lets the @p do_loop * function call teh given function with * the specified parameter. Note that you @@ -684,12 +684,12 @@ class TimeDependent * of this object. */ unsigned int memory_consumption () const; - + /** * Exception. */ DeclException0 (ExcInvalidPosition); - + protected: /** * Vector holding pointers to the time @@ -730,7 +730,7 @@ class TimeDependent * do. See the documentation of this struct * for more information. */ - const TimeSteppingData timestepping_data_postprocess; + const TimeSteppingData timestepping_data_postprocess; private: @@ -766,7 +766,7 @@ class TimeStepBase : public Subscriptor dual_problem = 0x1, postprocess = 0x2 }; - + /** * Constructor. Does nothing here apart * from setting the time. @@ -861,7 +861,7 @@ class TimeStepBase : public Subscriptor * and the like. */ virtual void end_sweep (); - + /** * Before the primal problem is * solved on each time level, this @@ -952,7 +952,7 @@ class TimeStepBase : public Subscriptor * are added or deleted. */ unsigned int get_timestep_no () const; - + /** * Compute the time difference to the * last time step. If this timestep is @@ -987,7 +987,7 @@ class TimeStepBase : public Subscriptor * above. */ double get_forward_timestep () const; - + /** * Determine an estimate for the * memory consumption (in bytes) @@ -1007,15 +1007,15 @@ class TimeStepBase : public Subscriptor * Exception */ DeclException0 (ExcCantComputeTimestep); - + protected: - /** + /** * Pointer to the previous time step object * in the list. */ const TimeStepBase *previous_timestep; - /** + /** * Pointer to the next time step object * in the list. */ @@ -1054,7 +1054,7 @@ class TimeStepBase : public Subscriptor * functions. */ unsigned int next_action; - + private: /** * Reset the pointer to the previous time @@ -1155,7 +1155,7 @@ namespace TimeStepBase_Tria_Flags * really usable. */ Flags (); - + /** * Constructor; see the different * fields for a description of the @@ -1164,7 +1164,7 @@ namespace TimeStepBase_Tria_Flags Flags (const bool delete_and_rebuild_tria, const unsigned int wakeup_level_to_build_grid, const unsigned int sleep_level_to_delete_grid); - + /** * This flag determines whether * the @p sleep and @@ -1207,7 +1207,7 @@ namespace TimeStepBase_Tria_Flags * has no meaning. */ const unsigned int wakeup_level_to_build_grid; - + /** * This is the opposite flag to * the one above: it determines @@ -1215,7 +1215,7 @@ namespace TimeStepBase_Tria_Flags * the grid shall be deleted. */ const unsigned int sleep_level_to_delete_grid; - + /** * Exception */ @@ -1358,13 +1358,13 @@ namespace TimeStepBase_Tria_Flags * information. */ typedef std::vector > > CorrectionRelaxations; - + /** * Default values for the relaxations: * no relaxations. */ static CorrectionRelaxations default_correction_relaxations; - + /** * Constructor. The default * values are chosen such that @@ -1380,7 +1380,7 @@ namespace TimeStepBase_Tria_Flags const unsigned int cell_number_correction_steps = 0, const bool mirror_flags_to_previous_grid = false, const bool adapt_grids = false); - + /** * Maximum level of a cell in * the triangulation of a time @@ -1399,7 +1399,7 @@ namespace TimeStepBase_Tria_Flags * refinements. */ const unsigned int max_refinement_level; - + /** * First sweep to perform cell * number correction steps on; @@ -1418,7 +1418,7 @@ namespace TimeStepBase_Tria_Flags * this number of cells. */ const unsigned int min_cells_for_correction; - + /** * Fraction by which the number * of cells on a time level may @@ -1428,7 +1428,7 @@ namespace TimeStepBase_Tria_Flags * second: bottom deviation). */ const double cell_number_corridor_top; - + /** * @ref cell_number_corridor_top */ @@ -1439,7 +1439,7 @@ namespace TimeStepBase_Tria_Flags * correction step. */ const std::vector > > correction_relaxations; - + /** * Number of iterations to be * performed to adjust the @@ -1490,7 +1490,7 @@ namespace TimeStepBase_Tria_Flags * previous one. */ const bool adapt_grids; - + /** * Exception */ @@ -1508,14 +1508,14 @@ namespace TimeStepBase_Tria_Flags * @p get_tria_refinement_criteria. */ template - struct RefinementData + struct RefinementData { /** * Constructor */ RefinementData (const double refinement_threshold, const double coarsening_threshold=0); - + /** * Threshold for refinement: * cells having a larger value @@ -1528,7 +1528,7 @@ namespace TimeStepBase_Tria_Flags * higher than this threshold). */ const double refinement_threshold; - + /** * Same threshold for * coarsening: cells with a @@ -1578,8 +1578,8 @@ class TimeStepBase_Tria : public TimeStepBase typedef typename TimeStepBase_Tria_Flags::Flags Flags; typedef typename TimeStepBase_Tria_Flags::RefinementFlags RefinementFlags; typedef typename TimeStepBase_Tria_Flags::RefinementData RefinementData; - - + + /** * Extension of the enum in the base * class denoting the next action to be @@ -1604,7 +1604,7 @@ class TimeStepBase_Tria : public TimeStepBase * terminal. */ TimeStepBase_Tria (); - + /** * Constructor. Takes a coarse * grid from which the grids on this @@ -1736,7 +1736,7 @@ class TimeStepBase_Tria : public TimeStepBase * be overloaded. */ virtual void init_for_refinement (); - + /** * Virtual function that should fill * the vector with the refinement @@ -1749,7 +1749,7 @@ class TimeStepBase_Tria : public TimeStepBase * the time step management object. */ virtual void get_tria_refinement_criteria (Vector &criteria) const = 0; - + /** * The refinement * flags of the triangulation are stored @@ -1780,7 +1780,7 @@ class TimeStepBase_Tria : public TimeStepBase DeclException0 (ExcGridNotDeleted); protected: - + /** * Triangulation used at this * time level. Since this is @@ -1807,7 +1807,7 @@ class TimeStepBase_Tria : public TimeStepBase * management object. */ SmartPointer,TimeStepBase_Tria > coarse_grid; - + /** * Some flags about how this time level * shall behave. See the documentation @@ -1870,7 +1870,7 @@ void TimeDependent::do_loop (InitFunctionObject init_function, // some code at one place when it needs // to be changed at a second place, here // for the other direction, also. - + const unsigned int n_timesteps = timesteps.size(); // initialize the time steps for @@ -1937,7 +1937,7 @@ void TimeDependent::do_loop (InitFunctionObject init_function, (&*timesteps[n_timesteps-step-1])); break; }; - + // let the timesteps behind sleep for (unsigned int look_back=0; look_back<=timestepping_data.look_back; ++look_back) diff --git a/deal.II/doc/doxygen/headers/iterators.h b/deal.II/doc/doxygen/headers/iterators.h index 1563e4cbae..8d576805ec 100644 --- a/deal.II/doc/doxygen/headers/iterators.h +++ b/deal.II/doc/doxygen/headers/iterators.h @@ -20,7 +20,7 @@ Conceptually, this type represents something like a pointer to an object represented by the Accessor class. Usually, you will not use the actual class names spelled out directly, but employ one of the typedefs provided by the container classes, such as typename -Triangulation@::cell_iterator. Before going into this, let us +Triangulation::cell_iterator. Before going into this, let us first discuss the concept of iterators, before delving into what the accessors do. @@ -267,28 +267,28 @@ MGDoFHandler, as well as the function that generate such objects: cell_iterator type function call - + Triangulation - typename Triangulation@::cell_iterator + typename Triangulation::cell_iterator triangulation.begin() DoFHandler - typename DoFHandler@::cell_iterator + typename DoFHandler::cell_iterator dof_handler.begin() hp::DoFHandler - typename hp::DoFHandler@::cell_iterator + typename hp::DoFHandler::cell_iterator hp_dof_handler.begin() MGDoFHandler - typename MGDoFHandler@::cell_iterator + typename MGDoFHandler::cell_iterator mg_dof_handler.begin() @@ -300,28 +300,28 @@ MGDoFHandler, as well as the function that generate such objects: face_iterator type function call - + Triangulation - typename Triangulation@::face_iterator + typename Triangulation::face_iterator triangulation.begin_face() DoFHandler - typename DoFHandler@::face_iterator + typename DoFHandler::face_iterator dof_handler.begin_face() hp::DoFHandler - typename hp::DoFHandler@::face_iterator + typename hp::DoFHandler::face_iterator hp_dof_handler.begin_face() MGDoFHandler - typename MGDoFHandler@::face_iterator + typename MGDoFHandler::face_iterator mg_dof_handler.begin_face() @@ -335,28 +335,28 @@ Likewise, active iterators have the following properties: cell_iterator type function call - + Triangulation - typename Triangulation@::active_cell_iterator + typename Triangulation::active_cell_iterator triangulation.begin_active() DoFHandler - typename DoFHandler@::active_cell_iterator + typename DoFHandler::active_cell_iterator dof_handler.begin_active() hp::DoFHandler - typename hp::DoFHandler@::active_cell_iterator + typename hp::DoFHandler::active_cell_iterator hp_dof_handler.begin_active() MGDoFHandler - typename MGDoFHandler@::active_cell_iterator + typename MGDoFHandler::active_cell_iterator mg_dof_handler.begin_active() @@ -368,28 +368,28 @@ Likewise, active iterators have the following properties: face_iterator type function call - + Triangulation - typename Triangulation@::active_face_iterator + typename Triangulation::active_face_iterator triangulation.begin_active_face() DoFHandler - typename DoFHandler@::active_face_iterator + typename DoFHandler::active_face_iterator dof_handler.begin_active_face() hp::DoFHandler - typename hp::DoFHandler@::active_face_iterator + typename hp::DoFHandler::active_face_iterator hp_dof_handler.begin_active_face() MGDoFHandler - typename MGDoFHandler@::active_face_iterator + typename MGDoFHandler::active_face_iterator mg_dof_handler.begin_active_face() @@ -419,8 +419,8 @@ stated in the internal::MGDoFHandler::Iterators<2,spacedim>, and internal::MGDoFHandler::Iterators<3,spacedim> classes for MGDoFHandler iterators. - - + + @section IteratorAccessorInternals Iterator and accessor internals Iterators, being like pointers, act as if they pointed to an actual diff --git a/deal.II/doc/news/6.1.0-vs-6.2.0.h b/deal.II/doc/news/6.1.0-vs-6.2.0.h index c99210b27f..e0fef796e9 100644 --- a/deal.II/doc/news/6.1.0-vs-6.2.0.h +++ b/deal.II/doc/news/6.1.0-vs-6.2.0.h @@ -603,10 +603,10 @@ inconvenience this causes. New: There is now a new RefinementCase GeometryInfo::isotropic_refinement representing the isotropic refinement case in dim dimensions, - i.e. GeometryInfo<1>::isotropic_refinement=RefinementCase::cut_x, - GeometryInfo<2>::isotropic_refinement=RefinementCase::cut_xy + i.e. GeometryInfo<1>::isotropic_refinement = RefinementCase::cut_x, + GeometryInfo<2>::isotropic_refinement = RefinementCase::cut_xy and - GeometryInfo<3>::isotropic_refinement=RefinementCase::cut_xyz. + GeometryInfo<3>::isotropic_refinement = RefinementCase::cut_xyz.
    (RH 2008/07/08 as of branch_anisotropic at 2005/03/03)

    diff --git a/deal.II/examples/step-15/step-15.cc b/deal.II/examples/step-15/step-15.cc index 46ec6243e9..423f7fd46a 100644 --- a/deal.II/examples/step-15/step-15.cc +++ b/deal.II/examples/step-15/step-15.cc @@ -3,7 +3,7 @@ /* $Id$ */ /* */ -/* Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009 by the deal.II authors */ +/* Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010 by the deal.II authors */ /* */ /* This file is subject to QPL and may not be distributed */ /* without copyright and license information. Please refer */ @@ -119,11 +119,11 @@ double gradient_power (const Tensor<1,dim> &v, // for 1d. If the program is to be extended // to higher space dimensions, so has to be // this class. -class InitializationValues : public Function<1> +class InitializationValues : public Function<1> { public: InitializationValues () : Function<1>() {} - + virtual double value (const Point<1> &p, const unsigned int component = 0) const; }; @@ -150,7 +150,7 @@ class InitializationValues : public Function<1> // and return it, unless it is less than // zero, in which case we take zero. double InitializationValues::value (const Point<1> &p, - const unsigned int) const + const unsigned int) const { const double base = std::pow(p(0), 1./3.); const double random = 2.*rand()/RAND_MAX-1; @@ -191,12 +191,12 @@ double InitializationValues::value (const Point<1> &p, // step, as well as the present approximation // of the solution. template -class MinimizationProblem +class MinimizationProblem { public: MinimizationProblem (const unsigned int run_number); void run (); - + private: void initialize_solution (); void setup_system_on_mesh (); @@ -208,17 +208,17 @@ class MinimizationProblem static double energy (const DoFHandler &dof_handler, const Vector &function); - + const unsigned int run_number; - + Triangulation triangulation; FE_Q fe; DoFHandler dof_handler; ConstraintMatrix hanging_node_constraints; - + SparsityPattern sparsity_pattern; SparseMatrix matrix; @@ -258,7 +258,7 @@ MinimizationProblem::MinimizationProblem (const unsigned int run_number) // from erroneously compiling this function // for other space dimensions, then. template <> -void MinimizationProblem<1>::initialize_solution () +void MinimizationProblem<1>::initialize_solution () { // The first part is to assign the correct // size to the vector, and use library @@ -408,7 +408,7 @@ void MinimizationProblem::assemble_step () // the appropriate quadrature formula is // the one we have chosen here. QGauss quadrature_formula(4); - FEValues fe_values (fe, quadrature_formula, + FEValues fe_values (fe, quadrature_formula, update_values | update_gradients | update_quadrature_points | update_JxW_values); @@ -534,7 +534,7 @@ void MinimizationProblem::assemble_step () fe_values.shape_value(i,q_point) * (x_minus_u3 * - (u_prime * + (u_prime * fe_values.shape_grad(i,q_point)) - (u_prime*u_prime) * u * u * @@ -543,7 +543,7 @@ void MinimizationProblem::assemble_step () * fe_values.JxW(q_point)); } - + // After summing up all the // contributions, we have to transfer // them to the global objects. This is @@ -556,7 +556,7 @@ void MinimizationProblem::assemble_step () matrix.add (local_dof_indices[i], local_dof_indices[j], cell_matrix(i,j)); - + residual(local_dof_indices[i]) += cell_rhs(i); } } @@ -705,7 +705,7 @@ MinimizationProblem::line_search (const Vector &update) const // alpha-dalpha along the search // direction: const double dalpha = (alpha != 0 ? alpha/100 : 0.01); - + tmp = present_solution; tmp.add (alpha+dalpha, update); const double f_a_plus = energy (dof_handler, tmp); @@ -763,7 +763,7 @@ MinimizationProblem::line_search (const Vector &update) const tmp = present_solution; tmp.add (alpha+step_length, update); const double e = energy (dof_handler, tmp); - + if (e >= f_a) step_length /= 2; else @@ -791,7 +791,7 @@ MinimizationProblem::line_search (const Vector &update) const // the solution of a linear system before. template void MinimizationProblem::do_step () -{ +{ assemble_step (); Vector update (present_solution.size()); @@ -799,7 +799,7 @@ void MinimizationProblem::do_step () SolverControl solver_control (residual.size(), 1e-2*residual.l2_norm()); SolverCG<> solver (solver_control); - + PreconditionSSOR<> preconditioner; preconditioner.initialize(matrix); @@ -859,7 +859,7 @@ template <> void MinimizationProblem<1>::refine_grid () { const unsigned int dim = 1; - + Vector error_indicators (triangulation.n_active_cells()); // Then define the quadrature formula, and @@ -954,7 +954,7 @@ void MinimizationProblem<1>::refine_grid () 5*(x-u*u*u)*u_doubleprime + 2*u_prime*(1-3*u*u*u_prime))); - + cell_residual_norm += (local_residual_value * local_residual_value * fe_values.JxW(q)); } @@ -1108,7 +1108,7 @@ void MinimizationProblem<1>::refine_grid () DoFHandler::cell_iterator right_neighbor = cell->neighbor(1); while (right_neighbor->has_children()) right_neighbor = right_neighbor->child(0); - + neighbor_fe_values.reinit (right_neighbor); neighbor_fe_values.get_function_grads (present_solution, local_gradients); @@ -1119,8 +1119,8 @@ void MinimizationProblem<1>::refine_grid () std::pow(u_prime_right,5)); error_indicators(cell_index) += right_jump * right_jump * cell->diameter(); - } - } + } + } // Now we have all the refinement // indicators computed, and want to refine @@ -1150,7 +1150,7 @@ void MinimizationProblem<1>::refine_grid () // situations, the library will silently // also have to refine the neighbor cell // once. It does so by calling the - // Triangulation@::prepare_coarsening_and_refinement + // Triangulation::prepare_coarsening_and_refinement // function before actually doing the // refinement and coarsening. This function // flags a set of additional cells for @@ -1210,7 +1210,7 @@ void MinimizationProblem<1>::refine_grid () hanging_node_constraints.clear (); DoFTools::make_hanging_node_constraints (dof_handler, hanging_node_constraints); - hanging_node_constraints.close (); + hanging_node_constraints.close (); hanging_node_constraints.distribute (present_solution); // This is wasteful, since we create a // ConstraintMatrix object that will be @@ -1251,7 +1251,7 @@ MinimizationProblem::energy (const DoFHandler &dof_handler, // degree six, so a 4-point Gauss formula // is appropriate: QGauss quadrature_formula(4); - FEValues fe_values (dof_handler.get_fe(), quadrature_formula, + FEValues fe_values (dof_handler.get_fe(), quadrature_formula, update_values | update_gradients | update_quadrature_points | update_JxW_values); @@ -1319,7 +1319,7 @@ MinimizationProblem::energy (const DoFHandler &dof_handler, // converged somewhere, we output the // results. template -void MinimizationProblem::run () +void MinimizationProblem::run () { GridGenerator::hyper_cube (triangulation, 0., 1.); triangulation.refine_global (4); @@ -1327,11 +1327,11 @@ void MinimizationProblem::run () initialize_solution (); double last_energy = energy (dof_handler, present_solution); - + while (true) { setup_system_on_mesh (); - + for (unsigned int iteration=0; iteration<5; ++iteration) do_step (); @@ -1345,9 +1345,9 @@ void MinimizationProblem::run () refine_grid (); } - + output_results (); - + std::cout << std::endl; } @@ -1367,7 +1367,7 @@ void MinimizationProblem::run () // time, all these runs are actually // different, although it may seem that they // are independent of each other. -int main () +int main () { try { @@ -1377,7 +1377,7 @@ int main () for (unsigned int realization=0; realization minimization_problem_1d (realization); minimization_problem_1d.run (); } @@ -1394,7 +1394,7 @@ int main () << std::endl; return 1; } - catch (...) + catch (...) { std::cerr << std::endl << std::endl << "----------------------------------------------------" diff --git a/deal.II/examples/step-22/step-22.cc b/deal.II/examples/step-22/step-22.cc index ced1d12b8b..d509a89f39 100644 --- a/deal.II/examples/step-22/step-22.cc +++ b/deal.II/examples/step-22/step-22.cc @@ -948,16 +948,17 @@ void StokesProblem::assemble_system () // linear system, we generate a // preconditioner for the // velocity-velocity matrix, i.e., - // block(0,0) in the system - // matrix. As mentioned above, this - // depends on the spatial - // dimension. Since the two classes - // described by the - // InnerPreconditioner@ :: - // type typedef have the same - // interface, we do not have to do - // anything different whether we want to - // use a sparse direct solver or an ILU: + // block(0,0) in the + // system matrix. As mentioned + // above, this depends on the + // spatial dimension. Since the two + // classes described by the + // InnerPreconditioner::type + // typedef have the same interface, + // we do not have to do anything + // different whether we want to use + // a sparse direct solver or an + // ILU: std::cout << " Computing preconditioner..." << std::endl << std::flush; A_preconditioner @@ -983,7 +984,7 @@ void StokesProblem::assemble_system () // introduction, the inverse is generated // with the help of an inner preconditioner // of type - // InnerPreconditioner@::type. + // InnerPreconditioner::type. template void StokesProblem::solve () { diff --git a/deal.II/examples/step-28/step-28.cc b/deal.II/examples/step-28/step-28.cc index 123a20dc33..5852e3a5a2 100644 --- a/deal.II/examples/step-28/step-28.cc +++ b/deal.II/examples/step-28/step-28.cc @@ -1,7 +1,7 @@ /* $Id$ */ /* Version: $Name: $ */ /* */ -/* Copyright (C) 2006, 2007, 2008, 2009 by the deal.II authors and Yaqi Wang */ +/* Copyright (C) 2006, 2007, 2008, 2009, 2010 by the deal.II authors and Yaqi Wang */ /* */ /* This file is subject to QPL and may not be distributed */ /* without copyright and license information. Please refer */ @@ -152,7 +152,7 @@ class MaterialData { public: MaterialData (const unsigned int n_groups); - + double get_diffusion_coefficient (const unsigned int group, const unsigned int material_id) const; double get_removal_XS (const unsigned int group, @@ -167,7 +167,7 @@ class MaterialData const unsigned int material_id) const; double get_fission_spectrum (const unsigned int group, const unsigned int material_id) const; - + private: const unsigned int n_groups; const unsigned int n_materials; @@ -223,15 +223,15 @@ MaterialData::MaterialData (const unsigned int n_groups) for (unsigned int group_2=0; group_2 &error_indicators) const; - + void refine_grid (const Vector &error_indicators, const double refine_threshold, const double coarsen_threshold); @@ -643,7 +643,7 @@ class EnergyGroup // by the present guess of the // eigenvalue we are looking for: public: - + Vector solution; Vector solution_old; @@ -675,22 +675,22 @@ class EnergyGroup // store them along with all the // other data of this class: private: - + const unsigned int group; const MaterialData &material_data; - + Triangulation triangulation; const FiniteElement &fe; DoFHandler dof_handler; SparsityPattern sparsity_pattern; SparseMatrix system_matrix; - + Vector system_rhs; - + std::map boundary_values; ConstraintMatrix hanging_node_constraints; - + // @sect5{Private member functionss} // @@ -801,14 +801,14 @@ void EnergyGroup::setup_linear_system () { const unsigned int n_dofs = dof_handler.n_dofs(); - + hanging_node_constraints.clear (); DoFTools::make_hanging_node_constraints (dof_handler, hanging_node_constraints); hanging_node_constraints.close (); system_matrix.clear (); - + sparsity_pattern.reinit (n_dofs, n_dofs, dof_handler.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); @@ -879,7 +879,7 @@ EnergyGroup::setup_linear_system () // first clear the boundary value // map): boundary_values.clear(); - + for (unsigned int i=0; i::setup_linear_system () // information is available. template void -EnergyGroup::assemble_system_matrix () +EnergyGroup::assemble_system_matrix () { const QGauss quadrature_formula(fe.degree + 1); - - FEValues fe_values (fe, quadrature_formula, + + FEValues fe_values (fe, quadrature_formula, update_values | update_gradients | update_JxW_values); - + const unsigned int dofs_per_cell = fe.dofs_per_cell; const unsigned int n_q_points = quadrature_formula.size(); - + FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); Vector cell_rhs (dofs_per_cell); - + std::vector local_dof_indices (dofs_per_cell); - + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); - + for (; cell!=endc; ++cell) { cell_matrix = 0; - + fe_values.reinit (cell); const double diffusion_coefficient = material_data.get_diffusion_coefficient (group, cell->material_id()); const double removal_XS = material_data.get_removal_XS (group,cell->material_id()); - + for (unsigned int q_point=0; q_point::assemble_system_matrix () fe_values.shape_value(j,q_point)) * fe_values.JxW(q_point)); - + cell->get_dof_indices (local_dof_indices); for (unsigned int i=0; i::assemble_system_matrix () local_dof_indices[j], cell_matrix(i,j)); } - + hanging_node_constraints.condense (system_matrix); } @@ -1013,27 +1013,27 @@ void EnergyGroup::assemble_ingroup_rhs (const Function &extraneous_sou const unsigned int dofs_per_cell = fe.dofs_per_cell; const unsigned int n_q_points = quadrature_formula.size(); - - FEValues fe_values (fe, quadrature_formula, + + FEValues fe_values (fe, quadrature_formula, update_values | update_quadrature_points | update_JxW_values); - + Vector cell_rhs (dofs_per_cell); std::vector extraneous_source_values (n_q_points); std::vector solution_old_values (n_q_points); - + std::vector local_dof_indices (dofs_per_cell); - + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); - + for (; cell!=endc; ++cell) { cell_rhs = 0; - + fe_values.reinit (cell); - + const double fission_dist_XS = material_data.get_fission_dist_XS (group, group, cell->material_id()); @@ -1041,9 +1041,9 @@ void EnergyGroup::assemble_ingroup_rhs (const Function &extraneous_sou extraneous_source_values); fe_values.get_function_values (solution_old, solution_old_values); - + cell->get_dof_indices (local_dof_indices); - + for (unsigned int q_point=0; q_point::assemble_ingroup_rhs (const Function &extraneous_sou solution_old_values[q_point]) * fe_values.shape_value(i,q_point) * fe_values.JxW(q_point)); - + for (unsigned int i=0; i::assemble_cross_group_rhs (const EnergyGroup &g_prime { if (group == g_prime.group) return; - - const std::list::cell_iterator, + + const std::list::cell_iterator, typename DoFHandler::cell_iterator> > cell_list - = GridTools::get_finest_common_cells (dof_handler, + = GridTools::get_finest_common_cells (dof_handler, g_prime.dof_handler); - - typename std::list::cell_iterator, + + typename std::list::cell_iterator, typename DoFHandler::cell_iterator> > - ::const_iterator + ::const_iterator cell_iter = cell_list.begin(); - + for (; cell_iter!=cell_list.end(); ++cell_iter) { FullMatrix unit_matrix (fe.dofs_per_cell); @@ -1192,8 +1192,8 @@ assemble_cross_group_rhs_recursive (const EnergyGroup { const QGauss quadrature_formula (fe.degree+1); const unsigned int n_q_points = quadrature_formula.size(); - - FEValues fe_values (fe, quadrature_formula, + + FEValues fe_values (fe, quadrature_formula, update_values | update_JxW_values); if (cell_g->level() > cell_g_prime->level()) @@ -1226,7 +1226,7 @@ assemble_cross_group_rhs_recursive (const EnergyGroup fe_values.shape_value(i,q_point) * fe_values.shape_value(j,q_point) * fe_values.JxW(q_point)); - } + } // Now we have all the // interpolation (prolongation) @@ -1263,7 +1263,7 @@ assemble_cross_group_rhs_recursive (const EnergyGroup Vector g_prime_old_values (fe.dofs_per_cell); cell_g_prime->get_dof_values (g_prime.solution_old, g_prime_old_values); cell_g_prime->get_dof_values (g_prime.solution, g_prime_new_values); - + Vector cell_rhs (fe.dofs_per_cell); Vector tmp (fe.dofs_per_cell); @@ -1282,11 +1282,11 @@ assemble_cross_group_rhs_recursive (const EnergyGroup local_mass_matrix_g.vmult (tmp, g_prime_new_values); prolongation_matrix.Tvmult_add (cell_rhs, tmp); - } + } std::vector local_dof_indices (fe.dofs_per_cell); cell_g->get_dof_indices (local_dof_indices); - + for (unsigned int i=0; i::get_fission_source () const { const QGauss quadrature_formula (fe.degree + 1); const unsigned int n_q_points = quadrature_formula.size(); - - FEValues fe_values (fe, quadrature_formula, + + FEValues fe_values (fe, quadrature_formula, update_values | update_JxW_values); - + std::vector solution_values (n_q_points); double fission_source = 0; - + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end(); @@ -1358,13 +1358,13 @@ double EnergyGroup::get_fission_source () const = material_data.get_fission_XS(group, cell->material_id()); fe_values.get_function_values (solution, solution_values); - + for (unsigned int q_point=0; q_point::get_fission_source () const // hand side vector. template void -EnergyGroup::solve () +EnergyGroup::solve () { hanging_node_constraints.condense (system_rhs); MatrixTools::apply_boundary_values (boundary_values, system_matrix, solution, system_rhs); - + SolverControl solver_control (system_matrix.m(), 1e-12*system_rhs.l2_norm()); SolverCG<> cg (solver_control); PreconditionSSOR<> preconditioner; preconditioner.initialize(system_matrix, 1.2); - + cg.solve (system_matrix, solution, system_rhs, preconditioner); hanging_node_constraints.distribute (solution); @@ -1420,7 +1420,7 @@ template void EnergyGroup::estimate_errors (Vector &error_indicators) const { KellyErrorEstimator::estimate (dof_handler, - QGauss (fe.degree + 1), + QGauss (fe.degree + 1), typename FunctionMap::type(), solution, error_indicators); @@ -1458,13 +1458,13 @@ void EnergyGroup::refine_grid (const Vector &error_indicators, typename Triangulation::active_cell_iterator cell = triangulation.begin_active(), endc = triangulation.end(); - + for (unsigned int cell_index=0; cell!=endc; ++cell, ++cell_index) if (error_indicators(cell_index) > refine_threshold) cell->set_refine_flag (); else if (error_indicators(cell_index) < coarsen_threshold) cell->set_coarsen_flag (); - + SolutionTransfer soltrans(dof_handler); triangulation.prepare_coarsening_and_refinement(); @@ -1509,7 +1509,7 @@ EnergyGroup::output_results (const unsigned int cycle) const Utilities::int_to_string(cycle,1) + ".eps"; std::ofstream output (filename.c_str()); - + GridOut grid_out; grid_out.write_eps (triangulation, output); } @@ -1520,13 +1520,13 @@ EnergyGroup::output_results (const unsigned int cycle) const "." + Utilities::int_to_string(cycle,1) + ".gmv"; - + DataOut data_out; data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (solution, "solution"); data_out.build_patches (); - + std::ofstream output (filename.c_str()); data_out.write_gmv (output); } @@ -1587,14 +1587,14 @@ EnergyGroup::output_results (const unsigned int cycle) const // parameters from a ParameterHandler // object. template -class NeutronDiffusionProblem +class NeutronDiffusionProblem { public: class Parameters { public: Parameters (); - + static void declare_parameters (ParameterHandler &prm); void get_parameters (ParameterHandler &prm); @@ -1602,20 +1602,20 @@ class NeutronDiffusionProblem unsigned int n_refinement_cycles; unsigned int fe_degree; - + double convergence_tolerance; }; - - + + NeutronDiffusionProblem (const Parameters ¶meters); ~NeutronDiffusionProblem (); void run (); - + private: // @sect5{Private member functions} - + // There are not that many member // functions in this class since // most of the functionality has @@ -1738,7 +1738,7 @@ get_parameters (ParameterHandler &prm) - + // @sect4{Implementation of the NeutronDiffusionProblem class} // Now for the @@ -1758,7 +1758,7 @@ NeutronDiffusionProblem (const Parameters ¶meters) template -NeutronDiffusionProblem::~NeutronDiffusionProblem () +NeutronDiffusionProblem::~NeutronDiffusionProblem () { for (unsigned int group=0; group::initialize_problem() : Point (assemblies_x*rods_per_assembly_x*pin_pitch_x, assemblies_y*rods_per_assembly_y*pin_pitch_y, - assemblies_z*assembly_height)); + assemblies_z*assembly_height)); std::vector n_subdivisions; n_subdivisions.push_back (assemblies_x*rods_per_assembly_x); @@ -1821,7 +1821,7 @@ void NeutronDiffusionProblem::initialize_problem() n_subdivisions.push_back (assemblies_y*rods_per_assembly_y); if (dim >= 3) n_subdivisions.push_back (assemblies_z); - + Triangulation coarse_grid; GridGenerator::subdivided_hyper_rectangle (coarse_grid, n_subdivisions, @@ -1829,7 +1829,7 @@ void NeutronDiffusionProblem::initialize_problem() upper_right, true); - + // The second part of the function // deals with material numbers of // pin cells of each type of @@ -1888,7 +1888,7 @@ void NeutronDiffusionProblem::initialize_problem() { 1, 1, 1, 1, 1, 5, 1, 1, 5, 1, 1, 5, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } - }, + }, { { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, @@ -1924,9 +1924,9 @@ void NeutronDiffusionProblem::initialize_problem() { 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 2 }, { 2, 3, 3, 5, 3, 4, 4, 4, 4, 4, 4, 4, 3, 5, 3, 3, 2 }, { 2, 3, 3, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 3, 3, 2 }, - { 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2 }, + { 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2 }, { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 } - }, + }, { { 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 }, { 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 }, @@ -1957,7 +1957,7 @@ void NeutronDiffusionProblem::initialize_problem() // the 'UX' and 'PX' assemblies: const unsigned int core[assemblies_x][assemblies_y][assemblies_z] = {{{0}, {2}}, {{2}, {0}}}; - + // We are now in a position to // actually set material IDs for // each cell. To this end, we loop @@ -1978,7 +1978,7 @@ void NeutronDiffusionProblem::initialize_problem() ++cell) { const Point cell_center = cell->center(); - + const unsigned int tmp_x = int(cell_center[0]/pin_pitch_x); const unsigned int ax = tmp_x/rods_per_assembly_x; const unsigned int cx = tmp_x - ax * rods_per_assembly_x; @@ -2001,7 +2001,7 @@ void NeutronDiffusionProblem::initialize_problem() Assert (cx < rods_per_assembly_x, ExcInternalError()); Assert (cy < rods_per_assembly_y, ExcInternalError()); - + cell->set_material_id(assembly_materials[core[ax][ay][az]][cx][cy] - 1); } @@ -2045,7 +2045,7 @@ void NeutronDiffusionProblem::initialize_problem() // spawned returns a double. We can then later // ask this object for the returned value // (when doing so, the - // Threads::Thread@::return_value + // Threads::Thread::return_value // function first waits for the thread to // finish if it hasn't done so already). // @@ -2062,7 +2062,7 @@ double NeutronDiffusionProblem::get_total_fission_source () const for (unsigned int group=0; group::get_fission_source, *energy_groups[group])); - + double fission_source = 0; for (unsigned int group=0; group::refine_grid () BlockVector group_error_indicators(n_cells); - { + { Threads::ThreadGroup<> threads; for (unsigned int group=0; group::estimate_errors, @@ -2107,16 +2107,16 @@ void NeutronDiffusionProblem::refine_grid () group_error_indicators.block(group)); threads.join_all (); } - + const float max_error = group_error_indicators.linfty_norm(); const float refine_threshold = 0.3*max_error; const float coarsen_threshold = 0.01*max_error; - { + { Threads::ThreadGroup<> threads; for (unsigned int group=0; group::refine_grid, - *energy_groups[group], + *energy_groups[group], group_error_indicators.block(group), refine_threshold, coarsen_threshold); @@ -2138,7 +2138,7 @@ void NeutronDiffusionProblem::refine_grid () // there is actually not much to // comment on: template -void NeutronDiffusionProblem::run () +void NeutronDiffusionProblem::run () { std::cout << std::setprecision (12) << std::fixed; @@ -2146,11 +2146,11 @@ void NeutronDiffusionProblem::run () Timer timer; timer.start (); - + for (unsigned int cycle=0; cycle::run () refine_grid (); for (unsigned int group=0; groupsolution *= k_eff; - } + } for (unsigned int group=0; groupsetup_linear_system (); @@ -2173,8 +2173,8 @@ void NeutronDiffusionProblem::run () std::cout << energy_groups[group]->n_dofs() << ' '; std::cout << std::endl << std::endl; - - + + Threads::ThreadGroup<> threads; for (unsigned int group=0; group::run () for (unsigned int group=0; groupassemble_ingroup_rhs (ZeroFunction()); - + for (unsigned int bgroup=0; bgroupassemble_cross_group_rhs (*energy_groups[bgroup]); - + energy_groups[group]->solve (); } @@ -2214,7 +2214,7 @@ void NeutronDiffusionProblem::run () while((error > parameters.convergence_tolerance) && (iteration < 500)); - + for (unsigned int group=0; groupoutput_results (cycle); @@ -2225,7 +2225,7 @@ void NeutronDiffusionProblem::run () << ", time=" << timer() << std::endl; - + std::cout << std::endl << std::endl; } } @@ -2263,10 +2263,10 @@ void NeutronDiffusionProblem::run () // of type // NeutronDiffusionProblem // for computation of the eigenvalue: -int main (int argc, char ** argv) +int main (int argc, char ** argv) { const unsigned int dim = 2; - + try { deallog.depth_console (0); @@ -2277,17 +2277,17 @@ int main (int argc, char ** argv) else filename = argv[1]; - + ParameterHandler parameter_handler; - + NeutronDiffusionProblem::Parameters parameters; parameters.declare_parameters (parameter_handler); parameter_handler.read_input (filename); - + parameters.get_parameters (parameter_handler); - + NeutronDiffusionProblem neutron_diffusion_problem (parameters); neutron_diffusion_problem.run (); } @@ -2304,7 +2304,7 @@ int main (int argc, char ** argv) return 1; } - catch (...) + catch (...) { std::cerr << std::endl << std::endl << "----------------------------------------------------" diff --git a/deal.II/examples/step-5/doc/results.dox b/deal.II/examples/step-5/doc/results.dox index af25702644..7e0adf1d30 100644 --- a/deal.II/examples/step-5/doc/results.dox +++ b/deal.II/examples/step-5/doc/results.dox @@ -38,11 +38,11 @@ Cycle 5: An error occurred in line <273> of file in function void Coefficient::value_list(const std::vector, std::allocator > >&, std::vector >&, unsigned int) const [with int dim = 2] -The violated condition was: +The violated condition was: values.size() == points.size() The name and call sequence of the exception was: ExcDimensionMismatch (values.size(), points.size()) -Additional Information: +Additional Information: Dimension 1 not equal to 2 Stacktrace: @@ -110,11 +110,11 @@ As for the error — let's look at it again: An error occurred in line <273> of file in function void Coefficient::value_list(const std::vector, std::allocator > >&, std::vector >&, unsigned int) const [with int dim = 2] -The violated condition was: +The violated condition was: values.size() == points.size() The name and call sequence of the exception was: ExcDimensionMismatch (values.size(), points.size()) -Additional Information: +Additional Information: Dimension 1 not equal to 2 Stacktrace: @@ -150,13 +150,13 @@ output again. So now we know pretty exactly where the error happened and what went wrong. What we don't know yet is how exactly we got there. The stacktrace at the bottom actually tells us what happened: the problem -happened in +happened in Coefficient::value_list (stackframe 0) and that it was called from main() (stackframe 1). In realistic programs, there would be many more functions in between these two. For example, we might have made the mistake in the assemble_system function, in which case stack frame 1 would be -LaplaceProblem<2>::assemble_system, stack frame 2 -would be LaplaceProblem<2>::run, and stack frame 3 +LaplaceProblem::assemble_system, stack frame 2 +would be LaplaceProblem::run, and stack frame 3 would be main() — you get the idea. diff --git a/deal.II/examples/step-6/step-6.cc b/deal.II/examples/step-6/step-6.cc index 0050d8507b..7e77536c99 100644 --- a/deal.II/examples/step-6/step-6.cc +++ b/deal.II/examples/step-6/step-6.cc @@ -122,14 +122,14 @@ using namespace dealii; // clear when we discuss its // implementation. template -class LaplaceProblem +class LaplaceProblem { public: LaplaceProblem (); ~LaplaceProblem (); void run (); - + private: void setup_system (); void assemble_system (); @@ -164,14 +164,14 @@ class LaplaceProblem // from step-5: template -class Coefficient : public Function +class Coefficient : public Function { public: Coefficient () : Function() {} - + virtual double value (const Point &p, const unsigned int component = 0) const; - + virtual void value_list (const std::vector > &points, std::vector &values, const unsigned int component = 0) const; @@ -181,7 +181,7 @@ class Coefficient : public Function template double Coefficient::value (const Point &p, - const unsigned int) const + const unsigned int) const { if (p.square() < 0.5*0.5) return 20; @@ -194,16 +194,16 @@ double Coefficient::value (const Point &p, template void Coefficient::value_list (const std::vector > &points, std::vector &values, - const unsigned int component) const + const unsigned int component) const { const unsigned int n_points = points.size(); - Assert (values.size() == n_points, + Assert (values.size() == n_points, ExcDimensionMismatch (values.size(), n_points)); - - Assert (component == 0, + + Assert (component == 0, ExcIndexRange (component, 0, 1)); - + for (unsigned int i=0; i::LaplaceProblem () // destructor, to the end of the // results section of this example. template -LaplaceProblem::~LaplaceProblem () +LaplaceProblem::~LaplaceProblem () { dof_handler.clear (); } @@ -413,7 +413,7 @@ void LaplaceProblem::setup_system () solution.reinit (dof_handler.n_dofs()); system_rhs.reinit (dof_handler.n_dofs()); - + // After setting up all the degrees // of freedoms, here are now the // differences compared to step-5, @@ -471,7 +471,7 @@ void LaplaceProblem::setup_system () // sparsity pattern immediately. CompressedSparsityPattern c_sparsity(dof_handler.n_dofs()); DoFTools::make_sparsity_pattern (dof_handler, c_sparsity); - + // The constrained hanging nodes // will later be eliminated from // the linear system of @@ -550,11 +550,11 @@ void LaplaceProblem::setup_system () // code and nothing that you have to // worry about. template -void LaplaceProblem::assemble_system () -{ +void LaplaceProblem::assemble_system () +{ const QGauss quadrature_formula(3); - FEValues fe_values (fe, quadrature_formula, + FEValues fe_values (fe, quadrature_formula, update_values | update_gradients | update_quadrature_points | update_JxW_values); @@ -581,7 +581,7 @@ void LaplaceProblem::assemble_system () coefficient.value_list (fe_values.get_quadrature_points(), coefficient_values); - + for (unsigned int q_point=0; q_point::assemble_system () system_matrix.add (local_dof_indices[i], local_dof_indices[j], cell_matrix(i,j)); - + system_rhs(local_dof_indices[i]) += cell_rhs(i); } } @@ -693,7 +693,7 @@ void LaplaceProblem::assemble_system () // find at the end of this function: template -void LaplaceProblem::solve () +void LaplaceProblem::solve () { SolverControl solver_control (1000, 1e-12); SolverCG<> cg (solver_control); @@ -798,7 +798,7 @@ void LaplaceProblem::solve () // corresponding Neumann values. This // information is represented by an // object of type - // FunctionMap@::type that is + // FunctionMap::type that is // essentially a map from boundary // indicators to function objects // describing Neumann boundary values @@ -973,7 +973,7 @@ void LaplaceProblem::output_results (const unsigned int cycle) const std::string filename = "grid-"; filename += ('0' + cycle); filename += ".eps"; - + std::ofstream output (filename.c_str()); GridOut grid_out; @@ -1034,7 +1034,7 @@ void LaplaceProblem::output_results (const unsigned int cycle) const // The rest of the loop looks as // before: template -void LaplaceProblem::run () +void LaplaceProblem::run () { for (unsigned int cycle=0; cycle<8; ++cycle) { @@ -1051,7 +1051,7 @@ void LaplaceProblem::run () } else refine_grid (); - + std::cout << " Number of active cells: " << triangulation.n_active_cells() @@ -1062,7 +1062,7 @@ void LaplaceProblem::run () std::cout << " Number of degrees of freedom: " << dof_handler.n_dofs() << std::endl; - + assemble_system (); solve (); output_results (cycle); @@ -1082,14 +1082,14 @@ void LaplaceProblem::run () // factor of four. DataOutBase::EpsFlags eps_flags; eps_flags.z_scaling = 4; - + DataOut data_out; data_out.set_flags (eps_flags); data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (solution, "solution"); data_out.build_patches (); - + std::ofstream output ("final-solution.eps"); data_out.write_eps (output); } @@ -1136,7 +1136,7 @@ void LaplaceProblem::run () // actually encodes the functionality // particular to the present // application. -int main () +int main () { // The general idea behind the @@ -1160,7 +1160,7 @@ int main () // use the what member function // to get a string which describes // the reason why the exception was - // thrown. + // thrown. // // The deal.II exception classes // are all derived from the @@ -1205,7 +1205,7 @@ int main () // can't do anything at all. We // then simply print an error // message and exit. - catch (...) + catch (...) { std::cerr << std::endl << std::endl << "----------------------------------------------------" diff --git a/deal.II/examples/step-8/step-8.cc b/deal.II/examples/step-8/step-8.cc index c4dc5eb8d4..539fe87c31 100644 --- a/deal.II/examples/step-8/step-8.cc +++ b/deal.II/examples/step-8/step-8.cc @@ -3,7 +3,7 @@ /* $Id$ */ /* */ -/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008 by the deal.II authors */ +/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2010 by the deal.II authors */ /* */ /* This file is subject to QPL and may not be distributed */ /* without copyright and license information. Please refer */ @@ -83,13 +83,13 @@ using namespace dealii; // below in the constructor of this // class. template -class ElasticProblem +class ElasticProblem { public: ElasticProblem (); ~ElasticProblem (); void run (); - + private: void setup_system (); void assemble_system (); @@ -137,11 +137,11 @@ class ElasticProblem // the scalar function used in // previous programs. template -class RightHandSide : public Function +class RightHandSide : public Function { public: RightHandSide (); - + // The next change is that we // want a replacement for the // value function of the @@ -248,12 +248,12 @@ RightHandSide::RightHandSide () template inline void RightHandSide::vector_value (const Point &p, - Vector &values) const + Vector &values) const { - Assert (values.size() == dim, + Assert (values.size() == dim, ExcDimensionMismatch (values.size(), dim)); Assert (dim >= 2, ExcNotImplemented()); - + // The rest of the function // implements computing force // values. We will use a constant @@ -275,7 +275,7 @@ void RightHandSide::vector_value (const Point &p, Point point_1, point_2; point_1(0) = 0.5; point_2(0) = -0.5; - + // If now the point p is in a // circle (sphere) of radius 0.2 // around one of these points, then @@ -286,7 +286,7 @@ void RightHandSide::vector_value (const Point &p, values(0) = 1; else values(0) = 0; - + // Likewise, if p is in the // vicinity of the origin, then set // the y-force to 1, otherwise to @@ -294,7 +294,7 @@ void RightHandSide::vector_value (const Point &p, if (p.square() < 0.2*0.2) values(1) = 1; else - values(1) = 0; + values(1) = 0; } @@ -314,9 +314,9 @@ void RightHandSide::vector_value (const Point &p, // make some things simpler below. template void RightHandSide::vector_value_list (const std::vector > &points, - std::vector > &value_list) const + std::vector > &value_list) const { - Assert (value_list.size() == points.size(), + Assert (value_list.size() == points.size(), ExcDimensionMismatch (value_list.size(), points.size())); const unsigned int n_points = points.size(); @@ -338,7 +338,7 @@ void RightHandSide::vector_value_list (const std::vector > &poin // // We can prevent this situation by // calling - // RightHandSide@::vector_valued + // RightHandSide::vector_value // on each point in the input // list. Note that by giving the // full name of the function, @@ -449,7 +449,7 @@ ElasticProblem::ElasticProblem () // The destructor, on the other hand, // is exactly as in step-6: template -ElasticProblem::~ElasticProblem () +ElasticProblem::~ElasticProblem () { dof_handler.clear (); } @@ -534,11 +534,11 @@ void ElasticProblem::setup_system () // this is not explicit knowledge we // need to care about: template -void ElasticProblem::assemble_system () -{ +void ElasticProblem::assemble_system () +{ QGauss quadrature_formula(2); - FEValues fe_values (fe, quadrature_formula, + FEValues fe_values (fe, quadrature_formula, update_values | update_gradients | update_quadrature_points | update_JxW_values); @@ -601,7 +601,7 @@ void ElasticProblem::assemble_system () cell_rhs = 0; fe_values.reinit (cell); - + // Next we get the values of // the coefficients at the // quadrature points. Likewise @@ -611,7 +611,7 @@ void ElasticProblem::assemble_system () right_hand_side.vector_value_list (fe_values.get_quadrature_points(), rhs_values); - + // Then assemble the entries of // the local stiffness matrix // and right hand side @@ -661,19 +661,19 @@ void ElasticProblem::assemble_system () // contributions: for (unsigned int i=0; i::assemble_system () // introduction: for (unsigned int i=0; i::assemble_system () system_matrix.add (local_dof_indices[i], local_dof_indices[j], cell_matrix(i,j)); - + system_rhs(local_dof_indices[i]) += cell_rhs(i); } } @@ -854,7 +854,7 @@ void ElasticProblem::assemble_system () // the system indeed is. Therefore, // we need not change anything. template -void ElasticProblem::solve () +void ElasticProblem::solve () { SolverControl solver_control (1000, 1e-12); SolverCG<> cg (solver_control); @@ -932,14 +932,14 @@ void ElasticProblem::output_results (const unsigned int cycle) const std::string filename = "solution-"; filename += ('0' + cycle); Assert (cycle < 10, ExcInternalError()); - + filename += ".gmv"; std::ofstream output (filename.c_str()); DataOut data_out; data_out.attach_dof_handler (dof_handler); - + // As said above, we need a // different name for each @@ -988,18 +988,18 @@ void ElasticProblem::output_results (const unsigned int cycle) const solution_names.push_back ("displacement"); break; case 2: - solution_names.push_back ("x_displacement"); + solution_names.push_back ("x_displacement"); solution_names.push_back ("y_displacement"); break; case 3: - solution_names.push_back ("x_displacement"); + solution_names.push_back ("x_displacement"); solution_names.push_back ("y_displacement"); solution_names.push_back ("z_displacement"); break; default: Assert (false, ExcNotImplemented()); } - + // After setting up the names for // the different components of the // solution vector, we can add the @@ -1104,7 +1104,7 @@ void ElasticProblem::output_results (const unsigned int cycle) const // cells without actually refining // the grid.) template -void ElasticProblem::run () +void ElasticProblem::run () { for (unsigned int cycle=0; cycle<8; ++cycle) { @@ -1127,7 +1127,7 @@ void ElasticProblem::run () std::cout << " Number of degrees of freedom: " << dof_handler.n_dofs() << std::endl; - + assemble_system (); solve (); output_results (cycle); @@ -1139,7 +1139,7 @@ void ElasticProblem::run () // The main function is again exactly // like in step-6 (apart from the // changed class names, of course). -int main () +int main () { try { @@ -1158,10 +1158,10 @@ int main () << "Aborting!" << std::endl << "----------------------------------------------------" << std::endl; - + return 1; } - catch (...) + catch (...) { std::cerr << std::endl << std::endl << "----------------------------------------------------" diff --git a/deal.II/examples/step-9/step-9.cc b/deal.II/examples/step-9/step-9.cc index 026426c6fc..cc8682c2c3 100644 --- a/deal.II/examples/step-9/step-9.cc +++ b/deal.II/examples/step-9/step-9.cc @@ -3,7 +3,7 @@ /* $Id$ */ /* */ -/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008 by the deal.II authors */ +/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2010 by the deal.II authors */ /* */ /* This file is subject to QPL and may not be distributed */ /* without copyright and license information. Please refer */ @@ -86,13 +86,13 @@ using namespace dealii; // previous examples, so we again // only comment on the differences. template -class AdvectionProblem +class AdvectionProblem { public: AdvectionProblem (); ~AdvectionProblem (); void run (); - + private: void setup_system (); // The next function will be used @@ -135,7 +135,7 @@ class AdvectionProblem void assemble_system (); void assemble_system_interval (const typename DoFHandler::active_cell_iterator &begin, const typename DoFHandler::active_cell_iterator &end); - + // The following functions again // are as in previous examples, // as are the subsequent @@ -245,9 +245,9 @@ class AdvectionField : public TensorFunction<1,dim> { public: AdvectionField () : TensorFunction<1,dim> () {} - + virtual Tensor<1,dim> value (const Point &p) const; - + virtual void value_list (const std::vector > &points, std::vector > &values) const; @@ -334,8 +334,8 @@ class AdvectionField : public TensorFunction<1,dim> // assertion as in this case can // eliminate many of these problems. template -Tensor<1,dim> -AdvectionField::value (const Point &p) const +Tensor<1,dim> +AdvectionField::value (const Point &p) const { Point value; value[0] = 2; @@ -350,11 +350,11 @@ AdvectionField::value (const Point &p) const template void AdvectionField::value_list (const std::vector > &points, - std::vector > &values) const + std::vector > &values) const { Assert (values.size() == points.size(), ExcDimensionMismatch (values.size(), points.size())); - + for (unsigned int i=0; i::value (points[i]); } @@ -387,14 +387,14 @@ class RightHandSide : public Function { public: RightHandSide () : Function() {} - + virtual double value (const Point &p, const unsigned int component = 0) const; - + virtual void value_list (const std::vector > &points, std::vector &values, const unsigned int component = 0) const; - + private: static const Point center_point; }; @@ -434,7 +434,7 @@ const Point<3> RightHandSide<3>::center_point = Point<3> (-0.75, -0.75, -0.75); template double RightHandSide::value (const Point &p, - const unsigned int component) const + const unsigned int component) const { Assert (component == 0, ExcIndexRange (component, 0, 1)); const double diameter = 0.1; @@ -449,11 +449,11 @@ template void RightHandSide::value_list (const std::vector > &points, std::vector &values, - const unsigned int component) const + const unsigned int component) const { Assert (values.size() == points.size(), ExcDimensionMismatch (values.size(), points.size())); - + for (unsigned int i=0; i::value (points[i], component); } @@ -472,7 +472,7 @@ class BoundaryValues : public Function virtual double value (const Point &p, const unsigned int component = 0) const; - + virtual void value_list (const std::vector > &points, std::vector &values, const unsigned int component = 0) const; @@ -483,7 +483,7 @@ class BoundaryValues : public Function template double BoundaryValues::value (const Point &p, - const unsigned int component) const + const unsigned int component) const { Assert (component == 0, ExcIndexRange (component, 0, 1)); @@ -498,11 +498,11 @@ template void BoundaryValues::value_list (const std::vector > &points, std::vector &values, - const unsigned int component) const + const unsigned int component) const { Assert (values.size() == points.size(), ExcDimensionMismatch (values.size(), points.size())); - + for (unsigned int i=0; i::value (points[i], component); } @@ -631,7 +631,7 @@ class GradientEstimation static void estimate_interval (const DoFHandler &dof, const Vector &solution, const IndexInterval &index_interval, - Vector &error_per_cell); + Vector &error_per_cell); }; @@ -655,7 +655,7 @@ AdvectionProblem::AdvectionProblem () : template -AdvectionProblem::~AdvectionProblem () +AdvectionProblem::~AdvectionProblem () { dof_handler.clear (); } @@ -701,7 +701,7 @@ void AdvectionProblem::setup_system () // same size and assembling on each // of these chunks in parallel. template -void AdvectionProblem::assemble_system () +void AdvectionProblem::assemble_system () { // First, we want to find out how // many threads shall assemble the @@ -824,7 +824,7 @@ void AdvectionProblem::assemble_system () // only for a range of cell // iterators, but for iterators in // general, so you could use it for - // std::vector@::iterator or + // std::vector::iterator or // usual pointers as well. // // The function returns a vector of @@ -857,7 +857,7 @@ void AdvectionProblem::assemble_system () // an alias. typedef typename DoFHandler::active_cell_iterator active_cell_iterator; std::vector > - thread_ranges + thread_ranges = Threads::split_range (dof_handler.begin_active (), dof_handler.end (), n_threads); @@ -925,7 +925,7 @@ void AdvectionProblem::assemble_system () // multi-threading, then no threads // can run in parallel and the // function returns immediately. - threads.join_all (); + threads.join_all (); // After the matrix has been @@ -948,7 +948,7 @@ void AdvectionProblem::assemble_system () } - + // Now, this is the function that // does the actual work. It is not // very different from the @@ -962,7 +962,7 @@ template void AdvectionProblem:: assemble_system_interval (const typename DoFHandler::active_cell_iterator &begin, - const typename DoFHandler::active_cell_iterator &end) + const typename DoFHandler::active_cell_iterator &end) { // First of all, we will need some // objects that describe boundary @@ -978,7 +978,7 @@ assemble_system_interval (const typename DoFHandler::active_cell_iterator & const AdvectionField advection_field; const RightHandSide right_hand_side; const BoundaryValues boundary_values; - + // Next we need quadrature formula // for the cell terms, but also for // the integral over the inflow @@ -989,7 +989,7 @@ assemble_system_interval (const typename DoFHandler::active_cell_iterator & // direction are sufficient. QGauss quadrature_formula(2); QGauss face_quadrature_formula(2); - + // Finally, we need objects of type // FEValues and // FEFaceValues. For the cell @@ -1006,7 +1006,7 @@ assemble_system_interval (const typename DoFHandler::active_cell_iterator & // integrals, we don't need the // gradients, but rather the normal // vectors to the cells. - FEValues fe_values (fe, quadrature_formula, + FEValues fe_values (fe, quadrature_formula, update_values | update_gradients | update_quadrature_points | update_JxW_values); FEFaceValues fe_face_values (fe, face_quadrature_formula, @@ -1140,7 +1140,7 @@ assemble_system_interval (const typename DoFHandler::active_cell_iterator & // FEFaceValues object // for the present face: fe_face_values.reinit (cell, face); - + // For the quadrature // points at hand, we ask // for the values of the @@ -1151,7 +1151,7 @@ assemble_system_interval (const typename DoFHandler::active_cell_iterator & face_boundary_values); advection_field.value_list (fe_face_values.get_quadrature_points(), face_advection_directions); - + // Now loop over all // quadrature points and // see whether it is on @@ -1203,7 +1203,7 @@ assemble_system_interval (const typename DoFHandler::active_cell_iterator & fe_face_values.shape_value(i,q_point) * fe_face_values.shape_value(j,q_point) * fe_face_values.JxW(q_point)); - + cell_rhs(i) -= (face_advection_directions[q_point] * fe_face_values.normal_vector(q_point) * face_boundary_values[q_point] * @@ -1211,7 +1211,7 @@ assemble_system_interval (const typename DoFHandler::active_cell_iterator & fe_face_values.JxW(q_point)); }; }; - + // Now go on by transferring // the local contributions to @@ -1282,7 +1282,7 @@ assemble_system_interval (const typename DoFHandler::active_cell_iterator & system_matrix.add (local_dof_indices[i], local_dof_indices[j], cell_matrix(i,j)); - + system_rhs(local_dof_indices[i]) += cell_rhs(i); }; assembler_lock.release (); @@ -1341,7 +1341,7 @@ assemble_system_interval (const typename DoFHandler::active_cell_iterator & // method. As preconditioner, we use // the Jacobi method. template -void AdvectionProblem::solve () +void AdvectionProblem::solve () { SolverControl solver_control (1000, 1e-12); SolverBicgstab<> bicgstab (solver_control); @@ -1393,7 +1393,7 @@ void AdvectionProblem::output_results (const unsigned int cycle) const std::string filename = "grid-"; filename += ('0' + cycle); Assert (cycle < 10, ExcInternalError()); - + filename += ".eps"; std::ofstream output (filename.c_str()); @@ -1405,7 +1405,7 @@ void AdvectionProblem::output_results (const unsigned int cycle) const // ... as is the main loop (setup -- // solve -- refine) template -void AdvectionProblem::run () +void AdvectionProblem::run () { for (unsigned int cycle=0; cycle<6; ++cycle) { @@ -1420,7 +1420,7 @@ void AdvectionProblem::run () { refine_grid (); }; - + std::cout << " Number of active cells: " << triangulation.n_active_cells() @@ -1431,7 +1431,7 @@ void AdvectionProblem::run () std::cout << " Number of degrees of freedom: " << dof_handler.n_dofs() << std::endl; - + assemble_system (); solve (); output_results (cycle); @@ -1441,7 +1441,7 @@ void AdvectionProblem::run () data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (solution, "solution"); data_out.build_patches (); - + std::ofstream output ("final-solution.gmv"); data_out.write_gmv (output); } @@ -1456,7 +1456,7 @@ void AdvectionProblem::run () // except for delegating work to the // other function: template -void +void GradientEstimation::estimate (const DoFHandler &dof_handler, const Vector &solution, Vector &error_per_cell) @@ -1587,7 +1587,7 @@ GradientEstimation::estimate (const DoFHandler &dof_handler, // // Now for the details: template -void +void GradientEstimation::estimate_interval (const DoFHandler &dof_handler, const Vector &solution, const IndexInterval &index_interval, @@ -1614,7 +1614,7 @@ GradientEstimation::estimate_interval (const DoFHandler &dof_handler, FEValues fe_midpoint_value (dof_handler.get_fe(), midpoint_rule, update_values | update_quadrature_points); - + // Then we need space foe the // tensor Y, which is the sum // of outer products of the @@ -1657,7 +1657,7 @@ GradientEstimation::estimate_interval (const DoFHandler &dof_handler, // element for this iterator. Vector::iterator error_on_this_cell = error_per_cell.begin() + index_interval.first; - + // Then we allocate a vector to // hold iterators to all active @@ -1747,9 +1747,9 @@ GradientEstimation::estimate_interval (const DoFHandler &dof_handler, // abbreviation for the // iterator to the face // and the neighbor - const typename DoFHandler::face_iterator + const typename DoFHandler::face_iterator face = cell->face(face_no); - const typename DoFHandler::cell_iterator + const typename DoFHandler::cell_iterator neighbor = cell->neighbor(face_no); // Then check whether the @@ -1792,7 +1792,7 @@ GradientEstimation::estimate_interval (const DoFHandler &dof_handler, neighbor_child = neighbor; while (neighbor_child->has_children()) neighbor_child = neighbor_child->child (face_no==0 ? 1 : 0); - + // As this used // some // non-trivial @@ -1876,7 +1876,7 @@ GradientEstimation::estimate_interval (const DoFHandler &dof_handler, // here. Assert (neighbor_child->neighbor(face_no==0 ? 1 : 0)==cell, ExcInternalError()); - + // If the check // succeeded, we // push the @@ -1922,7 +1922,7 @@ GradientEstimation::estimate_interval (const DoFHandler &dof_handler, std::vector this_midpoint_value(1); fe_midpoint_value.get_function_values (solution, this_midpoint_value); - + // Now loop over all active neighbors // and collect the data we @@ -1947,7 +1947,7 @@ GradientEstimation::estimate_interval (const DoFHandler &dof_handler, // neighbor cell: const typename DoFHandler::active_cell_iterator neighbor = *neighbor_ptr; - + // Then get the center of // the neighbor cell and // the value of the finite @@ -1976,14 +1976,14 @@ GradientEstimation::estimate_interval (const DoFHandler &dof_handler, Point y = neighbor_center - this_center; const double distance = std::sqrt(y.square()); y /= distance; - + // Then add up the // contribution of this // cell to the Y matrix... for (unsigned int i=0; i &dof_handler, // right powers of the mesh // width: const Tensor<2,dim> Y_inverse = invert(Y); - + Point gradient; contract (gradient, Y_inverse, projected_gradient); - + *error_on_this_cell = (std::pow(cell->diameter(), 1+1.0*dim/2) * std::sqrt(gradient.square())); @@ -2074,7 +2074,7 @@ GradientEstimation::estimate_interval (const DoFHandler &dof_handler, // the only difference in the name of // the main class that actually does // the computation. -int main () +int main () { try { @@ -2095,7 +2095,7 @@ int main () << std::endl; return 1; } - catch (...) + catch (...) { std::cerr << std::endl << std::endl << "----------------------------------------------------" diff --git a/deal.II/lac/include/lac/constraint_matrix.h b/deal.II/lac/include/lac/constraint_matrix.h index dd7a32f0c9..4796d5219b 100644 --- a/deal.II/lac/include/lac/constraint_matrix.h +++ b/deal.II/lac/include/lac/constraint_matrix.h @@ -374,7 +374,7 @@ class ConstraintMatrix : public Subscriptor * filter. Constrained dofs are * transformed to local index space of * the filter, and elements not present - * in the IndexSet are ignored. + * in the IndexSet are ignored. * * This function provides an easy way to * create a ConstraintMatrix for certain @@ -467,7 +467,7 @@ class ConstraintMatrix : public Subscriptor * set_inhomogeneity(). */ void add_lines (const IndexSet &lines); - + /** * Add an entry to a given * line. The list of lines is @@ -1336,7 +1336,7 @@ class ConstraintMatrix : public Subscriptor * Does the same as the function above * but can treat * non quadratic matrices. - */ + */ template void distribute_local_to_global (const FullMatrix &local_matrix, @@ -1649,7 +1649,7 @@ class ConstraintMatrix : public Subscriptor * vector instead of a map and the * consequences thereof, the same * applies as what is said for - * ConstraintMatrix@p ::lines. + * ConstraintMatrix::lines. */ Entries entries; diff --git a/deal.II/lac/include/lac/solver_gmres.h b/deal.II/lac/include/lac/solver_gmres.h index e14a1b5108..73b3d0ab0a 100644 --- a/deal.II/lac/include/lac/solver_gmres.h +++ b/deal.II/lac/include/lac/solver_gmres.h @@ -303,7 +303,8 @@ class SolverGMRES : public Solver * Krylov space method inside the preconditioner. * * FGMRES needs two vectors in each iteration steps yielding a total - * of 2*AdditionalData::max_basis_size+1 auxiliary vectors. + * of 2 * SolverFGMRESAdditionalData::max_basis_size+1 + * auxiliary vectors. * * Caveat: documentation of this class is not up to date. There are * also a few parameters of GMRES we would like to introduce here. @@ -707,7 +708,7 @@ SolverGMRES::solve (const MATRIX &A, const double s = vv.l2_norm(); h(inner_iteration+1) = s; //TODO: s=0 is a lucky breakdown. Handle this somehow decently - + vv *= 1./s; /* Transformation into -- 2.39.5