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

VectorExpressionFunction.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 __VECTOR_EXPRESSION_FUNCTION_H
00005 #define __VECTOR_EXPRESSION_FUNCTION_H
00006 
00007 #include <dolfin/VFunctionPointer.h>
00008 #include <dolfin/ExpressionFunction.h>
00009 
00010 namespace dolfin {
00011 
00012   class Cell;
00013   class FiniteElement;
00014 
00015   class VectorExpressionFunction : public ExpressionFunction {
00016   public:
00017     
00018     VectorExpressionFunction(vfunction f, int dim, int size);
00019     ~VectorExpressionFunction();
00020     
00021     // Evaluation of function
00022     real operator() (const Node&  n, real t) const;
00023     real operator() (const Node&  n, real t);
00024     real operator() (const Point& p, real t) const;
00025     real operator() (const Point& p, real t);
00026     real operator() (real x, real y, real z, real t) const;
00027     real operator() (real x, real y, real z, real t);
00028 
00029     // Update values of element function
00030     void update(FunctionSpace::ElementFunction &v,
00031                 const FiniteElement& element,
00032                 const Cell& cell, real t) const;
00033 
00034     // FIXME: works only for nodal basis
00035     void update(NewArray<real>& w, const Cell& cell, const NewPDE& pde) const;
00036 
00037   private:
00038     
00039     vfunction f;
00040    
00041     unsigned int dim;
00042     unsigned int size;
00043     
00044   };
00045 
00046 }
00047 
00048 #endif


Documentation automatically generated with Doxygen on 10 Sep 2004.