MathTL
numerics/up_function.h
00001 // -*- c++ -*-
00002 
00003 // +--------------------------------------------------------------------+
00004 // | This file is part of MathTL - the Mathematical Template Library    |
00005 // |                                                                    |
00006 // | Copyright (c) 2002-2009                                            |
00007 // | Thorsten Raasch, Manuel Werner                                     |
00008 // +--------------------------------------------------------------------+
00009 
00010 #ifndef _MATHTL_UP_FUNCTION_H
00011 #define _MATHTL_UP_FUNCTION_H
00012 
00013 #include <utils/function.h>
00014 #include <utils/array1d.h>
00015 
00016 namespace MathTL
00017 {
00018   
00040   class ApproximateUpFunction
00041     : public Function<1,double>
00042   {
00043   public:
00044     ApproximateUpFunction(const unsigned int k);
00045     virtual ~ApproximateUpFunction();
00046     double value(const Point<1,double>& p,
00047                  const unsigned int component = 0) const;
00048     void vector_value(const Point<1,double> &p,
00049                       Vector<double>& values) const;
00050     
00051   private:
00052     unsigned int k_;
00053     Array1D<double> coeffs;
00054   };
00055 
00056 }  
00057 
00058 // include implementation
00059 #include <numerics/up_function.cpp>
00060   
00061 #endif
 All Classes Functions Variables Typedefs Enumerations