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

Lagrange.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 __LAGRANGE_H
00005 #define __LAGRANGE_H
00006 
00007 #include <dolfin/dolfin_log.h>
00008 #include <dolfin/constants.h>
00009 
00010 namespace dolfin {
00011 
00024 
00025   class Lagrange {
00026   public:
00027  
00029     Lagrange(unsigned int q);
00030     
00032     Lagrange(const Lagrange& p);
00033     
00035     ~Lagrange();
00036     
00038     void set(unsigned int i, real x);
00039 
00041     unsigned int size() const;
00042     
00044     unsigned int degree() const;
00045     
00047     real point(unsigned int i) const;
00048     
00050     real operator() (unsigned int i, real x);
00051     
00053     real eval(unsigned int i, real x);
00054 
00056     real ddx(unsigned int i, real x);
00057 
00059     real dqdx(unsigned int i);
00060 
00062     friend LogStream& operator<<(LogStream& stream, const Lagrange& p);
00063     void show() const;
00064     
00065   private:
00066 
00067     void init();
00068     
00069     unsigned int q;
00070     unsigned int n;
00071     real* points; 
00072     real* constants;
00073 
00074   };
00075 
00076 }
00077 
00078 #endif


Documentation automatically generated with Doxygen on 10 Sep 2004.