1 #ifndef DUNE_FEM_MISC_BOUNDARYIDPROVIDER_HH 2 #define DUNE_FEM_MISC_BOUNDARYIDPROVIDER_HH 4 #if not DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS 5 #error "Experimental grid extensions required. Reconfigure with --enable-experimental-grid-extensions." 6 #endif // #if not DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS 9 #include <dune/grid/spgrid/declaration.hh> 10 #endif // #if HAVE_DUNE_SPGRID 20 template<
class Gr
id >
31 template<
class Gr
id >
40 template<
int dim,
int dimW >
45 template<
class Intersection >
46 static int boundaryId (
const Intersection &intersection )
48 return intersection.impl().boundaryId();
51 #endif // #if HAVE_ALBERTA 58 #if HAVE_ALUGRID || HAVE_DUNE_ALUGRID 59 template<
int dim,
int dimw, ALUGr
idElementType elType, ALUGr
idRefinementType refineType,
class Comm >
62 typedef ALUGrid< dim, dimw, elType, refineType, Comm > GridType;
64 template<
class Intersection >
65 static int boundaryId (
const Intersection &intersection )
67 return intersection.impl().boundaryId();
70 #endif // #if HAVE_ALUGRID || HAVE_DUNE_ALUGRID 78 template<
int dim,
int dimw >
81 typedef ALUConformGrid< dim, dimw > GridType;
83 template<
class Intersection >
84 static int boundaryId (
const Intersection &intersection )
86 return intersection.impl().boundaryId();
89 #endif // #if HAVE_ALUGRID 97 template<
int dim,
int dimw >
100 typedef ALUCubeGrid< dim, dimw > GridType;
102 template<
class Intersection >
103 static int boundaryId (
const Intersection &intersection )
105 return intersection.impl().boundaryId();
108 #endif // #if HAVE_ALUGRID 116 template<
int dim,
int dimw >
119 typedef ALUSimplexGrid< dim, dimw > GridType;
121 template<
class Intersection >
122 static int boundaryId (
const Intersection &intersection )
124 return intersection.impl().boundaryId();
127 #endif // #if HAVE_ALUGRID 134 #if HAVE_DUNE_METAGRID 135 template<
class HostGr
id >
138 typedef CacheItGrid< HostGrid > GridType;
140 template<
class Intersection >
141 static int boundaryId (
const Intersection &intersection )
147 #endif // #if HAVE_DUNE_METAGRID 154 #if HAVE_DUNE_METAGRID 155 template<
class HostGr
id >
158 typedef CartesianGrid< HostGrid > GridType;
160 template<
class Intersection >
161 static int boundaryId (
const Intersection &intersection )
167 #endif // #if HAVE_DUNE_METAGRID 174 #if HAVE_DUNE_METAGRID 175 template<
class HostGr
id >
178 typedef FilteredGrid< HostGrid > GridType;
182 template<
class Intersection >
183 static int boundaryId (
const Intersection &intersection )
185 if( !iHostGridAccess< GridType >::getIntersection( intersection ).boundary() )
186 DUNE_THROW( NotImplemented,
"BoundaryIdProvider for artificial boundaries of FilteredGrid not implemented." );
191 #endif // #if HAVE_DUNE_METAGRID 198 template<
class HostGr
id,
class CoordFunction,
class Allocator >
201 typedef GeometryGrid< HostGrid, CoordFunction, Allocator >
GridType;
203 template<
class Intersection >
216 #if HAVE_DUNE_METAGRID 217 template<
class HostGr
id >
220 typedef IdGrid< HostGrid > GridType;
222 template<
class Intersection >
223 static int boundaryId (
const Intersection &intersection )
229 #endif // #if HAVE_DUNE_METAGRID 241 template<
class Intersection >
244 return intersection.boundarySegmentIndex();
253 #if HAVE_DUNE_METAGRID 254 template<
class HostGr
id >
257 typedef ParallelGrid< HostGrid > GridType;
259 template<
class Intersection >
260 static int boundaryId (
const Intersection &intersection )
266 #endif // #if HAVE_DUNE_METAGRID 273 template<
int dim,
int dimw,
class ctype >
278 template<
class Intersection >
281 return (intersection.boundary() ? (intersection.indexInInside()+1) : 0);
290 #if HAVE_DUNE_METAGRID 291 template<
class HostGr
id,
class MapToSphere >
294 typedef SphereGrid< HostGrid, MapToSphere > GridType;
296 template<
class Intersection >
297 static int boundaryId (
const Intersection &intersection )
303 #endif // #if HAVE_DUNE_METAGRID 311 template<
class ct,
int dim,
template<
int >
class Strategy,
class Comm >
314 typedef SPGrid< ct, dim, Strategy, Comm > GridType;
316 template<
class Intersection >
317 static int boundaryId (
const Intersection &intersection )
319 return (intersection.boundary() ? (intersection.indexInInside()+1) : 0);
322 #endif // #if HAVE_DUNE_SPGRID 334 template<
class Intersection >
337 return intersection.boundarySegmentIndex();
346 template<
int dim,
class CoordCont >
351 template<
class Intersection >
354 return (intersection.boundary() ? (intersection.indexInInside()+1) : 0);
362 #endif // #ifndef DUNE_FEM_MISC_BOUNDARYIDPROVIDER_HH Definition: griddeclaration.hh:41
Definition: griddeclaration.hh:38
Definition: griddeclaration.hh:44
SGrid< dim, dimw, ctype > GridType
Definition: boundaryidprovider.hh:276
static int boundaryId(const Intersection &intersection)
Definition: boundaryidprovider.hh:204
Definition: boundaryidprovider.hh:21
GeometryGrid< HostGrid, CoordFunction, Allocator > GridType
Definition: boundaryidprovider.hh:201
static int boundaryId(const Intersection &intersection)
Definition: boundaryidprovider.hh:242
static int boundaryId(const Intersection &intersection)
Definition: boundaryidprovider.hh:352
Definition: griddeclaration.hh:35
YaspGrid< dim, CoordCont > GridType
Definition: boundaryidprovider.hh:349
Definition: boundaryidprovider.hh:32
OneDGrid GridType
Definition: boundaryidprovider.hh:239
Definition: coordinate.hh:4
static int boundaryId(const Intersection &intersection)
Definition: boundaryidprovider.hh:335
UGGrid< dim > GridType
Definition: boundaryidprovider.hh:332
static int boundaryId(const Intersection &intersection)
Definition: boundaryidprovider.hh:279