![]() |
00001 // Copyright (C) 2003 Johan Hoffman and Anders Logg. 00002 // Licensed under the GNU GPL Version 2. 00003 00004 #ifndef __EXPRESSION_FUNCTION_H 00005 #define __EXPRESSION_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 00015 class ExpressionFunction : public GenericFunction { 00016 public: 00017 00018 ExpressionFunction(); 00019 virtual ~ExpressionFunction(); 00020 00021 // Evaluation of function 00022 virtual real operator() (const Node& n, real t) const = 0; 00023 virtual real operator() (const Point& p, real t) const = 0; 00024 virtual real operator() (real x, real y, real z, real t) const = 0; 00025 00026 // Update values of element function 00027 virtual void update(FunctionSpace::ElementFunction& v, 00028 const FiniteElement& element, 00029 const Cell& cell, real t) const = 0; 00030 00031 // Update local function (restriction to given cell) 00032 virtual void update(NewArray<real>& w, const Cell& cell, const NewPDE& pde) const = 0; 00033 00034 }; 00035 00036 } 00037 00038 #endif
Documentation automatically generated with Doxygen on 10 Sep 2004.