From: David Wells Date: Wed, 9 Dec 2015 14:04:43 +0000 (-0500) Subject: Overhaul the documentation of Concepts. X-Git-Tag: v8.4.0-rc2~161^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ca0137c5f087a5e1d88b63e4a15bc108f37caeb;p=dealii.git Overhaul the documentation of Concepts. --- 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