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

📄 odesolution.h

📁 利用C
💻 H
字号:
// Copyright (C) 2008 Benjamin Kehlet// Licensed under the GNU LGPL Version 2.1.//// First added:  2008-06-11// Last changed: 2008-06-11#ifndef __ODESOLUTION_H#define __ODESOLUTION_H#include <iostream>#include <fstream>#include <dolfin/common/types.h>#include <dolfin/la/uBlasVector.h>namespace dolfin{  //forward declarations  class ODE;  class Sample;  class ODESolution  {  public :    /// Create solution data for given ODE    ODESolution(ODE& ode);    ~ODESolution();    /// Evaluate (interpolate) value og solution at given time        void eval(const real t, uBlasVector& y);        /// for testing    void printVector(const uBlasVector& u);      private :        ODE& ode;    char *filename;    std::fstream file;    std::pair<real, uBlasVector> *cache;    uint count;        uint cachesize;    uint ringbufcounter;        //binary tree with mapping from t value to index in file    std::vector<real> bintree;        uint step;        void interpolate(const uBlasVector& v1,                     const real t1,                      const uBlasVector& v2,                      const real t2,                      const real t,                      uBlasVector& result);        void addSample(Sample& sample);        void makeIndex(); //make this object ready for reading        friend class TimeStepper;    friend class ODESolver;  };}#endif

⌨️ 快捷键说明

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