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

📄 timestep.hxx

📁 不错的国外的有限元程序代码,附带详细的manual,可以节省很多的底层工作.
💻 HXX
字号:
//   ***********************
//   *** CLASS TIME STEP ***
//   ***********************


#ifndef timestep_hxx

#include "femcmpnn.hxx"
#include <stdio.h>
class TimeIntegrationScheme ;


class TimeStep : public FEMComponent
/*
   This class implements a step in a time history.
 DESCRIPTION :
   A time step n is characterized by its date 't', and by the time increment
   'dt' between step n-1 and step n.
   The time step knows the time history 'scheme' it belongs to. Its attribute
   'newLhs' is True if the LHS of the linear system must be (re)computed,
   else it is False ; for example, in quasi-static analysis, 'newLhs; is True
   if the step's number is 1 (the first time, the LHS must be assembled), and
   False otherwise (the same LHS is used - no need for recalculating it).
   The time obtains the value of 'newLhs' from its scheme.
 TASKS :
   - returning its time 't' and its time increment 'dt'.
   - returning the boolean 'newLhs' (method 'requiresNewLhs').
*/
{
   enum { FALSE , TRUE , UNKNOWN } ;

   protected :
      TimeIntegrationScheme*  scheme ;
      double                  t ;
      double                  deltaT ;
      int                     newLhs ;

   public :
      TimeStep (int,TimeIntegrationScheme*) ;       // constructors
      TimeStep (TimeIntegrationScheme*,TimeStep*) ;

      char*      giveClassName (char* s)    { return strcpy(s,"TimeStep") ;}
      TimeStep*  givePreviousStep() ;
      double     giveTime ()                { return t ;}
      double     giveTimeIncrement ()       { return deltaT ;}
      int        isNotTheLastStep () ;
      int        isTheCurrentTimeStep () ;
      int        requiresNewLhs () ;
} ;

#define timestep_hxx
#endif

⌨️ 快捷键说明

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