│ │ │
│ │ │
│ │ │
│ │ │ -
5#ifndef DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC
│ │ │ -
6#define DUNE_GRID_COMMON_REFINEMENT_SIMPLEX_CC
│ │ │ +
5#ifndef DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC
│ │ │ +
6#define DUNE_GEOMETRY_REFINEMENT_PRISMTRIANGULATION_CC
│ │ │
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +
8#include <dune/common/fvector.hh>
│ │ │ +
9#include <dune/common/typetraits.hh>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ -
│ │ │ -
│ │ │ -
245#include <dune/common/fvector.hh>
│ │ │ -
246#include <dune/common/math.hh>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
256 namespace RefinementImp {
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
279 template<
int dimension>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
283 for(
int i = 0; i < dimension; ++i)
│ │ │ -
284 index += Dune::binomial(dimension-i + point[i]-1, dimension-i);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
295 FieldVector<int, n> perm;
│ │ │ -
296 for(
int i = 0; i < n; ++i)
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
300 for(
int i = 1; i <= n; ++i)
│ │ │ -
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
19 namespace RefinementImp
│ │ │ +
│ │ │ +
│ │ │ +
26 namespace PrismTriangulation
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
42 template<
int dimension,
class CoordType,
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
49 template<
int dimension,
class CoordType> FieldVector<CoordType, dimension>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
52 FieldVector<CoordType, dimension> transform;
│ │ │ +
53 transform[0] = point[1];
│ │ │ +
54 transform[1] = 1 - point[0];
│ │ │ +
55 transform[2] = point[2];
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
65 template<
int dimension_,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
73 template<
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
95 template<
int dimension,
class CoordType>
│ │ │ +
96 template<
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
99 class SubEntityIterator;
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
103 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
108 return BackendRefinement::nVertices(nIntervals) * 3;
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
111 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
119 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
127 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
132 return BackendRefinement::nElements(nIntervals) * 3;
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
135 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
143 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
157 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
176 constexpr static int nKuhnSimplices = 3;
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
185 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
188 : nIntervals_(nIntervals), kuhnIndex(0),
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
193 kuhnIndex = nKuhnSimplices;
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
196 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
202 if (backend == backendEnd)
│ │ │ +
│ │ │ +
204 backend = BackendRefinement::vBegin(nIntervals_);
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
209 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
216 getPermutation<dimension>((kuhnIndex + 2) % 4)));
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
219 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
223 std::vector<CoordVector> corners(1);
│ │ │ +
│ │ │ +
225 getPermutation<dimension>((kuhnIndex + 2) % 4)));
│ │ │ +
226 return Geometry(GeometryTypes::vertex, corners);
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
229 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
234 return kuhnIndex*BackendRefinement::nVertices(nIntervals_) + backend.index();
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
238 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
263 constexpr static int nKuhnSimplices = 3;
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
272 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
275 : nIntervals_(nIntervals), kuhnIndex(0),
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
280 kuhnIndex = nKuhnSimplices;
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
283 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
289 if (backend == backendEnd)
│ │ │ +
│ │ │ +
291 backend = BackendRefinement::eBegin(nIntervals_);
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
296 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ -
303 for(
int i = n; i > 0; --i) {
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
307 int t = perm[i-1]; perm[i-1] = perm[i-1-d]; perm[i-1-d] = t;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
320 template<
int dimension,
class CoordType>
│ │ │ -
321 FieldVector<CoordType, dimension>
│ │ │ -
│ │ │ -
│ │ │ -
323 FieldVector<CoordType, dimension> point,
│ │ │ -
325 const FieldVector<int, dimension> &kuhn)
│ │ │ -
│ │ │ -
327 for(
int i = dimension - 1; i > 0; --i)
│ │ │ -
328 point[kuhn[i-1]] += point[kuhn[i]];
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
339 template<
int dimension,
class CoordType>
│ │ │ -
340 FieldVector<CoordType, dimension>
│ │ │ -
│ │ │ -
│ │ │ -
342 FieldVector<CoordType, dimension> point,
│ │ │ -
344 const FieldVector<int, dimension> &kuhn)
│ │ │ -
│ │ │ -
346 for(
int i = 0; i < dimension - 1; ++i)
│ │ │ -
347 point[kuhn[i]] -= point[kuhn[i+1]];
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
359 template<
int dimension_,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +
303 int base = kuhnIndex * BackendRefinement::nVertices(nIntervals_);
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
309 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
314 return kuhnIndex*BackendRefinement::nElements(nIntervals_) + backend.index();
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
317 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
322 return global(backend.coords());
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
325 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
329 const typename BackendIterator::Geometry &bgeo =
│ │ │ +
│ │ │ +
331 std::vector<CoordVector> corners(dimension+1);
│ │ │ +
332 for(
int i = 0; i <= dimension; ++i)
│ │ │ +
333 corners[i] = global(bgeo.corner(i));
│ │ │ +
│ │ │ +
335 return Geometry(bgeo.type(), corners);
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
338 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
341 global(
const CoordVector &local)
const
│ │ │ +
│ │ │ +
│ │ │ +
344 return transformCoordinate(referenceToKuhn(local, getPermutation<dimension>((kuhnIndex+2)%4)));
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
348 template<
int dimension,
class CoordType>
│ │ │ +
349 template<
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
351 :
public ForwardIteratorFacade<typename RefinementImp<dimension, CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
356 typedef SubEntityIterator
This;
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ -
366 template<
int codimension>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
382 template<
int dimension,
class CoordType>
│ │ │ -
383 template<
int codimension>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
386 class SubEntityIterator;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
391 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
396 return Dune::binomial(dimension + nIntervals, (
int)dimension);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
399 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
407 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
415 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
420 return Dune::power(nIntervals,
int(dimension));
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
423 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
431 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
444 template<
int dimension,
class CoordType,
int codimension>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
449 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
461 bool equals(
const This &other)
const;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
468 typedef FieldVector<int, dimension>
Vertex;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
474 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
479 vertex[0] = (end) ? size + 1 : 0;
│ │ │ -
480 for(
int i = 1; i < dimension; ++ i)
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
484 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
489 assert(vertex[0] <= size);
│ │ │ -
490 for(
int i = dimension - 1; i >= 0; --i) {
│ │ │ -
│ │ │ -
492 if(i == 0 || vertex[i] <= vertex[i-1])
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
499 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
504 return size == other.
size && vertex == other.
vertex;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
507 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
515 for(
int i = 0; i < dimension; ++i)
│ │ │ -
516 coords[i] = CoordType(ref[i]) / size;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
520 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
524 std::vector<CoordVector> corners(1);
│ │ │ -
│ │ │ -
526 return Geometry(GeometryTypes::vertex, corners);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
529 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
539 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
552 bool equals(
const This &other)
const;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
564 typedef FieldVector<int, dimension>
Vertex;
│ │ │ -
565 constexpr static int nKuhnIntervals = Dune::factorial(dimension);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
573 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
576 : kuhnIndex(0), size(nIntervals), index_(0)
│ │ │ -
│ │ │ -
578 for(
int i = 0; i < dimension; ++i)
│ │ │ -
│ │ │ -
│ │ │ -
581 index_ = Refinement::nElements(nIntervals);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
586 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
591 assert(origin[0] < size);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
597 if(kuhnIndex == nKuhnIntervals) {
│ │ │ -
│ │ │ -
│ │ │ -
600 for(
int i = dimension - 1; i >= 0; --i) {
│ │ │ -
│ │ │ -
602 if(i == 0 || origin[i] <= origin[i-1])
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
610 FieldVector<int, dimension> perm = getPermutation<dimension>(kuhnIndex);
│ │ │ -
│ │ │ -
612 bool outside =
false;
│ │ │ -
613 for(
int i = 0; i < dimension; ++i) {
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
617 if(corner[perm[i]] > corner[perm[i]-1]) {
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
627 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
632 return size == other.
size && index_ == other.
index_;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
635 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
641 FieldVector<int, dimension> perm = getPermutation<dimension>(kuhnIndex);
│ │ │ -
│ │ │ -
│ │ │ -
644 for(
int i = 0; i < dimension; ++i) {
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
648 if (kuhnIndex%2 == 1)
│ │ │ -
649 for(
int i = 0; i < (dimension+1)/2; ++i) {
│ │ │ -
│ │ │ -
651 indices[i] = indices[dimension-i];
│ │ │ -
652 indices[dimension-i] = t;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
657 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
665 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
671 ::simplex().position(0,0));
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
674 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
678 std::vector<CoordVector> corners(dimension+1);
│ │ │ -
│ │ │ -
680 for(
int i = 0; i <= dimension; ++i)
│ │ │ -
681 corners[i] = global(refelem.position(i, dimension));
│ │ │ -
682 return Geometry(refelem.type(), corners);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
685 template<
int dimension,
class CoordType>
│ │ │ -
│ │ │ -
│ │ │ -
688 global(
const CoordVector &local)
const {
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
692 v /= (
typename CoordVector::value_type)size;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
698 template<
int dimension,
class CoordType>
│ │ │ -
699 template<
int codimension>
│ │ │ -
│ │ │ -
│ │ │ -
701 :
public ForwardIteratorFacade<typename RefinementImp<dimension, CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
712 template<
int dimension,
class CoordType>
│ │ │ -
713 template<
int codimension>
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
726 namespace RefinementImp {
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
734 template<
unsigned topologyId,
class CoordType,
unsigned coerceToId,
│ │ │ -
│ │ │ -
│ │ │ -
737 topologyId, CoordType, coerceToId, dim,
│ │ │ -
738 typename
std::enable_if<
│ │ │ -
739 ((GeometryTypes::simplex(dim).id() >> 1) ==
│ │ │ -
│ │ │ -
741 (GeometryTypes::simplex(dim).id() >> 1) ==
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
746 typedef Simplex::RefinementImp<dim, CoordType> Imp;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ -
This file contains the parts independent of a particular Refinement implementation.
│ │ │ -
│ │ │ -
│ │ │ +
│ │ │ +
367 template<
int dimension,
class CoordType>
│ │ │ +
368 template<
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
374 template<
int dimension,
class CoordType>
│ │ │ +
375 template<
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
378 equals(
const This &other)
const
│ │ │ +
│ │ │ +
380 return ((kuhnIndex == other.kuhnIndex) && (backend == other.backend));
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
387 namespace RefinementImp
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
395 template<
unsigned topologyId,
class CoordType,
unsigned coerceToId>
│ │ │ +
│ │ │ +
397 topologyId, CoordType, coerceToId, 3,
│ │ │ +
398 typename
std::enable_if<
│ │ │ +
399 (GeometryTypes::prism.id() >> 1) ==
│ │ │ +
│ │ │ +
401 (GeometryTypes::simplex(3).id() >> 1) ==
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
405 typedef PrismTriangulation::RefinementImp<3, CoordType> Imp;
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ +
│ │ │ +
This file contains the parts independent of a particular Refinement implementation.
│ │ │ +
This file contains the Refinement implementation for simplices (triangles, tetrahedrons....
│ │ │
│ │ │
Definition affinegeometry.hh:21
│ │ │ -
int pointIndex(const FieldVector< int, dimension > &point)
calculate the index of a given gridpoint within a Kuhn0 simplex
Definition simplex.cc:280
│ │ │ +
FieldVector< CoordType, dimension > transformCoordinate(FieldVector< CoordType, dimension > point)
Definition prismtriangulation.cc:50
│ │ │
FieldVector< int, n > getPermutation(int m)
Calculate permutation from it's index.
Definition simplex.cc:293
│ │ │
FieldVector< CoordType, dimension > referenceToKuhn(FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
Map from the reference simplex to some Kuhn simplex.
Definition simplex.cc:322
│ │ │ -
FieldVector< CoordType, dimension > kuhnToReference(FieldVector< CoordType, dimension > point, const FieldVector< int, dimension > &kuhn)
Map from some Kuhn simplex to the reference simplex.
Definition simplex.cc:341
│ │ │ -
Class providing access to the singletons of the reference elements.
Definition referenceelements.hh:128
│ │ │ -
static const ReferenceElement & simplex()
get simplex reference elements
Definition referenceelements.hh:162
│ │ │
Static tag representing a codimension.
Definition dimension.hh:24
│ │ │ -
Implement a MultiLinearGeometry with additional caching.
Definition multilineargeometry.hh:526
│ │ │ +
generic geometry implementation based on corner coordinates
Definition multilineargeometry.hh:181
│ │ │ +
Definition prismtriangulation.cc:43
│ │ │ +
Implementation of the refinement of a prism into simplices.
Definition prismtriangulation.cc:67
│ │ │ +
static constexpr int dimension
Definition prismtriangulation.cc:69
│ │ │ +
CoordType ctype
Definition prismtriangulation.cc:71
│ │ │ +
static VertexIterator vEnd(int nIntervals)
Definition prismtriangulation.cc:122
│ │ │ +
FieldVector< int, dimension+1 > IndexVector
Definition prismtriangulation.cc:78
│ │ │ +
static ElementIterator eEnd(int nIntervals)
Definition prismtriangulation.cc:146
│ │ │ +
static int nVertices(int nIntervals)
Definition prismtriangulation.cc:106
│ │ │ +
FieldVector< CoordType, dimension > CoordVector
Definition prismtriangulation.cc:76
│ │ │ +
static int nElements(int nIntervals)
Definition prismtriangulation.cc:130
│ │ │ +
Codim< 0 >::SubEntityIterator ElementIterator
Definition prismtriangulation.cc:77
│ │ │ +
Codim< dimension >::SubEntityIterator VertexIterator
Definition prismtriangulation.cc:75
│ │ │ +
static ElementIterator eBegin(int nIntervals)
Definition prismtriangulation.cc:138
│ │ │ +
static VertexIterator vBegin(int nIntervals)
Definition prismtriangulation.cc:114
│ │ │ +
Definition prismtriangulation.cc:98
│ │ │ +
Dune::MultiLinearGeometry< CoordType, dimension-codimension, dimension > Geometry
Definition prismtriangulation.cc:100
│ │ │ +
int nIntervals_
Definition prismtriangulation.cc:178
│ │ │ +
Refinement::template Codim< dimension >::Geometry Geometry
Definition prismtriangulation.cc:163
│ │ │ +
Refinement::BackendRefinement BackendRefinement
Definition prismtriangulation.cc:174
│ │ │ +
BackendRefinement::template Codim< dimension >::SubEntityIterator BackendIterator
Definition prismtriangulation.cc:175
│ │ │ +
Refinement::CoordVector CoordVector
Definition prismtriangulation.cc:162
│ │ │ +
const BackendIterator backendEnd
Definition prismtriangulation.cc:182
│ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition prismtriangulation.cc:161
│ │ │ +
BackendIterator backend
Definition prismtriangulation.cc:181
│ │ │ +
int kuhnIndex
Definition prismtriangulation.cc:180
│ │ │ +
int nIntervals_
Definition prismtriangulation.cc:265
│ │ │ +
Refinement::template Codim< 0 >::Geometry Geometry
Definition prismtriangulation.cc:245
│ │ │ +
BackendIterator backend
Definition prismtriangulation.cc:268
│ │ │ +
Refinement::IndexVector IndexVector
Definition prismtriangulation.cc:243
│ │ │ +
BackendRefinement::template Codim< 0 >::SubEntityIterator BackendIterator
Definition prismtriangulation.cc:262
│ │ │ +
int kuhnIndex
Definition prismtriangulation.cc:267
│ │ │ +
Refinement::CoordVector CoordVector
Definition prismtriangulation.cc:244
│ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition prismtriangulation.cc:242
│ │ │ +
const BackendIterator backendEnd
Definition prismtriangulation.cc:269
│ │ │ +
Refinement::BackendRefinement BackendRefinement
Definition prismtriangulation.cc:261
│ │ │ +
SubEntityIterator This
Definition prismtriangulation.cc:356
│ │ │ +
bool equals(const This &other) const
│ │ │ +
RefinementImp< dimension, CoordType > Refinement
Definition prismtriangulation.cc:355
│ │ │ +
SubEntityIterator(int nIntervals, bool end=false)
│ │ │
Definition simplex.cc:361
│ │ │ -
Codim< dimension >::SubEntityIterator VertexIterator
Definition simplex.cc:368
│ │ │ -
FieldVector< int, dimension+1 > IndexVector
Definition simplex.cc:371
│ │ │ -
CoordType ctype
Definition simplex.cc:364
│ │ │ -
static int nVertices(int nIntervals)
Definition simplex.cc:394
│ │ │ -
static int nElements(int nIntervals)
Definition simplex.cc:418
│ │ │ -
static ElementIterator eEnd(int nIntervals)
Definition simplex.cc:434
│ │ │ -
static VertexIterator vEnd(int nIntervals)
Definition simplex.cc:410
│ │ │ -
Codim< 0 >::SubEntityIterator ElementIterator
Definition simplex.cc:370
│ │ │ -
static VertexIterator vBegin(int nIntervals)
Definition simplex.cc:402
│ │ │ -
static ElementIterator eBegin(int nIntervals)
Definition simplex.cc:426
│ │ │ -
FieldVector< CoordType, dimension > CoordVector
Definition simplex.cc:369
│ │ │ -
static constexpr int dimension
Definition simplex.cc:363
│ │ │ -
Definition simplex.cc:385
│ │ │ -
Dune::CachedMultiLinearGeometry< CoordType, dimension-codimension, dimension > Geometry
Definition simplex.cc:388
│ │ │ -
Definition simplex.cc:445
│ │ │ -
Definition simplex.cc:451
│ │ │ -
Refinement::CoordVector CoordVector
Definition simplex.cc:454
│ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition simplex.cc:453
│ │ │ -
Vertex vertex
Definition simplex.cc:471
│ │ │ -
Refinement::template Codim< dimension >::Geometry Geometry
Definition simplex.cc:455
│ │ │ -
RefinementIteratorSpecial< dimension, CoordType, dimension > This
Definition simplex.cc:456
│ │ │ -
FieldVector< int, dimension > Vertex
Definition simplex.cc:468
│ │ │ -
int size
Definition simplex.cc:470
│ │ │ -
Definition simplex.cc:541
│ │ │ -
int kuhnIndex
Definition simplex.cc:568
│ │ │ -
FieldVector< int, dimension > Vertex
Definition simplex.cc:564
│ │ │ -
Vertex origin
Definition simplex.cc:567
│ │ │ -
int index_
Definition simplex.cc:570
│ │ │ -
Refinement::template Codim< 0 >::Geometry Geometry
Definition simplex.cc:546
│ │ │ -
Refinement::IndexVector IndexVector
Definition simplex.cc:544
│ │ │ -
Refinement::CoordVector CoordVector
Definition simplex.cc:545
│ │ │ -
RefinementIteratorSpecial< dimension, CoordType, 0 > This
Definition simplex.cc:547
│ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition simplex.cc:543
│ │ │ -
int size
Definition simplex.cc:569
│ │ │ -
SubEntityIterator(int nIntervals, bool end=false)
│ │ │ -
RefinementImp< dimension, CoordType > Refinement
Definition simplex.cc:705
│ │ │