peak.hxx

来自「不错的国外的有限元程序代码,附带详细的manual,可以节省很多的底层工作.」· HXX 代码 · 共 40 行

HXX
40 行
字号
//   ***************************
//   *** CLASS PEAK FUNCTION ***
//   ***************************
 

#include "loadtime.hxx"


class PeakFunction : public LoadTimeFunction
/*
   This class implements a function that is 0 everywhere, except in a single
   point.
 DESCRIPTION
   't' is the only abscissa (time) where the function is not 0. 'value' is
   the value of the function 't'. Both 't' and 'value' are pointers, rather
   than numbers, so that their state (initialized or not) can be checked.
*/
{
   private :
      double*  t ;
      double*  value ;

   public :
      PeakFunction (int i,Domain* d) : LoadTimeFunction(i,d)
					     { t=NULL ; value=NULL ;}
      ~PeakFunction ()                       { delete t ; delete value ;}

      double  at (double) ;
      void    getCoefficients () ;
      void    instanciateYourself ()         { this->getCoefficients() ;}
} ;








⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?