Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

Map.h

Go to the documentation of this file.
00001 // Copyright (C) 2003 Johan Hoffman and Anders Logg.
00002 // Licensed under the GNU GPL Version 2.
00003 
00004 #ifndef __MAP_H
00005 #define __MAP_H
00006 
00007 #include <dolfin/Point.h>
00008 #include <dolfin/ShapeFunction.h>
00009 #include <dolfin/Product.h>
00010 #include <dolfin/ElementFunction.h>
00011 
00012 namespace dolfin
00013 {
00014   
00015   class Cell;
00016   class Edge;
00017   class Face;
00018 
00030   
00031   class Map
00032   {
00033   public:
00034     
00035     // Constructor
00036     Map();
00037 
00038     // Destructor
00039     virtual ~Map();
00040     
00042     virtual Point operator() (const Point& p) const = 0;
00043     
00046     virtual Point operator() (const Point& p, unsigned int boundary) const = 0;
00047 
00049     real det() const;
00050 
00052     real bdet() const;
00053 
00055     int boundary() const;
00056 
00058     const Cell& cell() const;
00059 
00061     virtual void update(const Cell& cell) = 0;
00062 
00064     virtual void update(const Edge& edge);
00065 
00067     virtual void update(const Face& face);
00068     
00070     real ddx(real a) const;
00071     real ddy(real a) const;
00072     real ddz(real a) const;
00073     real ddt(real a) const;
00074     
00076     virtual const FunctionSpace::ElementFunction ddx(const FunctionSpace::ShapeFunction& v) const = 0;
00077     virtual const FunctionSpace::ElementFunction ddy(const FunctionSpace::ShapeFunction& v) const = 0;
00078     virtual const FunctionSpace::ElementFunction ddz(const FunctionSpace::ShapeFunction& v) const = 0;
00079     virtual const FunctionSpace::ElementFunction ddt(const FunctionSpace::ShapeFunction& v) const = 0;
00080     
00081   protected:
00082     
00083     void reset();
00084     
00085     int dim; // Dimension
00086     
00087     // Jacobian of map from reference cell
00088     real f11, f12, f13;
00089     real f21, f22, f23;
00090     real f31, f32, f33;
00091     
00092     // Inverse of F
00093     real g11, g12, g13;
00094     real g21, g22, g23;
00095     real g31, g32, g33;
00096     
00097     // Determinant of derivative of map to cell
00098     real d;
00099 
00100     // Determinant of derivative of map to boundary of cell
00101     real bd;
00102 
00103     // Current boundary (triangle or tetrahedron) of cell
00104     int _boundary;
00105 
00106     // Current cell
00107     const Cell* _cell;
00108   };
00109   
00110 }
00111 
00112 #endif


Documentation automatically generated with Doxygen on 10 Sep 2004.