⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 peak.cpp

📁 不错的国外的有限元程序代码,附带详细的manual,可以节省很多的底层工作.
💻 CPP
字号:
//   file PEAK.CXX
 
#include "peak.hxx"
#include <math.h>


double  PeakFunction :: at (double time)
   // Returns the value of the receiver at time 'time'.
{
   const double precision = 0.000001 ;

   if (! value)
      this -> getCoefficients() ;

   if (fabs(*t - time) < precision)
      return *value ;
   else
      return 0. ;
}


void  PeakFunction :: getCoefficients ()
   // Reads the date anf the time increment of the receiver in the data file.
{
   t     = new double[1] ;
   value = new double[1] ;

   *t     = this -> read("t") ;
   *value = this -> read("f(t)") ;
}


⌨️ 快捷键说明

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