From 3ca0137c5f087a5e1d88b63e4a15bc108f37caeb Mon Sep 17 00:00:00 2001 From: David Wells Date: Wed, 9 Dec 2015 09:04:43 -0500 Subject: [PATCH] Overhaul the documentation of Concepts. --- doc/doxygen/headers/concepts.h | 210 ++++++++++++++++++++++++ doc/doxygen/headers/glossary.h | 8 + doc/doxygen/headers/laoperators.h | 8 +- doc/doxygen/headers/matrices.h | 58 +------ doc/doxygen/headers/preconditioners.h | 77 ++------- doc/doxygen/headers/vectors.h | 7 +- doc/news/changes.h | 6 + include/deal.II/multigrid/mg_smoother.h | 8 +- 8 files changed, 254 insertions(+), 128 deletions(-) create mode 100644 doc/doxygen/headers/concepts.h diff --git a/doc/doxygen/headers/concepts.h b/doc/doxygen/headers/concepts.h new file mode 100644 index 0000000000..1cc7cb09bc --- /dev/null +++ b/doc/doxygen/headers/concepts.h @@ -0,0 +1,210 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2015 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + + +/** + * @defgroup Concepts Concepts, or expectations on template parameters + * + * Sometimes imposing constraints on the type of an object without requiring + * it to belong to a specific inheritance hierarchy is useful. These are + * usually referred to as concepts in the C++ community. This module + * lists the concepts commonly used in deal.II with brief descriptions of + * their intent. The convention in deal.II for listing constraints on a type + * is to provide the name of the concept as a typename in a + * template: for example, the type of a Vector depends on the type of the + * underlying field, but Vector is not a field element, so it is defined as a + * template: + * @code + * template + * class Vector; + * @endcode + * Where @ref ConceptNumber "Number" is understood to be an appropriate field + * element type. + * + *
+ * + *
@anchor ConceptContainerType ContainerType
+ * + *
+ + * There are several algorithms (e.g., + * GridTools::find_active_cell_around_point) in deal.II that can operate on + * either a Triangulation or a DoFHandler, as both classes may be considered + * to be collections of cells: see the @ref GlossMeshAsAContainer + * "glossary entry" for a further discussion of this idea. %Functions that may + * be called with either class indicate this by accepting a template parameter + * like + * @code + * template