Dune Core Modules (2.4.1)

capabilities.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_ALUGRID_CAPABILITIES_HH
4#define DUNE_ALUGRID_CAPABILITIES_HH
5
6// only include this code, if ENABLE_ALUGRID is defined
7#if HAVE_ALUGRID
8
10
12#include <dune/grid/alugrid/common/declaration.hh>
13#include <dune/grid/alugrid/common/checkparallel.hh>
14#include <dune/geometry/genericgeometry/topologytypes.hh>
15
21namespace Dune
22{
23
24 namespace Capabilities
25 {
26
27 // Capabilities for ALUGrid
28 // -------------------------------
29
33 template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm >
34 struct hasSingleGeometryType< ALUGrid< dim, dimworld, eltype, refinementtype, Comm > >
35 {
36 static const bool v = true;
37 static const unsigned int topologyId = (eltype == cube) ?
38 GenericGeometry :: CubeTopology< dim > :: type :: id :
39 GenericGeometry :: SimplexTopology< dim > :: type :: id ;
40 };
41
45 template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm, int cdim >
46 struct hasEntity< ALUGrid< dim, dimworld, eltype, refinementtype, Comm >, cdim >
47 {
48 static const bool v = true;
49 };
50
54 template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype >
55 struct DUNE_DEPRECATED_MSG("Capabilities::isParallel will be removed after dune-grid-2.4.") isParallel< ALUGrid< dim, dimworld, eltype, refinementtype, No_Comm > >
56 {
57 static const bool DUNE_DEPRECATED_MSG("Capabilities::isParallel will be removed after dune-grid-2.4.") v = false;
58 };
59
63#if ALU3DGRID_PARALLEL
64 template< ALUGridElementType eltype, ALUGridRefinementType refinementtype >
65 struct DUNE_DEPRECATED_MSG("Capabilities::isParallel will be removed after dune-grid-2.4.") isParallel< ALUGrid< 3, 3, eltype, refinementtype, MPI_Comm > >
66 {
67 static const bool DUNE_DEPRECATED_MSG("Capabilities::isParallel will be removed after dune-grid-2.4.") v = true;
68 };
69#endif
70
74 template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, int codim >
75 struct canCommunicate< ALUGrid< dim, dimworld, eltype, refinementtype, No_Comm >, codim >
76 {
77 static const bool v = false;
78 };
79
83#if ALU3DGRID_PARALLEL
84 template< ALUGridElementType eltype, ALUGridRefinementType refinementtype, int codim >
85 struct canCommunicate< ALUGrid< 3, 3, eltype, refinementtype, MPI_Comm >, codim >
86 {
87 static const bool v = true;
88 };
89#endif
90
94 template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm >
95 struct isLevelwiseConforming< ALUGrid< dim, dimworld, eltype, refinementtype, Comm > >
96 {
97 static const bool v = refinementtype == nonconforming;
98 };
99
103 template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm >
104 struct isLeafwiseConforming< ALUGrid< dim, dimworld, eltype, refinementtype, Comm > >
105 {
106 static const bool v = refinementtype == conforming ;
107 };
108
112 template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm >
113 struct hasBackupRestoreFacilities< ALUGrid< dim, dimworld, eltype, refinementtype, Comm > >
114 {
115 static const bool v = true;
116 };
117
118 } // end namespace Capabilities
119
120} //end namespace Dune
121
122#endif // #if HAVE_ALUGRID
123
124#endif // #ifdef DUNE_ALUGRID_CAPABILITIES_HH
A set of traits classes to store static information about grid implementation.
Definition of the DUNE_DEPRECATED macro for the case that config.h is not available.
struct DUNE_DEPRECATED_MSG("Capabilities::isParallel will be removed after dune-grid-2.4.") isParallel< ALU3dGrid< elType
YaspGrid is parallel.
Dune namespace.
Definition: alignment.hh:10
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 22, 23:30, 2024)