[Dune] specializing template classes for Dune::Grid
Jö Fahlke
jorrit at jorrit.de
Mon Sep 1 23:14:22 CEST 2014
Am Mon, 1. Sep 2014, 23:01:03 +0200 schrieb Jö Fahlke:
> The other specialization can be done like this:
>
> template<class G>
> struct SomeClass<G, typename std::enable_if<
> G::dimension == 2 &&
> Dune::Capabilities::hasSingleGeometryType<G>::topologyId == topologyIdForQuad
> >::type>
> { /* specialization for dim==1 */ };
Oh, I forgot: The test for the topologyId is probably better written like this:
template<class G>
struct SomeClass<G, typename std::enable_if<
G::dimension == 2 &&
Dune::GenericGeometry::IsCube<
Dune::GenericGeometry::Topology<
Dune::Capabilities::hasSingleGeometryType<G>::topologyId,
G::dimension
>
>::value
>::type>
{ /* specialization for dim==1 */ };
See
http://www.dune-project.org/doc/doxygen/html/topologytypes_8hh_source.html.
Regards,
Jö.
--
Jorrit (Jö) Fahlke, Institute for Computational und Applied Mathematics,
University of Münster, Orleans-Ring 10, D-48149 Münster
Tel: +49 251 83 35146 Fax: +49 251 83 32729
If God had intended Man to Smoke, He would have set him on Fire.
-- fortune
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20140901/70a81d89/attachment.sig>
More information about the Dune
mailing list