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

DofFunction.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 __DOF_FUNCTION_H
00005 #define __DOF_FUNCTION_H
00006 
00007 #include <dolfin/ElementFunction.h>
00008 #include <dolfin/GenericFunction.h>
00009 
00010 namespace dolfin {
00011 
00012   class Cell;
00013   class FiniteElement;
00014   class Vector;
00015   class Mesh;
00016   class NewPDE;
00017   
00018   class DofFunction : public GenericFunction {
00019   public:
00020     
00021     DofFunction(Mesh& mesh, Vector& dofs, int dim, int size);
00022     ~DofFunction();
00023          
00024     // Evaluation of function
00025     real operator() (const Node&  n, real t) const;
00026     real operator() (const Node&  n, real t);
00027 
00028     // Update function to given time
00029     void update(real t);
00030 
00031     // Return current time
00032     real time() const;
00033 
00034     // Return the mesh
00035     Mesh& mesh() const;
00036 
00037     // Update values of element function
00038     void update(FunctionSpace::ElementFunction &v,
00039                 const FiniteElement &element,
00040                 const Cell &cell, real t) const;
00041 
00042     // Update local function (restriction to given cell)
00043     void update(NewArray<real>& w, const Cell& cell, const NewPDE& pde) const;
00044     
00045   private:
00046     
00047     Mesh& _mesh;
00048     Vector& x;
00049     real t;
00050 
00051     unsigned int dim;
00052     unsigned int size;
00053     
00054   };
00055 
00056 }
00057 
00058 #endif


Documentation automatically generated with Doxygen on 10 Sep 2004.