Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

scalarfunction.h

00001 /***************************************************************************
00002                           scalarfunction.h  -  description
00003                              -------------------
00004     begin                : Tue May 2 2000
00005     copyright            : (C) 2000 by Michael Peeters
00006     email                : Michael.Peeters@vub.ac.be
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef SCALARFUNCTION_H
00019 #define SCALARFUNCTION_H
00020 
00021 #include "numerictypes.h"
00022 #include "numerictraits.h"
00023 
00024 namespace MODEL {
00025 
00029 template <integer dims, class NT = NumericTraits<number,dims> >
00030 class ScalarFunction
00031 {
00032         public:
00033                 typedef typename NT::number     numT;
00034         typedef typename NT::vect       vect;
00035                 
00036                 ScalarFunction() {}
00037                 virtual ~ScalarFunction() {}
00038                 
00040                 virtual ScalarFunction* clone () const =0;
00041                                         
00043                 numT    operator()(const vect& u)
00044                         { numT temp(0.); return function(temp,u); }
00045                                                                 
00050                 virtual const numT& function(numT& fu,const vect& u) = 0;       
00051 };
00052 
00053 } //end namespace
00054 
00055 #endif
00056 
00057 /*********************************************************************
00058 $Id: scalarfunction.h,v 1.1 2001/05/22 10:54:55 mpeeters Exp $
00059 **********************************************************************
00060 
00061 $Log: scalarfunction.h,v $
00062 Revision 1.1  2001/05/22 10:54:55  mpeeters
00063 Moved sources and headers for libModel to model/ subdirectory, in an attempt to rationalize the source tree. This should make things "netter".
00064 
00065 Revision 1.2  2000/09/15 10:26:31  mpeeters
00066 Cleaned out header and added CVS tails to files, removed superfuous
00067 @author comments, inserted dates
00068 
00069 *********************************************************************/

To get the sources or tarballs, please go to SourceForge or you can use the CVS repository.

More Info? Michael Peeters. Also, check our research website: www.alna.vub.ac.be

Last update: June 2002.


Looking for Open Source? Check out SourceForge Logo !