Dune Core Modules (2.3.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#include <dune/grid/alugrid/common/declaration.hh>
11#include <dune/grid/alugrid/common/checkparallel.hh>
12#include <dune/geometry/genericgeometry/topologytypes.hh>
13
19namespace Dune
20{
21
22 namespace Capabilities
23 {
24
25 // Capabilities for ALUGrid
26 // -------------------------------
27
31 template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm >
32 struct hasSingleGeometryType< ALUGrid< dim, dimworld, eltype, refinementtype, Comm > >
33 {
34 static const bool v = true;
35 static const unsigned int topologyId = (eltype == cube) ?
36 GenericGeometry :: CubeTopology< dim > :: type :: id :
37 GenericGeometry :: SimplexTopology< dim > :: type :: id ;
38 };
39
43 template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm, int cdim >
44 struct hasEntity< ALUGrid< dim, dimworld, eltype, refinementtype, Comm >, cdim >
45 {
46 static const bool v = true;
47 };
48
52 template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype >
53 struct isParallel< ALUGrid< dim, dimworld, eltype, refinementtype, No_Comm > >
54 {
55 static const bool v = false;
56 };
57
61#if ALU3DGRID_PARALLEL
62 template< ALUGridElementType eltype, ALUGridRefinementType refinementtype >
63 struct isParallel< ALUGrid< 3, 3, eltype, refinementtype, MPI_Comm > >
64 {
65 static const bool v = true;
66 };
67#endif
68
72 template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, int codim >
73 struct canCommunicate< ALUGrid< dim, dimworld, eltype, refinementtype, No_Comm >, codim >
74 {
75 static const bool v = false;
76 };
77
81#if ALU3DGRID_PARALLEL
82 template< ALUGridElementType eltype, ALUGridRefinementType refinementtype, int codim >
83 struct canCommunicate< ALUGrid< 3, 3, eltype, refinementtype, MPI_Comm >, codim >
84 {
85 static const bool v = true;
86 };
87#endif
88
92 template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm >
93 struct isLevelwiseConforming< ALUGrid< dim, dimworld, eltype, refinementtype, Comm > >
94 {
95 static const bool v = refinementtype == nonconforming;
96 };
97
101 template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm >
102 struct isLeafwiseConforming< ALUGrid< dim, dimworld, eltype, refinementtype, Comm > >
103 {
104 static const bool v = refinementtype == conforming ;
105 };
106
110 template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm >
111 struct hasBackupRestoreFacilities< ALUGrid< dim, dimworld, eltype, refinementtype, Comm > >
112 {
113 static const bool v = true;
114 };
115
116 } // end namespace Capabilities
117
118} //end namespace Dune
119
120#endif // #if HAVE_ALUGRID
121
122#endif // #ifdef DUNE_ALUGRID_CAPABILITIES_HH
A set of traits classes to store static information about grid implementation.
Dune namespace.
Definition: alignment.hh:14
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)