│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
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)
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
301 static void invLx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > &x )
│ │ │ │ -
│ │ │ │ -
303 for(
int i = 0; i < n; ++i )
│ │ │ │ -
│ │ │ │ -
305 for(
int j = 0; j < i; ++j )
│ │ │ │ -
306 x[ i ] -= L[ i ][ j ] * x[ j ];
│ │ │ │ -
307 x[ i ] /= L[ i ][ i ];
│ │ │ │ +
│ │ │ │ +
300 for(
int i = 1; i <= n; ++i)
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
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;
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
313 static void invLTx ( FieldMatrix< ctype, n, n > &L, FieldVector< ctype, n > &x )
│ │ │ │ -
│ │ │ │ -
315 for(
int i = n; i > 0; --i )
│ │ │ │ -
│ │ │ │ -
317 for(
int j = i; j < n; ++j )
│ │ │ │ -
318 x[ i-1 ] -= L[ j ][ i-1 ] * x[ j ];
│ │ │ │ -
319 x[ i-1 ] /= L[ i-1 ][ i-1 ];
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
324 static ctype spdDetA (
const FieldMatrix< ctype, n, n > &A )
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
327 FieldMatrix< ctype, n, n > L;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
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]];
│ │ │ │ +
│ │ │ │
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ -
333 static ctype spdInvA ( FieldMatrix< ctype, n, n > &A )
│ │ │ │ -
│ │ │ │ -
335 FieldMatrix< ctype, n, n > L;
│ │ │ │ -
│ │ │ │ -
337 const ctype det = invL( L );
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
344 static bool spdInvAx ( FieldMatrix< ctype, n, n > &A, FieldVector< ctype, n > &x,
const bool checkSingular =
false )
│ │ │ │ +
339 template<
int dimension,
class CoordType>
│ │ │ │ +
340 FieldVector<CoordType, dimension>
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
342 FieldVector<CoordType, dimension> point,
│ │ │ │ +
344 const FieldVector<int, dimension> &kuhn)
│ │ │ │
│ │ │ │ -
346 FieldMatrix< ctype, n, n > L;
│ │ │ │ -
347 const bool invertible = cholesky_L( A, L, checkSingular );
│ │ │ │ -
348 if( ! invertible )
return invertible ;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
346 for(
int i = 0; i < dimension - 1; ++i)
│ │ │ │ +
347 point[kuhn[i]] -= point[kuhn[i+1]];
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ -
354 template<
int m,
int n >
│ │ │ │ -
355 static ctype detATA (
const FieldMatrix< ctype, m, n > &A )
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
359 FieldMatrix< ctype, n, n > ata;
│ │ │ │ -
│ │ │ │ -
361 return spdDetA( ata );
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
372 template<
int m,
int n >
│ │ │ │ -
373 static ctype sqrtDetAAT (
const FieldMatrix< ctype, m, n > &A )
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
380 if( (n == 2) && (m == 2) )
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
383 return abs( A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ] );
│ │ │ │ -
│ │ │ │ -
385 else if( (n == 3) && (m == 3) )
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
388 const ctype v0 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 1 ][ 1 ] * A[ 0 ][ 2 ];
│ │ │ │ -
389 const ctype v1 = A[ 0 ][ 2 ] * A[ 1 ][ 0 ] - A[ 1 ][ 2 ] * A[ 0 ][ 0 ];
│ │ │ │ -
390 const ctype v2 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 1 ][ 0 ] * A[ 0 ][ 1 ];
│ │ │ │ -
391 return abs( v0 * A[ 2 ][ 0 ] + v1 * A[ 2 ][ 1 ] + v2 * A[ 2 ][ 2 ] );
│ │ │ │ -
│ │ │ │ -
393 else if ( (n == 3) && (m == 2) )
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
396 const ctype v0 = A[ 0 ][ 0 ] * A[ 1 ][ 1 ] - A[ 0 ][ 1 ] * A[ 1 ][ 0 ];
│ │ │ │ -
397 const ctype v1 = A[ 0 ][ 0 ] * A[ 1 ][ 2 ] - A[ 1 ][ 0 ] * A[ 0 ][ 2 ];
│ │ │ │ -
398 const ctype v2 = A[ 0 ][ 1 ] * A[ 1 ][ 2 ] - A[ 0 ][ 2 ] * A[ 1 ][ 1 ];
│ │ │ │ -
399 return sqrt( v0*v0 + v1*v1 + v2*v2);
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
404 FieldMatrix< ctype, m, m > aat;
│ │ │ │ -
│ │ │ │ -
406 return spdDetA( aat );
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
414 template<
int m,
int n >
│ │ │ │ -
415 static ctype leftInvA (
const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, m > &ret )
│ │ │ │ -
│ │ │ │ -
417 static_assert((m >= n),
"Matrix has no left inverse.");
│ │ │ │ -
│ │ │ │ -
419 if constexpr( (n == 2) && (m == 2) )
│ │ │ │ -
│ │ │ │ -
421 const ctype det = (A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ]);
│ │ │ │ -
422 const ctype detInv = ctype( 1 ) / det;
│ │ │ │ -
423 ret[ 0 ][ 0 ] = A[ 1 ][ 1 ] * detInv;
│ │ │ │ -
424 ret[ 1 ][ 1 ] = A[ 0 ][ 0 ] * detInv;
│ │ │ │ -
425 ret[ 1 ][ 0 ] = -A[ 1 ][ 0 ] * detInv;
│ │ │ │ -
426 ret[ 0 ][ 1 ] = -A[ 0 ][ 1 ] * detInv;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
431 FieldMatrix< ctype, n, n > ata;
│ │ │ │ -
│ │ │ │ -
433 const ctype det = spdInvA( ata );
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
359 template<
int dimension_,
class CoordType>
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
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>
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ +
│ │ │ │
│ │ │ │ -
439 template<
int m,
int n >
│ │ │ │ -
440 static bool leftInvAx (
const FieldMatrix< ctype, m, n > &A,
const FieldVector< ctype, m > &x, FieldVector< ctype, n > &y )
│ │ │ │ -
│ │ │ │ -
442 static_assert((m >= n),
"Matrix has no left inverse.");
│ │ │ │ -
443 FieldMatrix< ctype, n, n > ata;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
446 return spdInvAx( ata, y,
true );
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
444 template<
int dimension,
class CoordType,
int codimension>
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ -
450 template<
int m,
int n >
│ │ │ │ -
451 static ctype rightInvA (
const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, m > &ret )
│ │ │ │ -
│ │ │ │ -
453 static_assert((n >= m),
"Matrix has no right inverse.");
│ │ │ │ -
│ │ │ │ -
455 if constexpr( (n == 2) && (m == 2) )
│ │ │ │ -
│ │ │ │ -
457 const ctype det = (A[ 0 ][ 0 ]*A[ 1 ][ 1 ] - A[ 1 ][ 0 ]*A[ 0 ][ 1 ]);
│ │ │ │ -
458 const ctype detInv = ctype( 1 ) / det;
│ │ │ │ -
459 ret[ 0 ][ 0 ] = A[ 1 ][ 1 ] * detInv;
│ │ │ │ -
460 ret[ 1 ][ 1 ] = A[ 0 ][ 0 ] * detInv;
│ │ │ │ -
461 ret[ 1 ][ 0 ] = -A[ 1 ][ 0 ] * detInv;
│ │ │ │ -
462 ret[ 0 ][ 1 ] = -A[ 0 ][ 1 ] * detInv;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
467 FieldMatrix< ctype, m , m > aat;
│ │ │ │ -
│ │ │ │ -
469 const ctype det = spdInvA( aat );
│ │ │ │ -
470 ATBT( A , aat , ret );
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
475 template<
int m,
int n >
│ │ │ │ -
476 static bool xTRightInvA (
const FieldMatrix< ctype, m, n > &A,
const FieldVector< ctype, n > &x, FieldVector< ctype, m > &y )
│ │ │ │ -
│ │ │ │ -
478 static_assert((n >= m),
"Matrix has no right inverse.");
│ │ │ │ -
479 FieldMatrix< ctype, m, m > aat;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
483 return spdInvAx( aat, y,
true );
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
496 template<
class ct,
int mydim,
int cdim>
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
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;
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
526 typedef FieldMatrix< ctype, coorddimension, mydimension >
Jacobian;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
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>
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ -
538 typedef Impl::FieldMatrixHelper< ct > MatrixHelper;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
539 template<
int dimension,
class CoordType>
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
552 : refElement_(refElement), origin_(origin), jacobianTransposed_(jt)
│ │ │ │ -
│ │ │ │ -
554 integrationElement_ = MatrixHelper::template rightInvA< mydimension, coorddimension >( jacobianTransposed_, jacobianInverseTransposed_ );
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
552 bool equals(
const This &other)
const;
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ -
564 template<
class CoordVector >
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
566 : refElement_(refElement), origin_(coordVector[0])
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
569 jacobianTransposed_[ i ] = coordVector[ i+1 ] - origin_;
│ │ │ │ -
570 integrationElement_ = MatrixHelper::template rightInvA< mydimension, coorddimension >( jacobianTransposed_, jacobianInverseTransposed_ );
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
564 typedef FieldVector<int, dimension>
Vertex;
│ │ │ │ +
565 constexpr static int nKuhnIntervals = Dune::factorial(dimension);
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │ -
574 template<
class CoordVector >
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
626 jacobianInverseTransposed_.mtv(
global - origin_,
local );
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
642 return integrationElement_;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
648 return integrationElement_ * refElement_.
volume();
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
659 return jacobianTransposed_;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
670 return jacobianInverseTransposed_;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
681 return jacobianTransposed_.transposed();
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
692 return jacobianInverseTransposed_.transposed();
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
697 return geometry.refElement_;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
705 ctype integrationElement_;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
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>,
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │ -
│ │ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
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;
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
This file contains the parts independent of a particular Refinement implementation.
│ │ │ │ +
│ │ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ │ +
│ │ │ │ +
│ │ │ │
Definition affinegeometry.hh:21
│ │ │ │ -
decltype(referenceElement(std::declval< T >()...)) ReferenceElement
Definition referenceelements.hh:347
│ │ │ │ -
This class provides access to geometric and topological properties of a reference element.
Definition referenceelement.hh:52
│ │ │ │ -
CoordinateField volume() const
obtain the volume of the reference element
Definition referenceelement.hh:228
│ │ │ │ -
GeometryType type(int i, int c) const
obtain the type of subentity (i,c)
Definition referenceelement.hh:167
│ │ │ │ -
Coordinate position(int i, int c) const
position of the barycenter of entity (i,c)
Definition referenceelement.hh:190
│ │ │ │ -
int size(int c) const
number of subentities of codimension c
Definition referenceelement.hh:94
│ │ │ │ -
Definition affinegeometry.hh:33
│ │ │ │ +
int pointIndex(const FieldVector< int, dimension > &point)
calculate the index of a given gridpoint within a Kuhn0 simplex
Definition simplex.cc:280
│ │ │ │ +
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
│ │ │ │ -
Implementation of the Geometry interface for affine geometries.
Definition affinegeometry.hh:498
│ │ │ │ -
AffineGeometry(const ReferenceElement &refElement, const CoordVector &coordVector)
Create affine geometry from reference element and a vector of vertex coordinates.
Definition affinegeometry.hh:565
│ │ │ │ -
AffineGeometry()=default
Constructs an empty geometry.
│ │ │ │ -
AffineGeometry(Dune::GeometryType gt, const GlobalCoordinate &origin, const JacobianTransposed &jt)
Create affine geometry from GeometryType, one vertex, and the Jacobian matrix.
Definition affinegeometry.hh:558
│ │ │ │ -
FieldVector< ctype, mydimension > LocalCoordinate
Type for local coordinate vector.
Definition affinegeometry.hh:511
│ │ │ │ -
Dune::GeometryType type() const
Obtain the type of the reference element.
Definition affinegeometry.hh:583
│ │ │ │ -
static const int mydimension
Dimension of the geometry.
Definition affinegeometry.hh:505
│ │ │ │ -
AffineGeometry(const ReferenceElement &refElement, const GlobalCoordinate &origin, const JacobianTransposed &jt)
Create affine geometry from reference element, one vertex, and the Jacobian matrix.
Definition affinegeometry.hh:550
│ │ │ │ -
ctype Volume
Type used for volume.
Definition affinegeometry.hh:517
│ │ │ │ -
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Obtain the Jacobian's inverse.
Definition affinegeometry.hh:690
│ │ │ │ -
friend ReferenceElement referenceElement(const AffineGeometry &geometry)
Definition affinegeometry.hh:695
│ │ │ │ -
AffineGeometry(Dune::GeometryType gt, const CoordVector &coordVector)
Create affine geometry from GeometryType and a vector of vertex coordinates.
Definition affinegeometry.hh:575
│ │ │ │ -
ctype integrationElement(const LocalCoordinate &local) const
Obtain the integration element.
Definition affinegeometry.hh:640
│ │ │ │ -
FieldMatrix< ctype, mydimension, coorddimension > JacobianInverse
Type for the inverse Jacobian matrix.
Definition affinegeometry.hh:529
│ │ │ │ -
FieldMatrix< ctype, coorddimension, mydimension > Jacobian
Type for the Jacobian matrix.
Definition affinegeometry.hh:526
│ │ │ │ -
const JacobianInverseTransposed & jacobianInverseTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian's inverse.
Definition affinegeometry.hh:668
│ │ │ │ -
FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed
Type for the transposed Jacobian matrix.
Definition affinegeometry.hh:520
│ │ │ │ -
GlobalCoordinate corner(int i) const
Obtain coordinates of the i-th corner.
Definition affinegeometry.hh:589
│ │ │ │ -
int corners() const
Obtain number of corners of the corresponding reference element.
Definition affinegeometry.hh:586
│ │ │ │ -
LocalCoordinate local(const GlobalCoordinate &global) const
Evaluate the inverse mapping.
Definition affinegeometry.hh:623
│ │ │ │ -
FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed
Type for the transposed inverse Jacobian matrix.
Definition affinegeometry.hh:523
│ │ │ │ -
static const int coorddimension
Dimension of the world space.
Definition affinegeometry.hh:508
│ │ │ │ -
GlobalCoordinate global(const LocalCoordinate &local) const
Evaluate the mapping.
Definition affinegeometry.hh:603
│ │ │ │ -
GlobalCoordinate center() const
Obtain the centroid of the mapping's image.
Definition affinegeometry.hh:595
│ │ │ │ -
Jacobian jacobian(const LocalCoordinate &local) const
Obtain the Jacobian.
Definition affinegeometry.hh:679
│ │ │ │ -
ct ctype
Type used for coordinates.
Definition affinegeometry.hh:502
│ │ │ │ -
FieldVector< ctype, coorddimension > GlobalCoordinate
Type for coordinate vector in world space.
Definition affinegeometry.hh:514
│ │ │ │ -
bool affine() const
Always true: this is an affine geometry.
Definition affinegeometry.hh:580
│ │ │ │ -
const JacobianTransposed & jacobianTransposed(const LocalCoordinate &local) const
Obtain the transposed of the Jacobian.
Definition affinegeometry.hh:657
│ │ │ │ -
Volume volume() const
Obtain the volume of the element.
Definition affinegeometry.hh:646
│ │ │ │ -
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │ │ +
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
│ │ │ │ +
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
│ │ │ │