Dune::GenericGeometry::BasicGeometry< mydim, Traits > Class Template Reference
[Generic Geometry Implementations]

#include <geometry.hh>

Inheritance diagram for Dune::GenericGeometry::BasicGeometry< mydim, Traits >:

Dune::GenericGeometry::Geometry< mydim, cdim, Grid > Dune::GenericGeometry::LocalGeometry< mydim, cdim, Grid >

List of all members.


Detailed Description

template<int mydim, class Traits>
class Dune::GenericGeometry::BasicGeometry< mydim, Traits >

generic implementation of DUNE geometries

This class is provides a generic implementation of a DUNE geometry.

Parameters shared by all codimensions are summarized into one class parameter called Traits. The following default implementation can be used (via subclassing) to provide the necessary information. It contains exactly the required fields:

  template< class ctype, int dimG, int dimW >
  struct DefaultGeometryTraits
  {
    typedef DuneCoordTraits< ctype > CoordTraits;
    
    static const int dimGrid = dimG;
    static const int dimWorld = dimW;

    //   hybrid   [ true if Codim 0 is hybrid ]
    static const bool hybrid = true;
    //   dunetype [ for Codim 0, needed for (hybrid=false) ]
    // static const GeometryType :: BasicType dunetype = GeometryType :: simplex;

    // what basic geometry type shall the line be considered?
    static const GeometryType :: BasicType linetype = GeometryType :: simplex;

    // explained below
    template< class Topology >
    struct Mapping
    {
      typedef MappingTraits< CoordTraits, Topology :: dimension, dimWorld > Traits;
      typedef CoordPointerStorage< Topology, typename Traits :: GlobalCoordType >
        CornerStorage;
      typedef CornerMapping< Topology, Traits, CornerStorage > type;
    };

    // explained below
    struct Caching
    {
      static const EvaluationType evaluateJacobianTransposed = ComputeOnDemand;
      static const EvaluationType evaluateJacobianInverseTransposed = ComputeOnDemand;
      static const EvaluationType evaluateIntegrationElement = ComputeOnDemand;
      static const EvaluationType evaluateNormal = ComputeOnDemand;
    };
  };

The structure specifying the reference mapping is Traits::Mapping::type. An example implementation is the GenericGeometry::CornerMapping which defines the simple mapping taking corners of the reference elements to corner of the entity in space. The class given by Traits::Mapping::CornerStorage (an example is given by GenericGeometry::CoordPointerStorage). is a container for the coordinates of the corners returned by the Dune::Geometry (also required for non-linear reference mappings). The third type in Traits::Mapping is a traits class for the reference mapping, following the structure of GenericGeometry::MappingTraits.

The central reference mapping specified by Traits::Mapping::type requires a constructure taking a single argument. The GenericGeometry::BasicGeometry has a constructure with one template argument which is passed on to the constructure of the used provided reference mapping. The interface for the this class is GenericGeometry::Mapping.

To increase the efficiency of the geometry implementation, different strategies for the caching of parts of the geometry data is provided. The specifics are given by the structure Traits::Caching. Possible values are:

Note:
This class cannot be used directly as an implementation of Dune::Geometry. Its template parameter list differs from what is expected there from the engine. One of the following derived classes can be used instead:

Public Types

typedef CoordTraits::ctype ctype
 Type used for coordinate components.
typedef FieldVector< ctype,
mydimension
LocalCoordinate
 Type used for parameter coordinates.
typedef FieldVector< ctype,
coorddimension
GlobalCoordinate
 Type used for world coordinates.
typedef FieldMatrix< ctype,
coorddimension, mydimension
Jacobian
 Type used for Jacobian matrices.

Public Member Functions

 BasicGeometry ()
 Default constructor.
template<class CoordVector>
 BasicGeometry (const GeometryType &type, const CoordVector &coords)
 Constructor using a GeometryType and a list of corner coordinates.
template<int fatherdim>
 BasicGeometry (const BasicGeometry< fatherdim, Traits > &father, int i)
 I don't understand what this is supposed to do.
 BasicGeometry (const BasicGeometry &other)
 Copy constructor.
 ~BasicGeometry ()
 Destructor.
BasicGeometryoperator= (const BasicGeometry &other)
 Assignment from other BasicGeometry.
bool operator! () const
 Test whether this BasicGeometry is properly set up.
GeometryType type () const
 Return the topological type of this geometry.
int corners () const
 Return the number of corners.
const GlobalCoordinateoperator[] (int i) const
 Return the world coordinates of the i-th corner.
GlobalCoordinate global (const LocalCoordinate &local) const
 Map local to global coordinates.
LocalCoordinate local (const GlobalCoordinate &global) const
 Map global to local coordinates.
bool checkInside (const LocalCoordinate &local) const
 Return true if a given point is within the parameter domain.
bool affine () const
 Return true if this is an affine geometry.
ctype integrationElement (const LocalCoordinate &local) const
 Return the factor $|det F|$ that appears in the integral transformation formula.
ctype volume () const
 Return the volume of the element.
const JacobianjacobianInverseTransposed (const LocalCoordinate &local) const
 Compute the transpose of the inverse Jacobian matrix of the transformation from the reference element into the world space.
GlobalCoordinate normal (int face, const LocalCoordinate &local) const
 Compute a normal.

Static Public Attributes

static const int mydimension = mydim
 The dimension of the parameter space of this geometry.
static const int coorddimension = Traits :: dimWorld
 The dimension of the world space of this geometry.

Constructor & Destructor Documentation

template<int mydim, class Traits>
template<int fatherdim>
Dune::GenericGeometry::BasicGeometry< mydim, Traits >::BasicGeometry ( const BasicGeometry< fatherdim, Traits > &  father,
int  i 
) [inline]

I don't understand what this is supposed to do.

Todo:
Please doc me


Member Function Documentation

template<int mydim, class Traits>
bool Dune::GenericGeometry::BasicGeometry< mydim, Traits >::operator! (  )  const [inline]

Test whether this BasicGeometry is properly set up.

Todo:
Please doc me better!

template<int mydim, class Traits>
GlobalCoordinate Dune::GenericGeometry::BasicGeometry< mydim, Traits >::normal ( int  face,
const LocalCoordinate local 
) const [inline]

Compute a normal.

Todo:
Doc me properly. How are the coordinates interpreted?


The documentation for this class was generated from the following file:

Generated on Sun Nov 15 22:29:10 2009 for dune-grid by  doxygen 1.5.6