From: Wolfgang Bangerth Date: Tue, 17 Jan 2006 20:36:20 +0000 (+0000) Subject: Move more classes into modules. More general doc updates. X-Git-Tag: v8.0.0~12604 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67812de912d59f29f6b2cbd58e3a533293ae5c51;p=dealii.git Move more classes into modules. More general doc updates. git-svn-id: https://svn.dealii.org/trunk@12068 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/geometry_info.h b/deal.II/base/include/base/geometry_info.h index ca85c9daea..b89b5970b9 100644 --- a/deal.II/base/include/base/geometry_info.h +++ b/deal.II/base/include/base/geometry_info.h @@ -22,6 +22,83 @@ template class GeometryInfo; + +/** + * Dimension independent base class for the GeometryInfo + * classes with dim=1,2,3,4. Includes all data and methods + * which can be defined in an dimension indendent way. + * + * @ingroup grid geomprimitives + * @author Ralf Hartmann, 2005 + */ +class GeometryInfoBase +{ + private: + /** + * The maximal dimension for + * which data in this class is + * implemented. + */ + static const unsigned int max_dim = 4; + + /** + * Number of faces of a cell for + * dim=max_dim. + */ + static const unsigned int faces_per_cell_max_dim = 2*max_dim; + + public: + + /** + * For each face of the reference + * cell, this field stores the + * coordinate direction in which + * its normal vector points. In + * dim dimension these + * are the 2*dim first + * entries of + * {0,0,1,1,2,2,3,3}. + * + * Remark that this is only the + * coordinate number. The actual + * direction of the normal vector + * is obtained by multiplying the + * unit vector in this direction + * with #unit_normal_orientation. + */ + static const unsigned int unit_normal_direction[faces_per_cell_max_dim]; + + /** + * Orientation of the unit normal + * vector of a face of the + * reference cell. In + * dim dimension these + * are the 2*dim first + * entries of + * {-1,1,-1,1,-1,1,-1,1}. + * + * Each value is either + * 1 or -1, + * corresponding to a normal + * vector pointing in the + * positive or negative + * coordinate direction, + * respectively. + */ + static const int unit_normal_orientation[faces_per_cell_max_dim]; + + /** + * List of numbers which denotes + * which face is opposite to a + * given face. Its entries are + * { 1, 0, 3, 2, 5, 4, 7, 6}. + */ + static const unsigned int opposite_face[faces_per_cell_max_dim]; +}; + + + + /** * Topological description of zero dimensional cells, * i.e. points. This class might not look too useful but often is if @@ -39,7 +116,7 @@ template class GeometryInfo; * vertices, neighbors and so on, since it can be used dimension * independently. * - * @ingroup grid + * @ingroup grid geomprimitives * @author Wolfgang Bangerth, 1998 */ template <> @@ -108,86 +185,13 @@ struct GeometryInfo<0> -//! Topological description of cells. -/** - * Dimension independent base class for the GeometryInfo - * classes with dim=1,2,3,4. Includes all data and methods - * which can be defined in an dimension indendent way. - * - * @author Ralf Hartmann, 2005 - */ -class GeometryInfoBase -{ - private: - /** - * The maximal dimension for - * which data in this class is - * implemented. - */ - static const unsigned int max_dim = 4; - - /** - * Number of faces of a cell for - * dim=max_dim. - */ - static const unsigned int faces_per_cell_max_dim = 2*max_dim; - - public: - - /** - * For each face of the reference - * cell, this field stores the - * coordinate direction in which - * its normal vector points. In - * dim dimension these - * are the 2*dim first - * entries of - * {0,0,1,1,2,2,3,3}. - * - * Remark that this is only the - * coordinate number. The actual - * direction of the normal vector - * is obtained by multiplying the - * unit vector in this direction - * with #unit_normal_orientation. - */ - static const unsigned int unit_normal_direction[faces_per_cell_max_dim]; - - /** - * Orientation of the unit normal - * vector of a face of the - * reference cell. In - * dim dimension these - * are the 2*dim first - * entries of - * {-1,1,-1,1,-1,1,-1,1}. - * - * Each value is either - * 1 or -1, - * corresponding to a normal - * vector pointing in the - * positive or negative - * coordinate direction, - * respectively. - */ - static const int unit_normal_orientation[faces_per_cell_max_dim]; - - /** - * List of numbers which denotes - * which face is opposite to a - * given face. Its entries are - * { 1, 0, 3, 2, 5, 4, 7, 6}. - */ - static const unsigned int opposite_face[faces_per_cell_max_dim]; -}; - /** * This template specifies the interface to all topological structure * of the mesh cells. * - * @ingroup grid + * @ingroup grid geomprimitives * @ref Instantiations few (dim = 1,2,3,4 and a specialization for dim=0) * @author Wolfgang Bangerth, 1998, Ralf Hartmann, 2005 */ diff --git a/deal.II/base/include/base/point.h b/deal.II/base/include/base/point.h index 83fdaa2c16..b55398be71 100644 --- a/deal.II/base/include/base/point.h +++ b/deal.II/base/include/base/point.h @@ -44,6 +44,7 @@ * 1, or vector, with as many elements as a point object, but with different * physical units), we use the Tensor<1,dim> class. * + * @ingroup geomprimitives * @author Wolfgang Bangerth, 1997 */ template diff --git a/deal.II/base/include/base/symmetric_tensor.h b/deal.II/base/include/base/symmetric_tensor.h index a7ff65fcc7..24369e5953 100644 --- a/deal.II/base/include/base/symmetric_tensor.h +++ b/deal.II/base/include/base/symmetric_tensor.h @@ -599,6 +599,7 @@ namespace internal * application programs to restrict operations on individual elements * to simple reads or writes. * + * @ingroup geomprimitives * @author Wolfgang Bangerth, 2005 */ template diff --git a/deal.II/base/include/base/tensor.h b/deal.II/base/include/base/tensor.h index 73dd8bba2a..54888b2b04 100644 --- a/deal.II/base/include/base/tensor.h +++ b/deal.II/base/include/base/tensor.h @@ -32,6 +32,9 @@ template class Tensor<1,dim>; * as well as the location of the data. It is therefore possible to * produce far more efficient code than for matrices with * runtime-dependent dimension. + * + * @ingroup geomprimitives + * @author Wolfgang Bangerth, 1998-2005 */ template class Tensor @@ -465,6 +468,8 @@ Tensor::memory_consumption () * Output operator for tensors. Print the elements consecutively, with * a space in between, two spaces between rank 1 subtensors, three * between rank 2 and so on. + * + * @relates Tensor */ template inline diff --git a/deal.II/base/include/base/tensor_base.h b/deal.II/base/include/base/tensor_base.h index d35e4b9977..11d1f269ad 100644 --- a/deal.II/base/include/base/tensor_base.h +++ b/deal.II/base/include/base/tensor_base.h @@ -60,6 +60,9 @@ template class Tensor<1,dim>; * other uses, such as the gradient of a scalar function (which is a tensor of * rank 1, or vector, with as many elements as a point object, but with * different physical units), we use the Tensor<1,dim> class. + * + * @ingroup geomprimitives + * @author Wolfgang Bangerth, 1998-2005 */ template class Tensor<1,dim> @@ -706,10 +709,14 @@ Tensor<1,dim>::memory_consumption () } +#endif // DOXYGEN + /** * Output operator for tensors of rank 1. Print the elements * consecutively, with a space in between. + * + * @relates Tensor<1,dim> */ template inline @@ -728,6 +735,8 @@ std::ostream & operator << (std::ostream &out, const Tensor<1,dim> &p) * Output operator for tensors of rank 1 and dimension 1. This is * implemented specialized from the general template in order to avoid * a compiler warning that the loop is empty. + * + * @relates Tensor<1,dim> */ inline std::ostream & operator << (std::ostream &out, const Tensor<1,1> &p) @@ -741,6 +750,8 @@ std::ostream & operator << (std::ostream &out, const Tensor<1,1> &p) /** * Multiplication of a tensor of rank 1 with a scalar double from the right. + * + * @relates Tensor<1,dim> */ template inline @@ -758,6 +769,8 @@ operator * (const Tensor<1,dim> &t, /** * Multiplication of a tensor of rank 1 with a scalar double from the left. + * + * @relates Tensor<1,dim> */ template inline @@ -775,6 +788,8 @@ operator * (const double factor, /** * Division of a tensor of rank 1 by a scalar double. + * + * @relates Tensor<1,dim> */ template inline @@ -788,8 +803,6 @@ operator / (const Tensor<1,dim> &t, return tt; } -#endif // DOXYGEN - #endif diff --git a/deal.II/doc/doxygen/headers/geometry_and_primitives.h b/deal.II/doc/doxygen/headers/geometry_and_primitives.h new file mode 100644 index 0000000000..ad6e0b16ad --- /dev/null +++ b/deal.II/doc/doxygen/headers/geometry_and_primitives.h @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2006 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//------------------------------------------------------------------------- + +/** + * @defgroup geomprimitives Geometric and other primitives + * + * This group contains a number of classes that act as geometric + * primitives or primitives for other mathematical objects. For + * example, the Tensor class provides tensors of rank + * rank in dim space dimensions. Likewise, + * the SymmetricTensor offers symmetric tensors. + * + * Geometrically, the Point class is the foundation of all geometric + * descriptions in the deal.II library. It denotes a geometric point + * in dim dimensional space. One can view a point as a + * vector the with dim coordinates that connects the + * origin with that particular point; as such, the Point class is + * derived from tensors of rank 1 (i.e. vectors), but in contrast to + * arbitrary tensors points have the special connotation of points in + * space, and therefore have some additional properties. + * + * In deal.II, meshes are built from line segments, quadrilaterals, or + * hexahedra (depending on the space dimension). The GeometryInfo + * class is used to describe properties of these basic objects in unit + * space (i.e. for the unit line, unit square, and unit cube). It + * offers static data members denoting the number of vertices per + * cell, lines per face, or where which vertex is located. This + * abstraction allows to write applications mostly independently of + * the actual space dimension: loops over all vertices would simply + * run from zero to GeometryInfo::vertices_per_cell instead of + * from 0 to 4 (in 2d) or 0 to 8 (in 3d). In this way, the program + * will be correct in 2d as well as 3d, and one can run a program in a + * different space dimension simply by recompilation instead of having + * to change a significant portion of the code. These + * dimension-independent programming techniques are extensively + * discussed in the first few tutorial programs and are used + * throughout deal.II. + */ + diff --git a/deal.II/doc/doxygen/headers/io.h b/deal.II/doc/doxygen/headers/io.h index 4a67a567ab..51010d7ba6 100644 --- a/deal.II/doc/doxygen/headers/io.h +++ b/deal.II/doc/doxygen/headers/io.h @@ -37,7 +37,15 @@ * associated Patterns namespace) are used to deal with parameter files * describing run-time parameters to a program that one doesn't want to * hard-code within the program source. - * + * + * + *

The PathSearch class

+ * + * The PathSearch class is a helper class in input handling. It is + * used to find a file in a list of directories, in much the same way + * as unix systems find executables among the directories listed in + * the PATH environment variable. + * * @ingroup IO */ @@ -49,6 +57,9 @@ * itself), and it can create output used for visualization of data. Finally, * it can output matrices in a graphical format. * + * In addition, deal.II has a number of helper classes for + * output. They are introduced in sections of their own below. + * * *

Visualization of data

* @@ -108,5 +119,27 @@ * MatrixOut class uses the DataOutBase for output. Therefore, matrices can be * visualization in all formats supported by the latter class. * + * + *

The ConditionalOStream class

+ * + * The ConditionalOStream class is a class that acts like + * std::ostream in that you can pipe output into it using + * operator <<. However, it only writes these + * things to a file (or the screen) if a flag is set. This is useful + * in parallel programs, and is discussed in the step-17 tutorial + * program. + * + * + *

LogStream

+ * + * The LogStream class is used to write status output of programs to + * logfiles. It, again, acts like std::ostream, but + * instead of writing things to a file or the screen only, it has the + * ability to write things to both a log file as well as the + * screen. It can also add a time stamp to each line of output, and + * can selectively write only certain parts of the output that are + * interesting enough to the screen, and suppress other parts that + * then only show up in the log file. + * * @ingroup IO */