[Dune] [Dune-Commit] [Commit] dune-geometry - bf6f58c: [Tags] Add tags for dimension and codimension

Markus Blatt markus at dr-blatt.de
Mon Jul 21 10:36:32 CEST 2014


Hi,

On Fri, Jul 18, 2014 at 11:22:51AM +0200, Steffen Müthing wrote:
> New commit, appeared at Fri Jul 18 11:22:51 2014 +0200
> as part of the following ref changes:
> 
>     branch refs/heads/feature/FS1042-pdesoft-proposal    created as              bf6f58c
> 
> Browsable version: http://cgit.dune-project.org/repositories/dune-geometry/commit/?id=bf6f58c8c4accd18ee5ea493d2a259d47caab56a
> 
> ======================================================================
> 
> commit bf6f58c8c4accd18ee5ea493d2a259d47caab56a
> Author: Steffen Müthing <muething at dune-project.org>
> Date:   Fri Jul 18 11:21:35 2014 +0200
> 
>     [Tags] Add tags for dimension and codimension
>
>  [...]
> diff --git a/dune/geometry/dimension.hh b/dune/geometry/dimension.hh
> new file mode 100644
> index 0000000..c32feec
> --- /dev/null
> +++ b/dune/geometry/dimension.hh
> @@ -0,0 +1,28 @@
> +// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
> +// vi: set et ts=4 sw=2 sts=2:
> +#ifndef DUNE_GEOMETRY_DIMENSION_HH
> +#define DUNE_GEOMETRY_DIMENSION_HH
> +
> +#include <type_traits>
> +
> +namespace Dune {
> +
> +  //! Static tag representing a dimension.
> +  template<int dim>
> +  struct Dim
> +    : public std::integral_constant<int,dim>
> +  {
> +    typedef Dim type;
> +  };
> +
> +  //! Static tag representing a codimension.
> +  template<int codim>
> +  struct Codim
> +    : public std::integral_constant<int,codim>
> +  {
> +    typedef Codim type;
> +  };
> +
> +}
> +
> +#endif // DUNE_GEOMETRY_DIMENSION_HH

given the lack of documentation this is probably clear to everybody
else, but I still do not see it:

Why is the typedef type needed and what is it used for.

Markus

-- 
Do you need more support with DUNE or HPC in general? 

Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20140721/51db362b/attachment.sig>


More information about the Dune mailing list