dune-alugrid  3.0.0
geometry.hh
Go to the documentation of this file.
1 #ifndef DUNE_ALU3DGRIDGEOMETRY_HH
2 #define DUNE_ALU3DGRIDGEOMETRY_HH
3 
4 // System includes
5 #include <memory>
6 #include <type_traits>
7 
8 // Dune includes
9 #include <dune/common/version.hh>
10 #include <dune/common/power.hh>
11 #include <dune/grid/common/grid.hh>
12 
13 // Local includes
14 #include "alu3dinclude.hh"
15 #include "topology.hh"
16 #include "mappings.hh"
18 
19 namespace Dune
20 {
21 
22  // Forward declarations
23  template<int cd, int dim, class GridImp>
24  class ALU3dGridEntity;
25  template<int cd, class GridImp >
26  class ALU3dGridEntityPointer;
27  template<int mydim, int coorddim, class GridImp>
28  class ALU3dGridGeometry;
29  template< int dim, int dimworld, ALU3dGridElementType, class >
30  class ALU3dGrid;
31  class BilinearSurfaceMapping;
32  class TrilinearMapping;
33 
34  template< class GridImp >
35  class ALU3dGridIntersectionIterator;
36 
37  template <int cdim>
39  {
40  public:
41  typedef FieldVector<alu3d_ctype, cdim> CoordinateVectorType;
42 
43  static const signed char invalid = -1; // means geometry is not meaningful
44  static const signed char updated = 0; // means the point values have been set
45  static const signed char buildmapping = 1; // means updated and mapping was build
46 
47  template <int dim, int corners, class Mapping>
49  {
50  private:
51  // prohibited due to reference counting
53 
54  protected:
56  static const int corners_ = corners ;
57 
59  typedef FieldMatrix<alu3d_ctype, corners , cdim> CoordinateMatrixType;
60 
61  // select coordinate storage for coord_ (pointer for dim == 3)
62  typedef typename std::conditional<
63  dim == 3,
64  std::unique_ptr< CoordinateMatrixType >,
66 
68  typedef Mapping MappingType;
69 
72 
75 
77  double volume_ ;
78 
80  signed char status_ ;
81 
82  public:
84  unsigned int refCount_;
85 
88  : coord_(),
89  map_(),
90  volume_( 1.0 )
91  {
92  invalidate();
93  }
94 
95  // copy coordinate vector from field vector or alu3d_ctype[cdim]
96  template <class CoordPtrType>
97  static inline void copy(const CoordPtrType& p,
99  {
100  // we have either 2d or 3d vectors
101  alugrid_assert( cdim > 1 );
102  c[0] = p[0];
103  c[1] = p[1];
104  if( cdim > 2 )
105  c[2] = p[2];
106  }
107 
108  template <class CoordPtrType>
109  void update(const CoordPtrType&,
110  const CoordPtrType&,
111  const CoordPtrType&,
112  const CoordPtrType&,
113  const CoordPtrType&,
114  const CoordPtrType&,
115  const CoordPtrType&,
116  const CoordPtrType& ) const
117  {
118  DUNE_THROW(InvalidStateException,"This method should not be called!");
119  }
120 
121  template <class CoordPtrType>
122  void update(const CoordPtrType&,
123  const CoordPtrType&,
124  const CoordPtrType&,
125  const CoordPtrType& ) const
126  {
127  DUNE_THROW(InvalidStateException,"This method should not be called!");
128  }
129 
130  template <class CoordPtrType>
131  void update(const CoordPtrType&,
132  const CoordPtrType&,
133  const CoordPtrType& ) const
134  {
135  DUNE_THROW(InvalidStateException,"This method should not be called!");
136  }
137 
138  template <class CoordPtrType>
139  void update(const CoordPtrType&,
140  const CoordPtrType& ) const
141  {
142  DUNE_THROW(InvalidStateException,"This method should not be called!");
143  }
144 
145  template <class CoordPtrType>
146  void update(const CoordPtrType& ) const
147  {
148  DUNE_THROW(InvalidStateException,"This method should not be called!");
149  }
150 
151  // update geometry in father coordinates (default impl)
152  template <class GeometryImp>
153  inline void updateInFather(const GeometryImp &fatherGeom ,
154  const GeometryImp &myGeom)
155  {
156  // this version is only for the 2d elements
157  alugrid_assert( dim == 2 );
158 
159  // compute the local coordinates in father refelem
160  for(int i=0; i < myGeom.corners() ; ++i)
161  {
162  // calculate coordinate
163  coord_[i] = fatherGeom.local( myGeom.corner( i ) );
164 
165  // to avoid rounding errors
166  for(int j=0; j<cdim; ++j)
167  {
168  if ( coord_[i][j] < 1e-16) coord_[i][j] = 0.0;
169  }
170  }
171 
172  status_ = updated ;
173  }
174 
175  // set status to invalid
176  void invalidate () { status_ = invalid ; }
177 
178  // return true if geometry is valid
179  bool valid () const { return status_ != invalid ; }
180 
181  // set volume
182  void setVolume( const double volume ) { volume_ = volume ; }
183 
184  // return volume
185  double volume() const { return volume_; }
186  };
187 
189  template <int dummy, int dim,
191  public:
192  // geometry implementation for edges and vertices
193  template <int dummy, int dim, ALU3dGridElementType eltype>
194  class GeometryImpl : public GeometryImplBase< dim, dim+1, LinearMapping<cdim, dim> >
195  {
196  protected:
198 
199  using BaseType :: corners_ ;
200  using BaseType :: copy ;
201  using BaseType :: coord_ ;
202  using BaseType :: map_ ;
203  using BaseType :: status_ ;
204 
206  public:
207  using BaseType :: update ;
208  using BaseType :: valid ;
209 
210  // return coordinate vector
211  inline const CoordinateVectorType& operator [] (const int i) const
212  {
213  alugrid_assert ( valid() );
214  alugrid_assert ( i>=0 && i<corners_ );
215  return coord_[i];
216  }
217 
219  {
220  alugrid_assert ( valid() );
221  if( status_ == buildmapping ) return map_;
222 
223  map_.buildMapping( coord_[0] );
225  return map_;
226  }
227 
228  // update vertex
229  template <class CoordPtrType>
230  inline void update(const CoordPtrType& p0)
231  {
232  alugrid_assert ( corners_ == 1 );
233  copy( p0, coord_[0] );
234  // we need to update the mapping
235  status_ = updated ;
236  }
237  };
238 
239  // geometry implementation for edges and vertices
240  template <int dummy, ALU3dGridElementType eltype>
241  class GeometryImpl<dummy,1,eltype>
242  : public GeometryImplBase< 1, 2, LinearMapping<cdim, 1> >
243  {
244  protected:
245  enum { dim = 1 };
247 
248  using BaseType :: corners_ ;
249  using BaseType :: copy ;
250  using BaseType :: coord_ ;
251  using BaseType :: map_ ;
252  using BaseType :: status_ ;
253 
255  public:
256  using BaseType :: update ;
257  using BaseType :: valid ;
258 
259  // return coordinate vector
260  inline const CoordinateVectorType& operator [] (const int i) const
261  {
262  alugrid_assert ( valid() );
263  alugrid_assert ( i>=0 && i<corners_ );
264  return coord_[i];
265  }
266 
268  {
269  alugrid_assert ( valid() );
270  if( status_ == buildmapping ) return map_;
271 
272  map_.buildMapping( coord_[0], coord_[1] );
274  return map_;
275  }
276 
277  // update edge
278  template <class CoordPtrType>
279  inline void update(const CoordPtrType& p0,
280  const CoordPtrType& p1)
281  {
282  alugrid_assert ( corners_ == 2 );
283  copy( p0, coord_[0] );
284  copy( p1, coord_[1] );
285  status_ = updated;
286  }
287  };
288 
289  // geom impl for simplex faces (triangles)
290  template <int dummy>
291  class GeometryImpl<dummy, 2, tetra>
292  : public GeometryImplBase< 2, 3, LinearMapping<cdim, 2> >
293  {
294  protected:
295  // dim = 2, corners = 3
297 
298  using BaseType :: corners_ ;
299  using BaseType :: copy ;
300  using BaseType :: coord_ ;
301  using BaseType :: map_ ;
302  using BaseType :: status_ ;
303 
305  public:
306  using BaseType :: update ;
307  using BaseType :: valid ;
308 
309  // return coordinate vector
310  inline const CoordinateVectorType& operator [] (const int i) const
311  {
312  alugrid_assert ( valid() );
313  alugrid_assert ( i>=0 && i<corners_ );
314  return coord_[i];
315  }
316 
317  // update geometry coordinates
318  template <class CoordPtrType>
319  inline void update(const CoordPtrType& p0,
320  const CoordPtrType& p1,
321  const CoordPtrType& p2)
322  {
323  copy(p0, coord_[0] );
324  copy(p1, coord_[1] );
325  copy(p2, coord_[2] );
326  status_ = updated;
327  }
328 
329  // return mapping (always up2date)
331  {
332  alugrid_assert ( valid() );
333  if( status_ == buildmapping ) return map_;
334 
335  map_.buildMapping( coord_[0], coord_[1], coord_[2] );
337  return map_;
338  }
339  };
340 
342  //
343  // hexa specializations
344  //
346 
347  // geom impl for quadrilaterals (also hexa faces)
348  template <int dummy>
349  class GeometryImpl<dummy, 2, hexa>
350  : public GeometryImplBase< 2, 4, BilinearMapping< cdim > >
351  {
352  protected:
353  // dim = 2, corners = 4
355 
356  using BaseType :: corners_ ;
357  using BaseType :: copy ;
358  using BaseType :: coord_ ;
359  using BaseType :: map_ ;
360  using BaseType :: status_ ;
361 
363  public:
364  using BaseType :: update ;
365  using BaseType :: valid ;
366 
367  // return coordinate vector
368  inline const CoordinateVectorType& operator [] (const int i) const
369  {
370  alugrid_assert ( valid() );
371  alugrid_assert ( i>=0 && i<corners_ );
372  return coord_[i];
373  }
374 
375  // update geometry coordinates
376  template <class CoordPtrType>
377  inline void update(const CoordPtrType& p0,
378  const CoordPtrType& p1,
379  const CoordPtrType& p2,
380  const CoordPtrType& p3)
381  {
382  copy(p0, coord_[0] );
383  copy(p1, coord_[1] );
384  copy(p2, coord_[2] );
385  copy(p3, coord_[3] );
386  status_ = updated;
387  }
388 
389  // return mapping (always up2date)
391  {
392  alugrid_assert ( valid() );
393  if( status_ == buildmapping ) return map_;
394 
395  map_.buildMapping( coord_[0], coord_[1], coord_[2], coord_[3] );
397  return map_;
398  }
399  };
400 
401  // geometry impl for hexahedrons
402  template <int dummy>
403  class GeometryImpl<dummy,3, hexa>
404  : public GeometryImplBase< 3, 8, TrilinearMapping >
405  {
406  protected:
407  // dim = 3, corners = 8
409 
410  using BaseType :: corners_ ;
411  using BaseType :: copy ;
412  using BaseType :: coord_ ;
413  using BaseType :: map_ ;
414  using BaseType :: status_ ;
415 
418 
419  typedef alu3d_ctype CoordPtrType[cdim];
420 
421  // coordinate pointer vector
422  const alu3d_ctype* coordPtr_[ corners_ ];
423  public:
424  using BaseType :: update ;
425  using BaseType :: valid ;
426 
429  {
430  // set initialize coord pointers
431  for( int i=0; i<corners_; ++i )
432  coordPtr_[ i ] = 0;
433  }
434 
435  const alu3d_ctype* point( const int i ) const
436  {
437  alugrid_assert ( valid() );
438  alugrid_assert ( i>=0 && i<corners_ );
439  alugrid_assert ( coordPtr_[i] );
440  return coordPtr_[ i ];
441  }
442 
443  // return coordinates
444  inline CoordinateVectorType operator [] (const int i) const
445  {
446  CoordinateVectorType coord ;
447  copy( point( i ), coord );
448  return coord ;
449  }
450 
451  // update geometry coordinates
452  inline void update(const CoordPtrType& p0,
453  const CoordPtrType& p1,
454  const CoordPtrType& p2,
455  const CoordPtrType& p3,
456  const CoordPtrType& p4,
457  const CoordPtrType& p5,
458  const CoordPtrType& p6,
459  const CoordPtrType& p7)
460  {
461  coordPtr_[0] = &p0[ 0 ];
462  coordPtr_[1] = &p1[ 0 ];
463  coordPtr_[2] = &p2[ 0 ];
464  coordPtr_[3] = &p3[ 0 ];
465  coordPtr_[4] = &p4[ 0 ];
466  coordPtr_[5] = &p5[ 0 ];
467  coordPtr_[6] = &p6[ 0 ];
468  coordPtr_[7] = &p7[ 0 ];
469  status_ = updated;
470  }
471 
472  // update geometry in father coordinates
473  template <class GeometryImp>
474  inline void updateInFather(const GeometryImp &fatherGeom ,
475  const GeometryImp &myGeom)
476  {
477  if( ! coord_ )
478  {
479  coord_.reset( new CoordinateMatrixType() );
480  }
481 
482  CoordinateMatrixType& coord = *coord_;
483  // compute the local coordinates in father refelem
484  for(int i=0; i < myGeom.corners() ; ++i)
485  {
486  // calculate coordinate
487  coord[i] = fatherGeom.local( myGeom.corner( i ) );
488 
489  // set pointer
490  coordPtr_[i] = (&(coord[i][0]));
491 
492  // to avoid rounding errors
493  for(int j=0; j<cdim; ++j)
494  {
495  if ( coord[i][j] < 1e-16) coord[i][j] = 0.0;
496  }
497  }
498 
499  status_ = updated ;
500  }
501 
502  // return mapping (always up2date)
504  {
505  alugrid_assert ( valid() );
506  if( status_ == buildmapping ) return map_;
507 
508  map_.buildMapping( point( 0 ), point( 1 ), point( 2 ), point( 3 ),
509  point( 4 ), point( 5 ), point( 6 ), point( 7 ) );
510 
512  return map_;
513  }
514 
515  // set status to invalid
516  void invalidate () { status_ = invalid ; }
517 
518  // return true if geometry is valid
519  bool valid () const { return status_ != invalid ; }
520  };
521 
522 
523  // geometry impl for hexahedrons
524  template <int dummy>
525  class GeometryImpl<dummy,3, tetra>
526  : public GeometryImplBase< 3, 4, LinearMapping<cdim, cdim> >
527  {
528  // dim = 3, corners = 8
530 
531  using BaseType :: corners_ ;
532  using BaseType :: copy ;
533  using BaseType :: coord_ ;
534  using BaseType :: map_ ;
535  using BaseType :: status_ ;
536 
537  typedef typename BaseType :: MappingType MappingType ;
539 
540  typedef alu3d_ctype CoordPtrType[cdim];
541 
542  // coordinate pointer vector
543  const alu3d_ctype* coordPtr_[ corners_ ];
544  public:
545  using BaseType :: update ;
546  using BaseType :: valid ;
547 
548  // default constructor
550  {
551  // set initialize coord pointers
552  for( int i=0; i<corners_; ++i )
553  coordPtr_[ i ] = 0;
554  }
555 
556  const alu3d_ctype* point( const int i ) const
557  {
558  alugrid_assert ( valid() );
559  alugrid_assert ( i>=0 && i<corners_ );
560  alugrid_assert ( coordPtr_[ i ] );
561  return coordPtr_[ i ];
562  }
563 
564  // return coordinate vector
565  inline CoordinateVectorType operator [] (const int i) const
566  {
567  CoordinateVectorType coord ;
568  copy( point( i ), coord );
569  return coord ;
570  }
571 
572  // update geometry coordinates
573  inline void update(const CoordPtrType& p0,
574  const CoordPtrType& p1,
575  const CoordPtrType& p2,
576  const CoordPtrType& p3)
577  {
578  coordPtr_[0] = &p0[ 0 ];
579  coordPtr_[1] = &p1[ 0 ];
580  coordPtr_[2] = &p2[ 0 ];
581  coordPtr_[3] = &p3[ 0 ];
582  status_ = updated;
583  }
584 
585  // update geometry in father coordinates
586  template <class GeometryImp>
587  inline void updateInFather(const GeometryImp &fatherGeom ,
588  const GeometryImp & myGeom)
589  {
590  if( ! coord_ )
591  {
592  coord_.reset(new CoordinateMatrixType());
593  }
594 
595  CoordinateMatrixType& coord = *coord_;
596  // compute the local coordinates in father refelem
597  for(int i=0; i < myGeom.corners() ; ++i)
598  {
599  // calculate coordinate
600  coord[i] = fatherGeom.local( myGeom.corner( i ) );
601 
602  // set pointer
603  coordPtr_[i] = (&(coord[i][0]));
604 
605  // to avoid rounding errors
606  for(int j=0; j<cdim; ++j)
607  {
608  if ( coord[i][j] < 1e-16) coord[i][j] = 0.0;
609  }
610  }
611 
612  status_ = updated;
613  }
614 
615  // return mapping (always up2date)
616  inline MappingType& mapping()
617  {
618  alugrid_assert ( valid() );
619  if( status_ == buildmapping ) return map_;
620 
621  map_.buildMapping( point( 0 ), point( 1 ), point( 2 ), point( 3 ) );
622 
624  return map_;
625  }
626  };
627  }; // end of class ALUGridGeometryImplementation
628 
629  template <int mydim, int cdim, class GridImp>
630  class ALU3dGridGeometry :
631  public GeometryDefaultImplementation<mydim, cdim, GridImp, ALU3dGridGeometry>
632  {
633  static const ALU3dGridElementType elementType = GridImp::elementType;
634 
635  typedef typename GridImp::MPICommunicatorType Comm;
636 
637  //friend class ALU3dGridIntersectionIterator<GridImp>;
638  typedef ALU3dImplTraits< elementType, Comm > ALU3dImplTraitsType ;
639 
640  public:
641  typedef typename ALU3dImplTraitsType::IMPLElementType IMPLElementType;
642  typedef typename ALU3dImplTraitsType::GEOFaceType GEOFaceType;
643  typedef typename ALU3dImplTraitsType::GEOEdgeType GEOEdgeType;
644  typedef typename ALU3dImplTraitsType::GEOVertexType GEOVertexType;
645 
646  // interface types
647  typedef typename ALU3dImplTraitsType::HFaceType HFaceType;
648  typedef typename ALU3dImplTraitsType::HEdgeType HEdgeType;
649  typedef typename ALU3dImplTraitsType::VertexType VertexType;
650 
651 
654 
655  enum { corners_ = (elementType == hexa) ? StaticPower<2,(mydim> -1) ? mydim : 0 >::power : mydim+1 };
656 
657  // type of specialized geometry implementation
658  typedef typename MyALUGridGeometryImplementation<cdim> ::
659  template GeometryImpl<0, mydim, elementType > GeometryImplType;
660 
661  public:
662  typedef typename GridImp :: ctype ctype;
663 
665  typedef FieldVector<ctype, mydim> LocalCoordinate;
666 
668  typedef FieldVector<ctype, cdim > GlobalCoordinate;
669 
671  typedef FieldMatrix<ctype,cdim,mydim> JacobianInverseTransposed;
672 
674  typedef FieldMatrix< ctype, mydim, cdim > JacobianTransposed;
675 
676  // type of coordinate matrix for faces
677  typedef FieldMatrix<ctype,
678  GridImp::dimension == 3 ? EntityCount< elementType > :: numVerticesPerFace : 2 , cdim> FaceCoordinatesType;
679 
682  GeometryType type () const;
683 
685  int corners () const;
686 
688  GlobalCoordinate corner (int i) const;
689 
692  GlobalCoordinate global (const LocalCoordinate& local) const;
693 
696  LocalCoordinate local (const GlobalCoordinate& global) const;
697 
699  ctype integrationElement (const LocalCoordinate& local) const;
700 
704 
706  const JacobianTransposed& jacobianTransposed (const LocalCoordinate& local) const;
707 
709  inline bool affine () const;
710 
712  ctype volume () const;
713 
714  //***********************************************************************
716  //***********************************************************************
718  bool buildGeom(const IMPLElementType & item);
719  bool buildGeom(const HFaceType & item, int twist);
720  bool buildGeom(const HEdgeType & item, int twist);
721  bool buildGeom(const VertexType & item, int twist);
722 
723  // this method is used by the intersection iterator
724  bool buildGeom(const FaceCoordinatesType& coords);
725 
726  // this method is used by the intersection iterator
727  template <class coord_t>
728  bool buildGeom(const coord_t& p0,
729  const coord_t& p1,
730  const coord_t& p2,
731  const coord_t& p3);
732 
733  // this method is used by the intersection iterator
734  template <class coord_t>
735  bool buildGeom(const coord_t& p0,
736  const coord_t& p1,
737  const coord_t& p2);
738 
739  // this method is used by the intersection iterator
740  template <class coord_t>
741  bool buildGeom(const coord_t& p0,
742  const coord_t& p1);
743 
745  template <class GeometryType>
746  bool buildGeomInFather(const GeometryType &fatherGeom , const GeometryType & myGeom);
747 
750  void print (std::ostream& ss) const;
751 
753  void invalidate () { geoImplPtr_.invalidate(); }
754 
756  bool valid () const { return geoImpl().valid(); }
757 
758  protected:
759  // return reference to geometry implementation
761  {
762  return *geoImplPtr_;
763  }
764 
765  // proxy object holding GeometryImplType* with reference counting
766  mutable ALU3DSPACE SharedPointer< GeometryImplType > geoImplPtr_;
767  };
768 
769 #if ! DUNE_VERSION_NEWER_REV(DUNE_GRID,2,4,0)
770  namespace FacadeOptions
771  {
773  template< int mydim, int cdim, class GridImp >
774  struct StoreGeometryReference< mydim, cdim, GridImp, ALU3dGridGeometry >
775  {
777  static const bool v = false;
778  };
779  }
780 #endif
781 
782 } // namespace Dune
783 
784 #include "geometry_imp.cc"
785 
786 #endif
Dune::ALU3dGridGeometry::corners
int corners() const
return the number of corners of this element. Corners are numbered 0..n-1
Definition: geometry_imp.cc:27
Dune::MyALUGridGeometryImplementation::GeometryImplBase::CoordinateMatrixType
FieldMatrix< alu3d_ctype, corners, cdim > CoordinateMatrixType
the vertex coordinates
Definition: geometry.hh:59
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 3, hexa >::point
const alu3d_ctype * point(const int i) const
Definition: geometry.hh:435
Dune::ALU3dGridGeometry::integrationElement
ctype integrationElement(const LocalCoordinate &local) const
A(l) , see grid.hh.
Definition: geometry_imp.cc:64
Dune::MyALUGridGeometryImplementation::GeometryImplBase::update
void update(const CoordPtrType &, const CoordPtrType &, const CoordPtrType &, const CoordPtrType &, const CoordPtrType &, const CoordPtrType &, const CoordPtrType &, const CoordPtrType &) const
Definition: geometry.hh:109
Dune::LinearMapping::buildMapping
void buildMapping(const vector_t &, const vector_t &, const vector_t &, const vector_t &)
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 2, tetra >::update
void update(const CoordPtrType &p0, const CoordPtrType &p1, const CoordPtrType &p2)
Definition: geometry.hh:319
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 2, hexa >::BaseType
GeometryImplBase< 2, 4, BilinearMapping< cdim > > BaseType
Definition: geometry.hh:354
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 3, hexa >::updateInFather
void updateInFather(const GeometryImp &fatherGeom, const GeometryImp &myGeom)
Definition: geometry.hh:474
Dune::ALU3dGridGeometry::GEOEdgeType
ALU3dImplTraitsType::GEOEdgeType GEOEdgeType
Definition: geometry.hh:643
Dune::ALU3dGridGeometry::GEOVertexType
ALU3dImplTraitsType::GEOVertexType GEOVertexType
Definition: geometry.hh:644
Dune::hexa
Definition: topology.hh:12
Dune::ALU3dGridGeometry::print
void print(std::ostream &ss) const
Definition: geometry_imp.cc:126
Dune::ElementTopologyMapping
Definition: topology.hh:39
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 1, eltype >::mapping
MappingType & mapping()
Definition: geometry.hh:267
memory.hh
Dune::MyALUGridGeometryImplementation::GeometryImplBase
Definition: geometry.hh:48
Dune::EntityCount
Definition: topology.hh:15
Dune::MyALUGridGeometryImplementation::GeometryImplBase::status_
signed char status_
the status (see different status above)
Definition: geometry.hh:80
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 1, eltype >::update
void update(const CoordPtrType &p0, const CoordPtrType &p1)
Definition: geometry.hh:279
Dune::MyALUGridGeometryImplementation::buildmapping
static const signed char buildmapping
Definition: geometry.hh:45
Dune::ALU3dGridGeometry::GlobalCoordinate
FieldVector< ctype, cdim > GlobalCoordinate
type of the global coordinates
Definition: geometry.hh:668
Dune::MyALUGridGeometryImplementation::GeometryImplBase::CoordinateStorageType
std::conditional< dim==3, std::unique_ptr< CoordinateMatrixType >, CoordinateMatrixType >::type CoordinateStorageType
Definition: geometry.hh:65
Dune::ALU3dGridGeometry::affine
bool affine() const
returns true if mapping is affine
Definition: geometry_imp.cc:102
Dune::MyALUGridGeometryImplementation::GeometryImplBase::invalidate
void invalidate()
Definition: geometry.hh:176
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 3, tetra >::mapping
MappingType & mapping()
Definition: geometry.hh:616
Dune::MyALUGridGeometryImplementation::invalid
static const signed char invalid
Definition: geometry.hh:43
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 2, tetra >::MappingType
BaseType ::MappingType MappingType
Definition: geometry.hh:304
Dune::MyALUGridGeometryImplementation::GeometryImplBase::coord_
CoordinateStorageType coord_
to coordinates
Definition: geometry.hh:71
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 3, tetra >::update
void update(const CoordPtrType &p0, const CoordPtrType &p1, const CoordPtrType &p2, const CoordPtrType &p3)
Definition: geometry.hh:573
Dune::MyALUGridGeometryImplementation::GeometryImplBase::corners_
static const int corners_
number of corners
Definition: geometry.hh:56
Dune::tetra
Definition: topology.hh:12
Dune::ALU3dGridGeometry::LocalCoordinate
FieldVector< ctype, mydim > LocalCoordinate
type of local coordinates
Definition: geometry.hh:665
Dune::ALU3dGridGeometry::type
GeometryType type() const
Definition: geometry_imp.cc:17
Dune::ALU3dGridGeometry::buildGeom
bool buildGeom(const IMPLElementType &item)
Methods that not belong to the Interface, but have to be public.
Definition: geometry_imp.cc:169
Dune::ALU3dGridGeometry::valid
bool valid() const
invalidate geometry implementation to avoid errors
Definition: geometry.hh:756
Dune::ALU3dGridGeometry::GEOFaceType
ALU3dImplTraitsType::GEOFaceType GEOFaceType
Definition: geometry.hh:642
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 1, eltype >::BaseType
GeometryImplBase< dim, dim+1, LinearMapping< cdim, dim > > BaseType
Definition: geometry.hh:246
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 2, tetra >::mapping
MappingType & mapping()
Definition: geometry.hh:330
Dune::ALU3dGridGeometry::GeometryImplType
MyALUGridGeometryImplementation< cdim >::template GeometryImpl< 0, mydim, elementType > GeometryImplType
Definition: geometry.hh:659
Dune::MyALUGridGeometryImplementation::updated
static const signed char updated
Definition: geometry.hh:44
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 3, tetra >::GeometryImpl
GeometryImpl()
Definition: geometry.hh:549
Dune::MyALUGridGeometryImplementation::GeometryImpl::BaseType
GeometryImplBase< dim, dim+1, LinearMapping< cdim, dim > > BaseType
Definition: geometry.hh:197
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 3, hexa >::CoordinateMatrixType
BaseType ::CoordinateMatrixType CoordinateMatrixType
Definition: geometry.hh:417
Dune::ALU3dGridGeometry::FaceCoordinatesType
FieldMatrix< ctype, GridImp::dimension==3 ? EntityCount< elementType >::numVerticesPerFace :2, cdim > FaceCoordinatesType
Definition: geometry.hh:678
Dune::ALU3dGridGeometry::HEdgeType
ALU3dImplTraitsType::HEdgeType HEdgeType
Definition: geometry.hh:648
Dune::MyALUGridGeometryImplementation::GeometryImpl::update
void update(const CoordPtrType &p0)
Definition: geometry.hh:230
Dune::MyALUGridGeometryImplementation::GeometryImpl::MappingType
BaseType ::MappingType MappingType
Definition: geometry.hh:205
mappings.hh
Dune::ALU3dGridGeometry::volume
ctype volume() const
returns volume of geometry
Definition: geometry_imp.cc:79
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 1, eltype >::MappingType
BaseType ::MappingType MappingType
Definition: geometry.hh:254
Dune::alu3d_ctype
double alu3d_ctype
Definition: alu3dinclude.hh:85
Dune::MyALUGridGeometryImplementation::CoordinateVectorType
FieldVector< alu3d_ctype, cdim > CoordinateVectorType
Definition: geometry.hh:41
alu3dinclude.hh
Dune::MyALUGridGeometryImplementation::GeometryImplBase::GeometryImplBase
GeometryImplBase()
default constructor
Definition: geometry.hh:87
Dune::MyALUGridGeometryImplementation::GeometryImplBase::valid
bool valid() const
Definition: geometry.hh:179
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 3, tetra >::updateInFather
void updateInFather(const GeometryImp &fatherGeom, const GeometryImp &myGeom)
Definition: geometry.hh:587
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 3, hexa >::MappingType
BaseType ::MappingType MappingType
Definition: geometry.hh:416
Dune::ALU3dGridGeometry::FaceTopo
FaceTopologyMapping< elementType > FaceTopo
Definition: geometry.hh:653
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 3, hexa >::BaseType
GeometryImplBase< 3, 8, TrilinearMapping > BaseType
Definition: geometry.hh:408
Dune::MyALUGridGeometryImplementation::GeometryImplBase::refCount_
unsigned int refCount_
reference counter used by SharedPointer
Definition: geometry.hh:84
Dune::ALU3dGridGeometry::ctype
GridImp ::ctype ctype
Definition: geometry.hh:662
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 2, hexa >::MappingType
BaseType ::MappingType MappingType
Definition: geometry.hh:362
alugrid_assert
#define alugrid_assert(EX)
Definition: alugrid_assert.hh:20
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 2, tetra >::BaseType
GeometryImplBase< 2, 3, LinearMapping< cdim, 2 > > BaseType
Definition: geometry.hh:296
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 3, hexa >::GeometryImpl
GeometryImpl()
constructor creating geo impl
Definition: geometry.hh:428
Dune::MyALUGridGeometryImplementation::GeometryImplBase::update
void update(const CoordPtrType &, const CoordPtrType &) const
Definition: geometry.hh:139
Dune::ALU3dGridGeometry::jacobianInverseTransposed
const JacobianInverseTransposed & jacobianInverseTransposed(const LocalCoordinate &local) const
Definition: geometry_imp.cc:110
Dune::ALU3dGridGeometry::JacobianTransposed
FieldMatrix< ctype, mydim, cdim > JacobianTransposed
type of jacobian transposed
Definition: geometry.hh:674
Dune::ALU3dGridGeometry::corners_
Definition: geometry.hh:655
Dune::MyALUGridGeometryImplementation::GeometryImplBase::setVolume
void setVolume(const double volume)
Definition: geometry.hh:182
Dune::ALU3dGridGeometry::jacobianTransposed
const JacobianTransposed & jacobianTransposed(const LocalCoordinate &local) const
jacobian transposed
Definition: geometry_imp.cc:118
Dune::ALU3dGridGeometry::HFaceType
ALU3dImplTraitsType::HFaceType HFaceType
Definition: geometry.hh:647
Dune::ALU3dGridGeometry::buildGeomInFather
bool buildGeomInFather(const GeometryType &fatherGeom, const GeometryType &myGeom)
build geometry of local coordinates relative to father
Definition: geometry_imp.cc:143
Dune::ALU3dGridGeometry::geoImplPtr_
ALU3DSPACE SharedPointer< GeometryImplType > geoImplPtr_
Definition: geometry.hh:766
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 2, hexa >::update
void update(const CoordPtrType &p0, const CoordPtrType &p1, const CoordPtrType &p2, const CoordPtrType &p3)
Definition: geometry.hh:377
Dune::FaceTopologyMapping
Definition: topology.hh:151
Dune::MyALUGridGeometryImplementation::GeometryImplBase::update
void update(const CoordPtrType &, const CoordPtrType &, const CoordPtrType &, const CoordPtrType &) const
Definition: geometry.hh:122
ALU3DSPACE
#define ALU3DSPACE
Definition: alu3dinclude.hh:24
Dune::ALU3dGridGeometry::ElementTopo
ElementTopologyMapping< elementType > ElementTopo
Definition: geometry.hh:652
Dune::MyALUGridGeometryImplementation::GeometryImpl::mapping
MappingType & mapping()
Definition: geometry.hh:218
geometry_imp.cc
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 3, hexa >::mapping
MappingType & mapping()
Definition: geometry.hh:503
Dune::MyALUGridGeometryImplementation::GeometryImplBase::volume
double volume() const
Definition: geometry.hh:185
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 3, hexa >::update
void update(const CoordPtrType &p0, const CoordPtrType &p1, const CoordPtrType &p2, const CoordPtrType &p3, const CoordPtrType &p4, const CoordPtrType &p5, const CoordPtrType &p6, const CoordPtrType &p7)
Definition: geometry.hh:452
Dune::ALU3dGridGeometry
Definition: entity.hh:28
Dune::MyALUGridGeometryImplementation::GeometryImplBase::MappingType
Mapping MappingType
the type of the mapping
Definition: geometry.hh:68
Dune::MyALUGridGeometryImplementation::GeometryImplBase::updateInFather
void updateInFather(const GeometryImp &fatherGeom, const GeometryImp &myGeom)
Definition: geometry.hh:153
Dune::MyALUGridGeometryImplementation::GeometryImplBase::update
void update(const CoordPtrType &) const
Definition: geometry.hh:146
Dune::ALU3dGridElementType
ALU3dGridElementType
Definition: topology.hh:12
Dune::MyALUGridGeometryImplementation
Definition: geometry.hh:38
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 3, tetra >::point
const alu3d_ctype * point(const int i) const
Definition: geometry.hh:556
Dune::ALU3dGridGeometry::invalidate
void invalidate()
invalidate geometry implementation to avoid errors
Definition: geometry.hh:753
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 3, hexa >::invalidate
void invalidate()
Definition: geometry.hh:516
Dune::MyALUGridGeometryImplementation::GeometryImplBase::volume_
double volume_
volume of element
Definition: geometry.hh:77
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 3, hexa >::valid
bool valid() const
Definition: geometry.hh:519
Dune::MyALUGridGeometryImplementation::GeometryImpl::operator[]
const CoordinateVectorType & operator[](const int i) const
Definition: geometry.hh:211
Dune::MyALUGridGeometryImplementation::GeometryImpl< dummy, 2, hexa >::mapping
MappingType & mapping()
Definition: geometry.hh:390
Dune::ALU3dGridGeometry::geoImpl
GeometryImplType & geoImpl() const
Definition: geometry.hh:760
Dune::MyALUGridGeometryImplementation::GeometryImpl
general type of geometry implementation
Definition: geometry.hh:190
Dune
Definition: alu3dinclude.hh:79
Dune::ALU3dGridGeometry::IMPLElementType
ALU3dImplTraitsType::IMPLElementType IMPLElementType
Definition: geometry.hh:641
Dune::MyALUGridGeometryImplementation::GeometryImplBase::map_
MappingType map_
the mapping
Definition: geometry.hh:74
Dune::LinearMapping< cdim, dim >
Dune::ALU3dGridGeometry::VertexType
ALU3dImplTraitsType::VertexType VertexType
Definition: geometry.hh:649
Dune::ALU3dGridGeometry::corner
GlobalCoordinate corner(int i) const
access to coordinates of corners. Index is the number of the corner
Definition: geometry_imp.cc:35
topology.hh
Dune::ALU3dGridGeometry::JacobianInverseTransposed
FieldMatrix< ctype, cdim, mydim > JacobianInverseTransposed
type of jacobian inverse transposed
Definition: geometry.hh:671
Dune::MyALUGridGeometryImplementation::GeometryImplBase::update
void update(const CoordPtrType &, const CoordPtrType &, const CoordPtrType &) const
Definition: geometry.hh:131
Dune::ALU3dGridGeometry::global
GlobalCoordinate global(const LocalCoordinate &local) const
Definition: geometry_imp.cc:44
Dune::MyALUGridGeometryImplementation::GeometryImplBase::copy
static void copy(const CoordPtrType &p, CoordinateVectorType &c)
Definition: geometry.hh:97