47 #ifndef Xyce_N_TIA_STEP_ERROR_CONTROL_H
48 #define Xyce_N_TIA_STEP_ERROR_CONTROL_H
54 #include <N_UTL_Math.h>
59 #include <N_PDS_fwd.h>
62 #include <N_UTL_BreakPoint.h>
101 const std::string & netlist_filename,
120 Parallel::Machine comm,
121 bool breakpoints_enabled,
123 bool min_time_steps_breakpoint_given,
124 double min_time_steps_breakpoint);
132 Parallel::Machine comm,
136 bool breakpoints_enabled,
138 bool min_time_steps_breakpoint_given,
139 double min_time_steps_breakpoint);
153 void setBreakPoint(
const Util::BreakPoint &breakpoint,
double initial_time);
179 delta = std::fabs(delta);
180 return (delta < 1.0e-10 * (finalTime -
initialTime));
189 bool dumpRestartData(
char * buf,
int bsize,
int & pos, N_PDS_Comm * comm,
bool pack );
192 bool restoreRestartData(
char * buf,
int bsize,
int & pos, N_PDS_Comm * comm,
bool pack,
double &initial_time);
209 void updatePauseTime(Util::BreakPoint breakpoint,
double initial_time);
332 #endif // Xyce_N_TIA_STEP_ERROR_CONTROL_H
bool initializeBreakPoints(double start_time, double initial_time, double final_time)
BreakPointSet breakPoints_
double restartTimeStepScale_
BreakPointSet::iterator currentPauseBP
int newtonConvergenceStatus
double newtonStepReduction_
bool dumpRestartData(char *buf, int bsize, int &pos, N_PDS_Comm *comm, bool pack)
std::vector< double > sigma_
void evaluateStepError(const Loader::Loader &loader, const TIAParams &tia_params)
Pure virtual class to augment a linear system.
int nIterations
Number of newton iterations.
Util::BreakPointLess breakPointLess_
void updatePauseTime(Util::BreakPoint breakpoint, double initial_time)
StepErrorControl & operator=(const StepErrorControl &)
bool resetAll(const TIAParams &tia_params)
const Util::BreakPointLess & getBreakPointLess() const
bool setFromTIAParams(const TIAParams &tia_params)
double lastAttemptedTimeStep
WorkingIntegrationMethod & wimPtr_
Analysis manager.
std::set< Util::BreakPoint, Util::BreakPointLess > BreakPointSet
void updateStopTime(Parallel::Machine comm, bool breakpoints_enabled, double initial_time, bool min_time_steps_breakpoint_given, double min_time_steps_breakpoint)
double findNextStopTimeDeprecated(Parallel::Machine comm, bool breakpoints_enabled)
void setTimeStep(double newTimeStep)
double currentTimeStepRatio
bool restoreRestartData(char *buf, int bsize, int &pos, N_PDS_Comm *comm, bool pack, double &initial_time)
StepErrorControl(const std::string &netlist_filename, Analysis::AnalysisManager &analysis_manager, WorkingIntegrationMethod &working_integration_method, const TIAParams &tia_params)
void updateTwoLevelTimeInfo(Parallel::Machine comm, double nextTimeStep, double nextTime, int currentOrder, bool breakpoints_enabled, double initial_time, bool min_time_steps_breakpoint_given, double min_time_steps_breakpoint)
std::ostream & operator<<(std::ostream &os, const StepErrorControl &sec)
void setBreakPoint(const Util::BreakPoint &breakpoint, double initial_time)
void simulationPaused(double initial_time)
double minStepPrecisionFac_
Analysis::AnalysisManager & analysisManager_
void outputTimeInfo(std::ostream &os)
double pauseTime
Time step value at which to "pause" the simulation.
std::vector< double > beta_
int numberSuccessiveFailures
bool pauseSetAtZero
Flag used to indicate that a pause was specifically set at time zero and thus should not be ignored...
double getEstOverTol() const
std::vector< double > psi_
double currentTimeStepSum
bool previousCallStepSuccessful
int getRestartDataSize(bool pack)
void printBreakPoints(std::ostream &os) const
void integrationStepReport(std::ostream &os, bool step_attempt_status, bool sAStatus, bool testedError, const TIAParams &tia_params)
const std::string netlistFilename_
Working integration method.
bool updateMaxTimeStep(Parallel::Machine comm, Loader::Loader &loader, const TIAParams &tia_params, double suggestedMaxTimeStep=0.0)
void terseIntegrationStepReport(std::ostream &os, bool step_attempt_status, bool sAStatus, bool testedError, const TIAParams &tia_params)
virtual ~StepErrorControl()
bool updateBreakPoints(const Loader::Loader &loader, double initial_time)
int getNumberOfSteps() const
std::vector< double > alpha_
std::vector< double > gamma_