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

GenericFunction.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 __GENERIC_FUNCTION_H
00005 #define __GENERIC_FUNCTION_H
00006 
00007 #include <dolfin/NewArray.h>
00008 #include <dolfin/ElementFunction.h>
00009 
00010 namespace dolfin {
00011 
00012   class Cell;
00013   class Node;
00014   class Point;
00015   class Mesh;
00016   class ElementData;
00017   class FiniteElement;
00018   class NewPDE;
00019   
00020   class GenericFunction {
00021   public:
00022     
00023     GenericFunction();
00024     virtual ~GenericFunction();
00025 
00026     // Evaluation of function
00027     virtual real operator() (const Node&  n, real t) const;
00028     virtual real operator() (const Node&  n, real t);
00029     virtual real operator() (const Point& p, real t) const;
00030     virtual real operator() (const Point& p, real t);
00031     virtual real operator() (real x, real y, real z, real t) const;
00032     virtual real operator() (real x, real y, real z, real t);
00033     virtual real operator() (unsigned int i, real t) const;
00034     virtual real operator() (unsigned int i, real t);
00035 
00036     // Update function to given time
00037     virtual void update(real t);
00038 
00039     // Return current time
00040     virtual real time() const;
00041 
00042     // FIXME: Special member functions below: Should they be removed?
00043     //---------------------------------------------------------------
00044 
00045     // Return the mesh
00046     virtual Mesh& mesh() const;
00047     
00048     // Get element data
00049     virtual ElementData& elmdata();
00050 
00051     // Update values of element function
00052     virtual void update(FunctionSpace::ElementFunction &v,
00053                         const FiniteElement &element, 
00054                         const Cell &cell, real t) const;
00055 
00056     // Update local function (restriction to given cell)
00057     virtual void update(NewArray<real>& w, const Cell& cell, const NewPDE& pde) const;
00058     
00059   };
00060   
00061 }
00062 
00063 #endif


Documentation automatically generated with Doxygen on 10 Sep 2004.