timecontr Class Reference

#include <timecontr.h>

List of all members.

Public Member Functions

double actualbacktimeincr ()
double actualforwtimeincr ()
double actualtime ()
void be_copy_of (timecontr &tc)
double endtime ()
double initialtimeincr ()
void initiate (timecontr &tc)
long isitimptime ()
double newtime (double &dt)
double newtime ()
void oldtime ()
void print (FILE *out)
void read (XFILE *in)
void restore_bin (FILE *in)
void restore_txt (FILE *in)
void save_bin (FILE *out)
void save_txt (FILE *out, int prec)
void seconds_days ()
double starttime ()
void take_values (timecontr &tc)
 timecontr (void)
 ~timecontr (void)

Public Attributes

long apit
 actual position in imptime array
double backwarddt
 actual backward time step
double bfdt
 backup of forward time step
double bfdtu
 backup of user defined forward time step
double bsdt
 backup of solver time step
double dtmax
 maximum time step
gfunctdtmaxfun
 actual maximum time step given by general time function
double dtmin
 minimum time step
gfunctdtminfun
 actual minimum time step given by general time function
double end_time
 end time
double forwarddt
 actual forward time step
long iiit
double * imptime
 array of important times
double it_step
long nit
 number of important times
double start_time
 starting time
timecontrtype tct
double time
 actual time
gfunct timefun
 function describing time increments

Detailed Description

class timecontr controles time in problems with time

JK

Definition at line 14 of file timecontr.h.


Constructor & Destructor Documentation

timecontr ( void   ) 
~timecontr ( void   ) 

Definition at line 50 of file timecontr.cpp.

References dtmaxfun, dtminfun, and imptime.


Member Function Documentation

double actualbacktimeincr (  ) 
double actualforwtimeincr (  ) 
double actualtime (  ) 
void be_copy_of ( timecontr tc  ) 

function reduces time step with respect to external conditions

this function is used in nonlinear dynamics in cases of nonequilibriated stages

Parameters:
rf - reduction factor

in the case of reduction three times, rf = 3;

10.9.2007, JK function copy values to another time controller

Parameters:
timecontr - pointer to another time controller

LS, 29.8.2012

Definition at line 638 of file timecontr.cpp.

References apit, backwarddt, bfdt, forwarddt, iiit, and time.

Referenced by solve_trfel_adaptivity_problem(), and adaptivityt::statedata_backup().

double endtime (  ) 

function returns ending time

6.4.2003, JK

Definition at line 453 of file timecontr.cpp.

References end_time.

Referenced by b3mat::b3mat(), rspecmat::compute_ages(), dplmat::compute_ages(), b3mat::compute_ages(), creepb::creepb(), creepbbeam::creepbbeam(), creepbs::creepbs(), difference_method(), dplmat::dplmat(), Ctlinterface::get_residual(), lin_nonstat_dform(), lin_nonstat_dform_resistance(), linear_nonstat_radiation_solv_dform(), linear_nonstat_solv_dform(), linear_nonstat_solv_dform_subcycl(), linear_nonstat_solv_vform(), newmark_method(), newton_raphson_coupl(), newton_raphson_coupl_new(), newton_raphson_gparcoupl_lin(), newton_raphson_gparcoupl_nonlin(), newton_raphson_parcoupl_common_dt(), newton_raphson_parcoupl_comp(), newton_raphson_parcoupl_lin(), newton_raphson_parcoupl_nonlin(), newton_raphson_parcoupl_nonlin_new(), newton_raphson_parcoupl_nonlin_old(), nonlin_newmark_method(), nonlin_nonstat_dform(), nonlinear_nonstat_solv(), nonlinear_nonstat_solv_dform(), nonlinear_nonstat_solv_dform_dneska(), nonlinear_nonstat_solv_fnr_dform(), nonlinear_nonstat_solv_fnr_dform_old(), nonlinear_nonstat_solv_linesearch(), nonlinear_nonstat_solv_new(), nonlinear_nonstat_solv_nr_dform(), nonlinear_nonstat_solv_old(), nonlinear_nonstat_solv_oldd(), nonlinear_nonstat_solv_pokus(), nonlinear_nonstat_solv_vform(), nonstat_solv_dform_comp(), nonstat_solv_vform_comp(), par_homogenization(), par_linear_nonstat_solv_vform(), par_newton_raphson_gparcoupl_lin(), par_newton_raphson_gparcoupl_nonlin(), par_newton_raphson_parcoupl_comp(), par_newton_raphson_parcoupl_lin(), par_newton_raphson_parcoupl_lin_vform(), par_newton_raphson_parcoupl_nonlin(), par_nonstat_solv_vform_comp(), par_solve_nonlinear_nonstationary_problem(), par_solve_nonlinear_nonstationary_problem_dform(), par_solve_prob_constr_phases(), par_solve_timemech_prob(), par_solve_timemech_prob2(), par_solve_timemech_prob_old(), rspecmat::rspecmat(), Ctlinterface::solve(), solve_nonstationary_growing_problem(), solve_nonstationary_growing_problem_nonlin(), solve_nonstationary_growing_vform(), solve_prob_constr_phases(), verlet_method(), visco_solver(), and visco_solver2().

double initialtimeincr (  ) 

function returns initial time increment

6.4.2003, JK

Definition at line 501 of file timecontr.cpp.

References gfunct::getval(), imptime, nit, start_time, and timefun.

Referenced by rspecmat::compute_ages(), dplmat::compute_ages(), b3mat::compute_ages(), difference_method(), Ctlinterface::get_residual(), initiate(), lin_nonstat_dform(), lin_nonstat_dform_resistance(), linear_nonstat_radiation_solv_dform(), linear_nonstat_solv_dform(), linear_nonstat_solv_dform_subcycl(), linear_nonstat_solv_vform(), newmark_method(), newton_raphson_coupl(), newton_raphson_coupl_new(), newton_raphson_gparcoupl_lin(), newton_raphson_gparcoupl_nonlin(), newton_raphson_parcoupl_common_dt(), newton_raphson_parcoupl_comp(), newton_raphson_parcoupl_lin(), newton_raphson_parcoupl_nonlin(), newton_raphson_parcoupl_nonlin_new(), newton_raphson_parcoupl_nonlin_old(), nonlin_newmark_method(), nonlin_nonstat_dform(), nonlinear_nonstat_solv(), nonlinear_nonstat_solv_dform(), nonlinear_nonstat_solv_dform_dneska(), nonlinear_nonstat_solv_fnr_dform(), nonlinear_nonstat_solv_fnr_dform_old(), nonlinear_nonstat_solv_linesearch(), nonlinear_nonstat_solv_new(), nonlinear_nonstat_solv_nr_dform(), nonlinear_nonstat_solv_old(), nonlinear_nonstat_solv_oldd(), nonlinear_nonstat_solv_pokus(), nonlinear_nonstat_solv_vform(), nonstat_solv_dform_comp(), nonstat_solv_vform_comp(), nonstat_solver_dform_init(), nonstat_solver_init(), par_homogenization(), par_linear_nonstat_solv_vform(), par_newton_raphson_gparcoupl_lin(), par_newton_raphson_gparcoupl_nonlin(), par_newton_raphson_parcoupl_comp(), par_newton_raphson_parcoupl_lin(), par_newton_raphson_parcoupl_lin_vform(), par_newton_raphson_parcoupl_nonlin(), par_nonstat_solv_vform_comp(), par_nonstat_solver_init(), par_nonstat_trfel_init(), par_solve_nonlinear_nonstationary_problem(), par_solve_nonlinear_nonstationary_problem_dform(), par_solve_prob_constr_phases(), par_solve_timemech_prob(), par_solve_timemech_prob2(), read(), Ctlinterface::solve(), solve_nonstationary_growing_problem(), solve_nonstationary_growing_problem_nonlin(), solve_nonstationary_growing_vform(), solve_prob_constr_phases(), verlet_method(), visco_solver(), and visco_solver2().

void initiate ( timecontr tc  ) 

function sets up input data from other object of the class timecontr

Parameters:
tc - another time controller

JK

Definition at line 577 of file timecontr.cpp.

References end_time, forwarddt, imptime, initialtimeincr(), gfunct::initiate(), nit, start_time, time, and timefun.

long isitimptime (  ) 
double newtime ( double &  dt  ) 

function returns new time with respect to important times and time step enforced by an analysis

Parameters:
dt - required time step from an analysis

30.5.2008, JK 31.10.2013 Rewritten by TKo+JK

Definition at line 266 of file timecontr.cpp.

References adaptivemax, adaptivemin, apit, backwarddt, bfdt, bfdtu, bsdt, dtmax, dtmin, end_time, fixed, forwarddt, gfunct::getval(), iiit, imptime, newtime(), nit, print_err(), tct, time, and timefun.

double newtime (  ) 

function returns new time with respect to important times

6.4.2003, JK

???!!! candidate for removal

Definition at line 221 of file timecontr.cpp.

References apit, backwarddt, forwarddt, gfunct::getval(), iiit, imptime, nit, time, and timefun.

Referenced by difference_method(), lin_nonstat_dform(), lin_nonstat_dform_resistance(), linear_nonstat_radiation_solv_dform(), linear_nonstat_solv_dform(), linear_nonstat_solv_dform_subcycl(), linear_nonstat_solv_vform(), newmark_method(), newtime(), newton_raphson_coupl(), newton_raphson_coupl_new(), newton_raphson_gparcoupl_lin(), newton_raphson_gparcoupl_nonlin(), newton_raphson_parcoupl_common_dt(), newton_raphson_parcoupl_comp(), newton_raphson_parcoupl_lin(), newton_raphson_parcoupl_nonlin(), newton_raphson_parcoupl_nonlin_new(), newton_raphson_parcoupl_nonlin_old(), nonlin_newmark_method(), nonlin_nonstat_dform(), nonlinear_nonstat_solv(), nonlinear_nonstat_solv_dform(), nonlinear_nonstat_solv_dform_dneska(), nonlinear_nonstat_solv_fnr_dform(), nonlinear_nonstat_solv_fnr_dform_old(), nonlinear_nonstat_solv_linesearch(), nonlinear_nonstat_solv_new(), nonlinear_nonstat_solv_nr_dform(), nonlinear_nonstat_solv_old(), nonlinear_nonstat_solv_oldd(), nonlinear_nonstat_solv_pokus(), nonlinear_nonstat_solv_vform(), nonstat_solv_dform_comp(), nonstat_solv_vform_comp(), par_homogenization(), par_linear_nonstat_solv_vform(), par_newton_raphson_gparcoupl_lin(), par_newton_raphson_gparcoupl_nonlin(), par_newton_raphson_parcoupl_comp(), par_newton_raphson_parcoupl_lin(), par_newton_raphson_parcoupl_lin_vform(), par_newton_raphson_parcoupl_nonlin(), par_nonstat_solv_vform_comp(), par_solve_nonlinear_nonstationary_problem(), par_solve_nonlinear_nonstationary_problem_dform(), par_solve_prob_constr_phases(), par_solve_timemech_prob(), par_solve_timemech_prob2(), par_solve_timemech_prob_old(), Ctlinterface::solve(), solve_nonstationary_growing_problem(), solve_nonstationary_growing_problem_nonlin(), solve_nonstationary_growing_vform(), solve_prob_constr_phases(), verlet_method(), visco_solver(), and visco_solver2().

void oldtime (  ) 
void print ( FILE *  out  ) 

function prints necessary information about time measurement

Parameters:
out - output stream

6.4.2003, JK

Definition at line 166 of file timecontr.cpp.

References adaptive, adaptive_minmax, adaptivemax, adaptivemin, dtmax, dtmaxfun, dtmin, dtminfun, end_time, fixed, imptime, it_step, nit, gfunct::print(), print_err(), start_time, tct, and timefun.

Referenced by probdesct::print(), probdescc::print(), and probdesc::print().

void read ( XFILE in  ) 

function reads necessary information about time measurement

Parameters:
in - input stream

6.4.2003, JK 19.9.2011, Modified by Tomas Koudelka (it_step)

Definition at line 65 of file timecontr.cpp.

References adaptive, adaptive_minmax, adaptivemax, adaptivemin, bfdt, bfdtu, dtmax, dtmaxfun, dtmin, dtminfun, end_time, fixed, forwarddt, imptime, initialtimeincr(), it_step, long(), nit, print_err(), gfunct::read(), start_time, tct, time, timecontrtype_kwdset(), timefun, and xfscanf().

Referenced by probdesct::read(), probdescc::read(), and probdesc::read().

void restore_bin ( FILE *  in  ) 

Function restores internal data from the given backup binary file.

Parameters:
out - pointer to the opened binary backup file
Return values:
The function does not return anything

Created 3.2009 by TKo

Definition at line 723 of file timecontr.cpp.

References apit, backwarddt, bfdt, forwarddt, iiit, and time.

Referenced by solver_restore_binary_multiple(), solver_restore_binary_single(), solvert_restore_binary_multiple(), and solvert_restore_binary_single().

void restore_txt ( FILE *  in  ) 

Function restores internal data from the given backup text file.

Parameters:
out - pointer to the opened text backup file
Return values:
The function does not return anything

Created 3.2009 by TKo

Definition at line 702 of file timecontr.cpp.

References apit, backwarddt, bfdt, forwarddt, iiit, and time.

Referenced by solver_restore_text_multiple(), solver_restore_text_single(), solvert_restore_text_multiple(), and solvert_restore_text_single().

void save_bin ( FILE *  out  ) 

Function saves internal data to the given backup binary file.

Parameters:
out - pointer to the opened binary backup file
Return values:
The function does not return anything

Created 3.2009 by TKo

Definition at line 681 of file timecontr.cpp.

References apit, backwarddt, bfdt, forwarddt, iiit, and time.

Referenced by solver_save_binary_multiple(), solver_save_binary_single(), solvert_save_binary_multiple(), and solvert_save_binary_single().

void save_txt ( FILE *  out,
int  prec 
)

Function saves internal data to the given backup text file.

Parameters:
out - pointer to the opened text backup file
prec - precision for output of the real values
Return values:
The function does not return anything

Created 3.2009 by TKo

Definition at line 660 of file timecontr.cpp.

References apit, backwarddt, bfdt, forwarddt, iiit, and time.

Referenced by solver_save_text_multiple(), solver_save_text_single(), solvert_save_text_multiple(), and solvert_save_text_single().

void seconds_days (  ) 

function transforms time in seconds to time in days

JK, 20.9.2004

Definition at line 546 of file timecontr.cpp.

References backwarddt, end_time, forwarddt, start_time, and time.

double starttime (  ) 

function returns starting time

6.4.2003, JK

Definition at line 441 of file timecontr.cpp.

References start_time.

Referenced by difference_method(), Ctlinterface::get_residual(), lin_nonstat_dform(), lin_nonstat_dform_resistance(), linear_nonstat_radiation_solv_dform(), linear_nonstat_solv_dform(), linear_nonstat_solv_dform_subcycl(), linear_nonstat_solv_vform(), metr_init(), newmark_method(), newton_raphson_coupl(), newton_raphson_coupl_new(), newton_raphson_gparcoupl_lin(), newton_raphson_gparcoupl_nonlin(), newton_raphson_parcoupl_common_dt(), newton_raphson_parcoupl_comp(), newton_raphson_parcoupl_lin(), newton_raphson_parcoupl_nonlin(), newton_raphson_parcoupl_nonlin_new(), newton_raphson_parcoupl_nonlin_old(), nonlin_newmark_method(), nonlin_nonstat_dform(), nonlinear_nonstat_solv(), nonlinear_nonstat_solv_dform(), nonlinear_nonstat_solv_dform_dneska(), nonlinear_nonstat_solv_fnr_dform(), nonlinear_nonstat_solv_fnr_dform_old(), nonlinear_nonstat_solv_linesearch(), nonlinear_nonstat_solv_new(), nonlinear_nonstat_solv_nr_dform(), nonlinear_nonstat_solv_old(), nonlinear_nonstat_solv_oldd(), nonlinear_nonstat_solv_pokus(), nonlinear_nonstat_solv_vform(), nonstat_solver_dform_init(), nonstat_solver_init(), par_homogenization(), par_linear_nonstat_solv_vform(), par_newton_raphson_gparcoupl_lin(), par_newton_raphson_gparcoupl_nonlin(), par_newton_raphson_parcoupl_comp(), par_newton_raphson_parcoupl_lin(), par_newton_raphson_parcoupl_lin_vform(), par_newton_raphson_parcoupl_nonlin(), par_nonstat_solver_init(), par_nonstat_trfel_init(), par_solve_nonlinear_nonstationary_problem(), par_solve_nonlinear_nonstationary_problem_dform(), par_solve_prob_constr_phases(), par_solve_timemech_prob(), par_solve_timemech_prob_old(), par_visco_mefel_init(), par_visco_solver_init(), pmetr_init(), solve_nonstationary_growing_problem(), solve_nonstationary_growing_problem_nonlin(), solve_nonstationary_growing_vform(), solve_prob_constr_phases(), trfel_init(), verlet_method(), visco_solver(), and visco_solver_init().

void take_values ( timecontr tc  ) 

Member Data Documentation

long apit

actual position in imptime array

Definition at line 65 of file timecontr.h.

Referenced by be_copy_of(), newtime(), oldtime(), sel::presence_id(), restore_bin(), restore_txt(), save_bin(), save_txt(), and timecontr().

double backwarddt
double bfdt

backup of forward time step

Definition at line 49 of file timecontr.h.

Referenced by be_copy_of(), newtime(), read(), restore_bin(), restore_txt(), save_bin(), save_txt(), and timecontr().

double bfdtu

backup of user defined forward time step

Definition at line 53 of file timecontr.h.

Referenced by newtime(), read(), and timecontr().

double bsdt

backup of solver time step

Definition at line 51 of file timecontr.h.

Referenced by newtime(), and timecontr().

double dtmax

actual maximum time step given by general time function

Definition at line 92 of file timecontr.h.

Referenced by print(), read(), timecontr(), and ~timecontr().

double dtmin

actual minimum time step given by general time function

Definition at line 89 of file timecontr.h.

Referenced by print(), read(), timecontr(), and ~timecontr().

double end_time

end time

Definition at line 57 of file timecontr.h.

Referenced by endtime(), initiate(), newtime(), print(), read(), seconds_days(), take_values(), and timecontr().

double forwarddt
long iiit

is it important time now? iiit=0 - no iiit=1 - yes

Definition at line 69 of file timecontr.h.

Referenced by be_copy_of(), isitimptime(), newtime(), oldtime(), sel::presence_id(), restore_bin(), restore_txt(), save_bin(), save_txt(), and timecontr().

double* imptime

array of important times

Definition at line 61 of file timecontr.h.

Referenced by initialtimeincr(), initiate(), newtime(), oldtime(), print(), read(), timecontr(), and ~timecontr().

double it_step

Definition at line 71 of file timecontr.h.

Referenced by print(), read(), and timecontr().

long nit

number of important times

Definition at line 63 of file timecontr.h.

Referenced by initialtimeincr(), initiate(), newtime(), print(), read(), and timecontr().

double start_time

starting time

Definition at line 55 of file timecontr.h.

Referenced by kunmat::hystereze(), initialtimeincr(), initiate(), print(), read(), seconds_days(), starttime(), take_values(), and timecontr().

type of time controller tct = 0 - fixed - time increments are defined by user due the function timefun, solvers are not able to change these time steps tct = 1 - adaptive - there are minimum and maximum time steps prescribed by user, the minimum and maximum time steps are constants, solver prescribes the time steps, the final time step is equal to the time step from solver except the case where user time step differs for the actual time and the previous one tct = 2 - adaptivemin - the minimum time step is defined by a constant, smaller value of solver time step and user time is used in the case of change of user time step, tct = 3 - adaptivemax

Definition at line 82 of file timecontr.h.

Referenced by hypoplast::matstiff(), newtime(), newton_raphson_parcoupl_common_dt(), newton_raphson_parcoupl_comp(), hypoplast::nlstresses(), nonstat_solv_dform_comp(), nonstat_solv_vform_comp(), par_newton_raphson_parcoupl_comp(), par_nonstat_solv_vform_comp(), par_solve_timemech_prob2(), print(), read(), and timecontr().

double time

The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2