www.pudn.com > simulator.zip > General.cpp
/*========================================================================*/
/* This is for time domain integration by various schemes. */
/* Gyliu, Nov 17,1997 */
/*========================================================================*/
#include "General.h"
void ground_apply(void);
void parameter_initialize(void);
void vari_Stiff(void);
/**************************************************************************/
/* Function: main */
/**************************************************************************/
void main(void)
{
float d_d[MAX_CTRL_CHAN];
// float d_f[MAX_CTRL_CHAN];
FILE *fr;
parameter_initialize();
if (integration_method>3) integration_method=4;
Time_Integration_pointer[integration_method]->previous(); // prework of the scheme
fr=fopen("General.dat","w+"); // response file
for( Current_time = Dt ; Current_time <= Duration ; Current_time += Dt )
{
ground_apply();
Time_Integration_pointer[integration_method]->method(); // work of the scheme
// d_f[0]=Displ[0]*float(4.55e5)/9.81f;
// d_f[1]=Displ[1]*float(4.55e5)/9.81f;
// d_f[2]=Displ[2]*float(1.08e3)/9.81f;
fprintf(fr,"%8.4f",Current_time);
for ( int i=0 ; i