Xyce  6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
N_ANP_AnalysisManager.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // Copyright Notice
3 //
4 // Copyright 2002 Sandia Corporation. Under the terms
5 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
6 // Government retains certain rights in this software.
7 //
8 // Xyce(TM) Parallel Electrical Simulator
9 // Copyright (C) 2002-2014 Sandia Corporation
10 //
11 // This program is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation, either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 //-----------------------------------------------------------------------------
24 
25 //-----------------------------------------------------------------------------
26 // Filename : $RCSfile: N_ANP_AnalysisManager.h,v $
27 //
28 // Purpose :
29 //
30 // Special Notes :
31 //
32 // Creator : Richard Schiek, SNL, Electrical and Microsystem Modeling
33 //
34 // Creation Date : 01/24/08
35 //
36 // Revision Information:
37 // ---------------------
38 //
39 // Revision Number: $Revision: 1.78.2.4 $
40 //
41 // Revision Date : $Date: 2014/08/28 21:00:43 $
42 //
43 // Current Owner : $Author: dgbaur $
44 //-----------------------------------------------------------------------------
45 
46 #ifndef Xyce_N_ANP_AnalysisManager_h
47 #define Xyce_N_ANP_AnalysisManager_h
48 
49 #include <list>
50 
51 #include <Teuchos_RefCountPtr.hpp>
52 using Teuchos::RefCountPtr;
53 using Teuchos::rcp;
54 
55 #include <N_UTL_Xyce.h>
56 #include <N_ANP_fwd.h>
57 #include <N_DEV_fwd.h>
58 #include <N_IO_fwd.h>
59 #include <N_UTL_fwd.h>
60 #include <N_PDS_fwd.h>
61 #include <N_TIA_fwd.h>
62 #include <N_LOA_fwd.h>
63 #include <N_LAS_fwd.h>
64 #include <N_NLS_fwd.h>
65 
66 #include <N_ANP_AnalysisBase.h>
67 #include <N_ANP_OutputMgrAdapter.h>
68 #include <N_ANP_StepEvent.h>
69 #include <N_ANP_AnalysisEvent.h>
70 #include <N_NLS_Manager.h>
71 #include <N_TIA_TIAParams.h>
72 #include <N_UTL_Listener.h>
73 #include <N_UTL_OptionBlock.h>
74 #include <N_UTL_Stats.h>
75 #include <N_UTL_Timer.h>
76 
77 class N_MPDE_Manager;
78 
79 namespace Xyce {
80 namespace Analysis {
81 
82 //-----------------------------------------------------------------------------
83 // Class :
84 // Purpose : This function converts between Nonlinear::AnalysisMode
85 // : and AnalysisManager.h ANP_Analysis_Mode
86 // Special Notes :
87 // Creator : Todd Coffey, 1414
88 // Creation Date : 07/23/08
89 //-----------------------------------------------------------------------------
91 
92 const char *analysisModeName(Analysis_Mode mode);
93 
94 //-----------------------------------------------------------------------------
95 // Class : AnalysisManager
96 //
97 // Purpose : This class manages, allocates, and sets up the
98 // various analysis types, such as DC, Trn,a HB, etc.
99 //
100 // Special Notes : Some of this class was once in the N_TIA_ControlAlgorithm
101 // class, which was set up back when Xyce only did transient
102 // simulations. As we added analysis types it became necessary
103 // to refactor the code so that each analysis type had its own
104 // set of classes.
105 //
106 // Creator : Eric Keiter, SNL
107 // Creation Date : 6/01/00 (N_TIA_ControlAlgorithm, now deprecated)
108 // Creation Date : 1/24/08 (for this version of the class. Date is approximate)
109 //-----------------------------------------------------------------------------
110 class AnalysisManager : public Util::Notifier<StepEvent>,
111  public Util::Notifier<AnalysisEvent>,
112  public Util::ListenerAutoSubscribe<StepEvent>,
113  public Util::ListenerAutoSubscribe<AnalysisEvent>
114 {
115  public:
116  // Default constructor.
117  AnalysisManager(IO::CmdParse & cp, Stats::Stat root_stat);
118 
119  // Destructor
121 
122  void notify(const StepEvent &step_event);
123  void notify(const AnalysisEvent &analysis_event);
124 
125  bool registerPkgOptionsMgr( IO::PkgOptionsMgr *pkgOptPtr );
126 
127  // Execution functions:
128  void resetAll();
129 
130  // Execute the control loop for the set analysis type.
131  bool run();
132 
133  // This function performs the final initializations. Mainly, it initializes
134  // the two data container classes, DataStore and StepErrorControl. It also
135  // registers the neccessary vectors with the LAS system class.
136  bool initializeAll(N_LOA_Loader * tmpLoaderPtr = 0);
137 
138  // Returns the current partial time derivative
139  double partialTimeDerivative();
140 
141  // Gets the next time-step value.
142  double getTime() const;
143 
144  // Gets the current time-step value.
145  double getCurrentTime() const;
146 
147  // Gets the final time-step value.
148  double getFinalTime() const;
149 
150  // Gets the initial time-step value.
151  double getInitialTime() const;
152 
153  // Gets the starting time-step value.
154  double getStartingTimeStep();
155 
156  // Updates the divided difference values.
157  bool updateDivDiffs();
158 
159  // Calls the time int. method to update the corrector derivatives.
160  bool updateDerivs();
161 
162  // updates state vectors following initial solve with previous operating point constraints
163  bool completeOPStartStep();
164 
165  // updates the State vectors. This function is called from the LOCA interface.
167  ( const std::vector<std::string> & paramNames,
168  const std::vector<double> & paramVals,
169  N_LAS_Vector * solnVecPtr );
170 
171  bool failHomotopyStep ();
172 
173  // This function equates the 6 temporary vectors with their "next" vector
174  // equivalents. This function is neccessary for the nonlinear solver damping
175  // loop.
176  bool equateTmpVectors();
177 
178  // Compute an estimate of the error in the integration step.
179  bool updateDerivsBlock(const std::list< index_pair > & solGIDList,
180  const std::list< index_pair > & staGIDList);
181 
182  // Prints out time loop information.
183  bool printLoopInfo(int start, int finish);
184 
185  // Gets the time-integration method.
186  int getTimeIntMode();
187 
188  // Get the steady-state flag (true if time int mode is none)
189  bool getDCOPFlag ();
190 
191  // Get the dcop flag for transient.(true if doing DCOP for transient initialization)
192  bool getTranOPFlag ();
193 
194  // Get the dcop flag for AC.(true if doing DCOP for AC initialization)
195  bool getACOPFlag ();
196 
197  bool getDCSweepFlag ();
198 
199  bool getDotOpFlag() {return dotOpSpecified_;};
200  bool getStepFlag() {return stepLoopFlag_;};
201 
203  void setSweepSourceResetFlag (bool ssrf) { sweepSourceResetFlag_=ssrf;} ;
204 
205  bool getTransientFlag () const;
206 
207  // Is the doubleDCOP algorithm enabled?
208  bool getDoubleDCOPEnabled ();
209 
210  void setCurrentMode(CurrentMode current_mode) {
211  currentMode_ = current_mode;
212  }
213 
215  return currentMode_;
216  }
217 
218  // Get block analysis information for HB
219  void setBlockAnalysisFlag( bool flagVal ) { blockAnalysisFlag_ = flagVal; }
220  bool getBlockAnalysisFlag() const;
221 
222  void setHBFlag( bool flagVal ) { hbFlag_ = flagVal; }
223  bool getHBFlag () {return hbFlag_; }
224 
225  // gets the index of the DCOP step.
226  // 0 = nonlinear poisson, 1=full TCAD
227  int getDoubleDCOPStep();
228 
229  // Gets/sets the step number.
230  int getStepNumber();
231  int getTranStepNumber();
232 
233  void setStepNumber(int step);
234  void setTranStepNumber(int step);
235 
236  // This is true only at the beginning of integration, not at a breakpoint.
237  bool getInitTranFlag();
238 
239  // Gets the step number.
240  //int getStepLoopIter () { return stepLoopIter_; }
241 
242  // Returns the time integration order
243  int getOrder ();
244 
245  int getNumberOfSteps ();
246  int getUsedOrder ();
247  int getNscsco ();
248 
249  const IO::CmdParse &getCommandLine() const {
250  return commandLine_;
251  }
252 
253  // Returns the "current" time step size.
254  double getCurrentStepSize();
255 
256  // Returns the "last" time step size.
257  double getLastStepSize();
258 
259  // Returns the breakpoint tolerance.
260  double getBreakpointTol();
261 
262  // Sets the breakpoint tolerance.
263  void setBreakpointTol(double bptol);
264 
265  // returns whether transient analysis is completed
266  bool isSimulationComplete();
267 
268  // Gets the size of the restart data (bytes?).
269  int restartDataSize( bool pack );
270 
271  // Sets the transient calculations parameters
272  bool setTranAnalysisParams(const Util::OptionBlock & paramsBlock);
273 
274  // Sets the DC sweep calculation parameters.
275  bool setDCAnalysisParams(const Util::OptionBlock & paramsBlock);
276 
277  // Method to handle OP statements.
278  bool setOPAnalysisParams(const Util::OptionBlock & paramsBlock);
279 
280  // Sets the STEP calculation parameters.
281  bool setSTEPAnalysisParams(const Util::OptionBlock & paramsBlock);
282 
283  // Sets the SAVE parameters.
284  bool setSaveOptions(const Util::OptionBlock & OB);
285 
286  // Sets the DCOP restart parameters.
287  bool setDCOPRestartParams(const Util::OptionBlock & OB);
288 
289  // Method to register the AC Analysis options.
290  bool setACAnalysisParams(const Util::OptionBlock & OB);
291 
292  // Method to register the MOR Analysis options.
293  bool setMORAnalysisParams(const Util::OptionBlock & OB);
294 
295  // Method to register the MOR utility options.
296  bool setMOROptions(const Util::OptionBlock & OB);
297 
298  // sets a time at which to pause the simulation
299  void setPauseTime(double pauseTime);
300  // returns time at which to pause the simulation
301  double getPauseTime();
302 
303  // returns true if the simulation is currently paused
304  bool isPaused();
305 
306  // signal that simulation is being resumed from previously paused state
307  void resumeSimulation();
308  // reset the resume flag to false.
309  void unset_resumeSimulation();
310 
311  // Registers the options block reference.
312  bool setTranOptions(const Util::OptionBlock & OB);
313 
314  // Method to register the MPDE Analysis options.
315  bool setMPDEAnalysisParams(const Util::OptionBlock & OB);
316 
317  // Method to register the MPDE utility options.
318  bool setMPDEOptions(const Util::OptionBlock & OB);
319 
320  // Method to register the HB Analysis options.
321  bool setHBAnalysisParams(const Util::OptionBlock & OB);
322 
323  // Method to register the HB utility options.
324  bool setHBOptions(const Util::OptionBlock & OB);
325 
326  // Method to register the linear solver / preconditioning options.
327  bool setLinSol(const Util::OptionBlock & OB);
328 
329  // Method to register the HB linear solver / preconditioning options.
330  bool setHBLinSol(const Util::OptionBlock & OB);
331 
332  // Method to register the MPDE utility options.
333  bool setTRANMPDEOptions(const Util::OptionBlock & OB);
334 
335  // Method to register the sensitivity options.
336  bool setSensOptions(const Util::OptionBlock & OB);
337 
338  // Registers the TIA parameters block reference.
339  bool registerTIAParams(const N_TIA_TIAParams & tiaParams_tmp);
340 
341  // Registers the linear system pointer.
342  bool registerLinearSystem(N_LAS_System * linearSystem_tmp);
343 
344  // Registers the nonlinear system manager pointer.
345  bool registerNLSManager(Nonlinear::Manager * nlsMgrPtr_tmp);
346 
347  // Registers the nonlinear loader pointer.
348  bool registerLoader(N_LOA_Loader * loader_tmp);
349 
350  // Registers the output manager pointer.
351  bool registerOutputMgr(IO::OutputMgr * outputPtr_tmp);
352 
353  // Registers the restart manager pointer.
354  bool registerRestartMgr(IO::RestartMgr * restartPtr_tmp);
355 
356  // Method to register the Device inerfaace pointer
357  bool registerDeviceInterface ( N_DEV_DeviceInterface * devInterfacePtr );
358 
359  // Method to register the Topology pointer
360  bool registerTopology( N_TOP_Topology * topoMgrPtr );
361 
362  // Method to register the Restart Manager pointer
363  bool registerRestartManager( IO::RestartMgr * resMgrPtr );
364 
365  // Method to register the Output Manager pointer
366  bool registerOutputManager( IO::OutputMgr * outMgrPtr );
367 
368  // Method to register the Application Builder pointer
369  bool registerApplicationBuilder( N_LAS_Builder * appBuilderPtr );
370 
371  // Registers the parallel services manager pointer.
372  bool registerParallelServices(N_PDS_Manager * pds_tmp);
373 
374  // Registers the restart intervals.
376 
377  // Registers the restart output intervals.
379 
380  // Registers the elapsed time timer
381  bool registerElapsedTimer(Util::Timer *);
382 
383  // Writes-out the restart data.
384  bool dumpRestartData(char * buf, int bsize, int & pos, N_PDS_Comm * comm, bool pack);
385 
386  // Restores the restart data.
387  bool restoreRestartData(char * buf, int bsize, int & pos, N_PDS_Comm * comm, bool pack );
388 
389  IO::RestartMgr &getRestartManager() {
390  return *restartPtr_;
391  }
392 
393  // Gets the solution variable data.
394  bool getSolnVarData(const int & gid, std::vector< double > & varData);
395 
396  // Gets the state variable data.
397  bool getStateVarData(const int & gid, std::vector< double > & varData);
398 
399  // Gets the store variable data.
400  bool getStoreVarData(const int & gid, std::vector< double > & varData);
401 
402  // Sets the solution variable data.
403  bool setSolnVarData(const int & gid, const std::vector< double > & varData);
404 
405  // Sets the state variable data.
406  bool setStateVarData(const int & gid, const std::vector< double > & varData);
407 
408  // Sets the store variable data.
409  bool setStoreVarData(const int & gid, const std::vector< double > & varData);
410 
411  // set/get beginning integration flag
412  void setBeginningIntegrationFlag(bool bif);
414 
415  // set/get integration method
416  void setIntegrationMethod(int im);
417  unsigned int getIntegrationMethod();
418 
419  // Gets the total time spent in the linear solvers.
420  double getTotalLinearSolutionTime() const;
421 
422  // Gets the total time spent in the residual load calculations.
423  double getTotalResidualLoadTime() const;
424 
425  // Gets the total time spent in the Jacobian load calculations.
426  double getTotalJacobianLoadTime() const;
427 
428  // set the next solution vector pointer. Needed for NOX...
429  bool setNextSolVectorPtr (N_LAS_Vector * solVecPtr);
430 
431  // Habanero API mixed signal functions:
432  bool provisionalStep (double maxTimeStep, double &currTimeStep);
433  void acceptProvisionalStep ();
434  void rejectProvisionalStep ();
435 
436  // Two-level Newton API functions:
437  // Execute the control loop for the set analysis type,
438  // for a set number of steps.
439  void setExternalSolverState (const N_DEV_SolverState & ss);
440  bool runStep
441  (const N_TIA_TimeIntInfo & tiInfo, N_TIA_TwoLevelError & tlError);
442 
443  void conductanceTest ();
444  bool startupSolvers ();
445  bool finishSolvers ();
446 
448  ( const std::vector<std::string> & paramNames,
449  const std::vector<double> & paramVals);
450 
451  void homotopyStepFailure ();
452 
453  void stepSuccess(CurrentMode analysisUpper);
454  void stepFailure(CurrentMode analysisUpper);
456  bool getBreakPoints (std::vector<Util::BreakPoint> &breakPointTimes);
457  bool startTimeStep (const N_TIA_TimeIntInfo & tiInfo);
458 
459 
460  // routines to get/set Dakota run flags and actually run a Dakota iteration
461  bool getDakotaRunFlag();
462  void setDakotaRunFlag( bool flag );
463  int getDakotaIteration();
464  void setDakotaIteration( int iterNumber );
465  void getTimeIntInfo (N_TIA_TimeIntInfo & tiInfo);
466 
468  bool evalTransientModel(
469  double t,
470  N_LAS_Vector * SolVectorPtr,
471  N_LAS_Vector * CurrSolVectorPtr,
472  N_LAS_Vector * LasSolVectorPtr,
473  N_LAS_Vector * StaVectorPtr,
474  N_LAS_Vector * CurrStaVectorPtr,
475  N_LAS_Vector * LasStaVectorPtr,
476  N_LAS_Vector * StaDerivVectorPtr,
477  N_LAS_Vector * StoVectorPtr,
478  N_LAS_Vector * CurrStoVectorPtr,
479  N_LAS_Vector * LasStoVectorPtr,
480  N_LAS_Vector * stoLeadCurrQVectorPtr,
481  N_LAS_Vector * QVectorPtr,
482  N_LAS_Vector * FVectorPtr,
483  N_LAS_Vector * BVectorPtr,
484  N_LAS_Vector * dFdxdVpVectorPtr,
485  N_LAS_Vector * dQdxdVpVectorPtr,
486  N_LAS_Matrix * dQdxMatrixPtr,
487  N_LAS_Matrix * dFdxMatrixPtr
488  );
490  double t,
491  N_LAS_Vector * SolVectorPtr,
492  N_LAS_Vector * StaVectorPtr,
493  N_LAS_Vector * StoVectorPtr
494  );
495 
496  //-----------------------------------------------------------------------------
497  // Function : AnalysisManager::getTIAParams
498  // Purpose :
499  // Special Notes :
500  // Scope : public
501  // Creator : Eric R. Keiter, SNL, Computational Sciences
502  // Creation Date : 11/05/04
503  //-----------------------------------------------------------------------------
505  {
506  return tiaParams_;
507  }
508 
509  private :
510 
511  bool getInputOPFlag ();
512 
513  // Allocate and register the MPDE Manager
514  void setupMPDEMgr_();
515  bool doMPDEregistrations_();
516 
517  // allocate analysis objects:
519 
521 
523 
524  // Sets the nonlinear solver solution parameters.
525  void setNLSParams_();
526 
527  public:
528  // Queries about output and restart times
530 
531  bool testRestartSaveTime();
532  // Queries to the MPDE Manager.
533  // keep there like this so we don't have to
534  // expose the MPDE Manager pointer
535  void setMPDEFlag( bool flagVal ) { mpdeFlag_ = flagVal; }
536  bool getMPDEFlag (); // "get" function for MPDE flag. (true if not IC)
537 
538  bool getMPDEIcFlag(); // get function for MPDE initial condition flag (true if MPDE & IC)
539  bool getMPDEStartupFlag(); // True if you have done an initial transient simulation before starting MPDE IC calculation
540  bool getWaMPDEFlag (); // "get" function for WaMPDE flag. (true if not IC)
541 
542  // For DCOP restart and/or .SAVE files.
543  bool testDCOPOutputTime_();
544  bool testSaveOutputTime_();
545 
546  public:
547  N_MPDE_Manager *getMPDEManager() const { return mpdeMgrPtr_; }
548 
550  return tiaDataStore_;
551  }
552 
554  return *primaryAnalysisObject_;
555  }
556 
557  void silenceProgress();
558 
559  void enableProgress();
560 
562  return devInterfacePtr_;
563  }
564 
565  N_LOA_NonlinearEquationLoader *getNonlinearEquationLoader() {
567  }
568 
569  N_LAS_Builder *getAppBuilder() {
570  return appBuilderPtr_;
571  }
572 
574  return nlsMgrPtr_;
575  }
576 
578  return stepErrorControl_;
579  }
580 
582  return workingIntgMethod_;
583  }
584 
585  N_PDS_Manager *getPDSManager() const {
586  return pdsMgrPtr_;
587  }
588 
589  IO::OutputMgr *getOutputManager() const {
590  return outMgrPtr_;
591  }
592 
593  N_LAS_System *getLinearSystem() const {
594  return linearSystem_;
595  }
596 
597  bool getSwitchIntegrator() const {
598  return switchIntegrator_;
599  }
600 
601  void setSwitchIntegrator(bool switch_itegrator) {
602  switchIntegrator_ = switch_itegrator;
603  }
604 
605  void setNextOutputTime(double next_output_time) {
606  nextOutputTime_ = next_output_time;
607  }
608 
609  double getNextOutputTime() const {
610  return nextOutputTime_;
611  }
612 
613  double getInitialOutputInterval() const {
614  return initialOutputInterval_;
615  }
616 
617  void setStepLoopInitialized(bool step_loop_initialized) {
618  stepLoopInitialized_ = step_loop_initialized;
619  }
620 
621  const std::vector< std::pair < double, double > > &getOutputIntervals() const {
622  return outputIntervals_;
623  }
624 
625  bool isStepLoopInitialized() const {
626  return stepLoopInitialized_;
627  }
628 
629  Util::Timer &getXyceTranTimer() {
630  return *xyceTranTimerPtr_;
631  }
632 
634  return *outputManagerAdapter_;
635  }
636 
638  return stepErrorControl_;
639  }
640 
641  int getDebugLevel() const {
642  return tiaParams_.debugLevel;
643  }
644 
645  Topo::Topology &getTopology() {
646  return *topoMgrPtr_;
647  }
648 
650  return *workingIntgMethod_;
651  }
652 
653  N_LOA_Loader &getLoader() {
654  return *loader_;
655  }
656 
657  void setAnalysisMode(Analysis_Mode analysis_mode) {
658  analysisMode_ = analysis_mode;
659  }
660 
662  return analysisMode_;
663  }
664 
665  double getSolverStartTime() const {
666  return solverStartTime_;
667  }
668 
669  double getStartTranTime() const {
670  return startTRANtime_;
671  }
672 
673  void setStartTranTime(double start_tran_time) {
674  startTRANtime_ = start_tran_time;
675  }
676 
677  bool getProgressFlag() const {
678  return progressFlag_;
679  }
680 
681  double getSaveTime() const {
682  return saveTime_;
683  }
684 
685  N_PDS_Comm &getPDSComm();
686 
687  private:
688  IO::ActiveOutput * activeOutput_;
689 
690  IO::CmdParse & commandLine_; ///< Command line object
691 
692  N_TIA_TIAParams tiaParams_; ///< Current time-integration method parameters
693  N_TIA_WorkingIntegrationMethod * workingIntgMethod_; ///< Working intergration method
694  N_TIA_StepErrorControl * stepErrorControl_; ///< Pointer to the TIA step-error control object.
695  N_LAS_System * linearSystem_; ///< Pointer to the linear system information and containers
696  Nonlinear::Manager * nlsMgrPtr_; ///< Pointer to the nonlinear solver manager.
697  N_LOA_Loader * loader_; ///< Pointer to the nonlinear loader object.
698  N_LOA_CktLoader * cktLoaderPtr_; ///< 'real' pointer to the ckt-loader.
699  IO::RestartMgr * restartPtr_; ///< Pointer to the restart manager.
700  IO::PkgOptionsMgr * pkgOptMgrPtr_; ///< package options manager
701  N_LOA_NonlinearEquationLoader * nonlinearEquationLoaderPtr_; ///< Pointer to the application loader
702  Device::DeviceInterface * devInterfacePtr_; ///< Pointer to the device interface
703  Topo::Topology * topoMgrPtr_; ///< Pointer to the topology manager
704  IO::OutputMgr * outMgrPtr_; ///< Pointer to the output manager
705  N_LAS_Builder * appBuilderPtr_; ///< Pointer to the applicaiton builder
706  N_PDS_Manager * pdsMgrPtr_; ///< Pointer to the parallel services manager.
707  OutputMgrAdapter * outputManagerAdapter_; ///< Output manager adapter
708  N_TIA_DataStore * tiaDataStore_; ///< TIA data store object.
709 
711 
713 
714  bool firstTime;
716  double startSimTime;
717 
719 
720  // Switch the integration flag.
722 
723  // DC Operating Point flag.
724  bool initializeAllFlag_; // true if the initializeAll function has been
725  // called once.
726 
728 
729  bool stepLoopFlag_; // true if there is an external
730  // parameter stepper loop around the dcop or
731  // transient simulation loops.
732 
733  bool stepLoopInitialized_; // true if the step loop has been set up.
734  bool dcLoopInitialized_; // true if the dc sweep loop has been set up.
735  bool gui_; // command line arg -gui is present
736 
737 
738  bool daeStateDerivFlag_; // true if running new-DAE and need
739  // state derivative. true by default.
740  // If set to true, it breaks MPDE.
741 
743 
745 
747 
748  Stats::Stat rootStat_;
749 
750  // Flag to decide whether to print progress
752 
753  // Xyce timing utility for timing the transient simulation CPU time.
754  Util::Timer * xyceTranTimerPtr_;
755 
756  // Xyce timing utility for timing elapsed run time
757  Util::Timer * elapsedTimerPtr_;
758 
760 
763 
764  // for .SAVE and/or DCOP restart.
765  double saveTime_;
767  bool saveFlag_;
770 
771  // .OP flag(s)
773 
774  // output and restart interval info
776  std::vector< std::pair < double, double > > outputIntervals_;
778 
780  std::vector< std::pair < double, double > > restartIntervals_;
782 
783  // for HB, MPDE, or any other block analysis type
785  bool hbFlag_;
786  bool mpdeFlag_;
787 
788  // sensitivity flag(s)
789  bool sensFlag_;
790 
791  // ref counted pointers for various analyses. Not all are used in every simulation
792  Teuchos::RefCountPtr<AnalysisBase> analysisObject_;
793  Teuchos::RefCountPtr<AnalysisBase> stepAnalysisTarget_;
794  Teuchos::RefCountPtr<AnalysisBase> dakotaAnalysisTarget_;
795  Teuchos::RefCountPtr<AnalysisBase> primaryAnalysisObject_;
796 
797  // MPDE stuff:
798  N_MPDE_Manager * mpdeMgrPtr_;
799  RefCountPtr<N_TIA_MPDEInterface> tiaMPDEIfacePtr_;
800 
801  // Two level Newton API:
802  RefCountPtr<AnalysisBase> twoLevelAnalysisObject_;
803 
804  // Habanero mixed-signal API:
805  RefCountPtr<AnalysisBase> mixedSignalAnalysisObject_;
806 
807  // parameter objects for each analysis type. These are saved until the
808  // analysis object of choice is allocated.
809  Util::OptionBlock tranParamsBlock;
810  Util::OptionBlock opParamsBlock;
811  Util::OptionBlock acParamsBlock;
812  Util::OptionBlock morParamsBlock;
813 
814  // Different block passed in for each sweep variable, so need to have
815  // these containers be vectors.
816  std::vector<Util::OptionBlock> dcParamsBlockVec;
817  std::vector<Util::OptionBlock> stepParamsBlockVec;
818 
819  Util::OptionBlock mpdeParamsBlock;
820  Util::OptionBlock hbParamsBlock;
821  Util::OptionBlock hbOptionsBlock;
822  Util::OptionBlock hbLinSolBlock;
823  Util::OptionBlock linSolBlock;
824  Util::OptionBlock dakotaParamsBlock;
825 
827 
828  public:
829  unsigned int breakPointRestartStep;
830 };
831 
832 } // namespace Analysis
833 } // namespace Xyce
834 
836 
837 #endif // Xyce_N_ANP_AnalysisManager_h