dune-fem  2.8-git
unimplementedgeometry.hh
Go to the documentation of this file.
1 #ifndef DUNE_FEM_GRIDPART_COMMON_UNIMPLEMENTEDGEOMETRY_HH
2 #define DUNE_FEM_GRIDPART_COMMON_UNIMPLEMENTEDGEOMETRY_HH
3 
4 #include <string>
5 #include <utility>
6 
7 #include <dune/common/exceptions.hh>
8 #include <dune/common/fmatrix.hh>
9 #include <dune/common/fvector.hh>
10 
11 #include <dune/grid/common/geometry.hh>
12 
13 namespace Dune
14 {
15 
16  // UnimplementedGeometry
17  // ---------------------
18 
19  template< class ct, int mydim, int cdim >
21  {
22  static const int mydimension = mydim;
23  static const int coorddimension = cdim;
24 
25  typedef ct ctype;
26  typedef FieldVector< ctype, mydimension > LocalCoordinate;
27  typedef FieldVector< ctype, coorddimension > GlobalCoordinate;
28 
29  typedef FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed;
30  typedef FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed;
31 
32  UnimplementedGeometry ( std::string message = "Geometry not implemented" )
33  : message_( std::move( message ) )
34  {}
35 
36  GeometryType type () const { DUNE_THROW( NotImplemented, message_ ); }
37  bool affine () const { return false; }
38 
39  int corners () const { DUNE_THROW( NotImplemented, message_ ); }
40  GlobalCoordinate corner ( int i ) const { DUNE_THROW( NotImplemented, message_ ); }
41  GlobalCoordinate center () const { DUNE_THROW( NotImplemented, message_ ); }
42 
43  GlobalCoordinate global ( const LocalCoordinate &local ) const { DUNE_THROW( NotImplemented, message_ ); }
44  LocalCoordinate local ( const GlobalCoordinate &global ) const { DUNE_THROW( NotImplemented, message_ ); }
45 
46  ctype integrationElement ( const LocalCoordinate &local ) const { DUNE_THROW( NotImplemented, message_ ); }
47  ctype volume () const { DUNE_THROW( NotImplemented, message_ ); }
48 
49  JacobianTransposed jacobianTransposed ( const LocalCoordinate &local ) const { DUNE_THROW( NotImplemented, message_ ); }
50  JacobianInverseTransposed jacobianInverseTransposed ( const LocalCoordinate &local ) const { DUNE_THROW( NotImplemented, message_ ); }
51 
52  private:
53  std::string message_;
54  };
55 
56 } // namespace Dune
57 
58 #endif // #ifndef DUNE_FEM_GRIDPART_COMMON_UNIMPLEMENTEDGEOMETRY_HH
Definition: bindguard.hh:11
Definition: unimplementedgeometry.hh:21
GeometryType type() const
Definition: unimplementedgeometry.hh:36
FieldMatrix< ctype, mydimension, coorddimension > JacobianTransposed
Definition: unimplementedgeometry.hh:29
ctype integrationElement(const LocalCoordinate &local) const
Definition: unimplementedgeometry.hh:46
ctype volume() const
Definition: unimplementedgeometry.hh:47
int corners() const
Definition: unimplementedgeometry.hh:39
bool affine() const
Definition: unimplementedgeometry.hh:37
static const int coorddimension
Definition: unimplementedgeometry.hh:23
GlobalCoordinate corner(int i) const
Definition: unimplementedgeometry.hh:40
FieldVector< ctype, coorddimension > GlobalCoordinate
Definition: unimplementedgeometry.hh:27
UnimplementedGeometry(std::string message="Geometry not implemented")
Definition: unimplementedgeometry.hh:32
FieldMatrix< ctype, coorddimension, mydimension > JacobianInverseTransposed
Definition: unimplementedgeometry.hh:30
GlobalCoordinate center() const
Definition: unimplementedgeometry.hh:41
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
Definition: unimplementedgeometry.hh:50
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
Definition: unimplementedgeometry.hh:49
FieldVector< ctype, mydimension > LocalCoordinate
Definition: unimplementedgeometry.hh:26
ct ctype
Definition: unimplementedgeometry.hh:25
GlobalCoordinate global(const LocalCoordinate &local) const
Definition: unimplementedgeometry.hh:43
static const int mydimension
Definition: unimplementedgeometry.hh:22