Xyce  6.1
N_ANP_AnalysisManager.C
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-2015 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.C,v $
27 // Purpose : This file contains the functions which define the time
28 // domain & integration algorithm classes.
29 // Special Notes :
30 // Creator : Richard Schiek, SNL, Electrical and Microsystem Modeling
31 // Creation Date : 01/24/08
32 //
33 // Revision Information:
34 // ---------------------
35 // Revision Number: $Revision: 1.265 $
36 // Revision Date : $Date: 2015/07/09 21:39:39 $
37 // Current Owner : $Author: dgbaur $
38 //-----------------------------------------------------------------------------
39 
40 #include <Xyce_config.h>
41 
42 // ---------- Standard Includes ----------
43 #include <ctime>
44 #include <iostream>
45 #include <sstream>
46 
47 #include <N_ANP_AnalysisManager.h>
48 
49 #include <N_ANP_DCSweep.h>
50 #include <N_ANP_HB.h>
51 #include <N_ANP_MPDE.h>
52 #include <N_ANP_Step.h>
53 #include <N_ANP_ROL.h>
54 
55 #include <N_ANP_OutputMgrAdapter.h>
56 #include <N_DEV_DeviceMgr.h>
57 #include <N_IO_ActiveOutput.h>
58 #include <N_IO_CmdParse.h>
59 #include <N_IO_OutputMgr.h>
60 #include <N_IO_PkgOptionsMgr.h>
61 #include <N_LAS_LAFactory.h>
62 #include <N_LAS_Matrix.h>
63 #include <N_LAS_System.h>
64 #include <N_LAS_Vector.h>
65 #include <N_LOA_Loader.h>
67 #include <N_NLS_Manager.h>
68 #include <N_TIA_DataStore.h>
70 #include <N_TIA_StepErrorControl.h>
71 #include <N_TIA_TIAParams.h>
73 #include <N_TIA_TwoLevelError.h>
74 #include <N_UTL_BreakPoint.h>
75 #include <N_UTL_Diagnostic.h>
76 #include <N_UTL_ExtendedString.h>
77 #include <N_UTL_FeatureTest.h>
78 #include <N_UTL_OptionBlock.h>
79 #include <N_UTL_Stats.h>
80 #include <N_UTL_Timer.h>
81 
82 namespace Xyce {
83 namespace Analysis {
84 
85 //-----------------------------------------------------------------------------
86 // Function : analysisModeName
87 // Purpose :
88 // Special Notes :
89 // Scope : public
90 // Creator : David G. Baur Raytheon Sandia National Laboratories 1355
91 // Creation Date : Tue Oct 21 11:22:31 2014
92 //-----------------------------------------------------------------------------
93 ///
94 /// Returns a const char pointer to a name representing the mode.
95 ///
96 /// @param mode Analysis mode to get name of
97 ///
98 /// @return Name corresponding to the mode
99 ///
100 ///
101 const char *
103  Mode mode)
104 {
105  static const char * const mode_names[] = {"Invalid", "DC OP", "DC Sweep", "Transient", "MPDE", "HB", "AC", "NOISE", "MOR"};
106 
107  if (mode < sizeof(mode_names)/sizeof(mode_names[0]))
108  return mode_names[mode];
109  else
110  return mode_names[0];
111 }
112 
113 //-----------------------------------------------------------------------------
114 // Function : nonlinearAnalysisMode
115 // Purpose : Convert between Nonlinear::Manager AnalysisMode enum and
116 // : expanded AnalysisManager::Manager::Mode enum.
117 // Special Notes :
118 // Scope :
119 // Creator : Todd Coffey, 1414
120 // Creation Date : 07/23/08
121 //-----------------------------------------------------------------------------
122 ///
123 /// Returns the nonlinear analysis mode given the analysis mode
124 ///
125 /// @param mode Analysis mode
126 ///
127 /// @return Nonlinear analysis mode
128 ///
129 ///
131 {
132  Nonlinear::AnalysisMode outMode;
133  if (mode == ANP_MODE_TRANSIENT)
134  {
135  outMode = Nonlinear::TRANSIENT;
136  }
137  else if (mode == ANP_MODE_DC_OP)
138  {
139  outMode = Nonlinear::DC_OP;
140  }
141  else if (mode == ANP_MODE_DC_SWEEP)
142  {
143  outMode = Nonlinear::DC_SWEEP;
144  }
145  else if (mode == ANP_MODE_DC_NLPOISSON)
146  {
147  outMode = Nonlinear::DC_NLPOISSON;
148  }
149  else if (mode == ANP_MODE_HB)
150  {
151  outMode = Nonlinear::HB_MODE;
152  }
153  // else if (mode == ANP_MODE_ROL) // TT
154  // {
155  // outMode = Nonlinear::ROL;
156  // }
157  else
158  {
159  outMode = Nonlinear::NUM_MODES; // Should be this be TRANSIENT?
160  }
161  return outMode;
162 }
163 
164 //-----------------------------------------------------------------------------
165 // Function : AnalysisManager::AnalysisManager
166 // Purpose : constructor
167 // Special Notes :
168 // Scope : public
169 // Creator : Richard Schiek, SNL, Electrical and Microsystem Modeling
170 // Creation Date : 01/24/08
171 //-----------------------------------------------------------------------------
172 ///
173 /// Constructs the analysis manager. The analysis manager is responsible for the construction and control of the top
174 /// level analysis.
175 ///
176 /// @invariant
177 ///
178 /// @param command_line Command line that started Xyce
179 /// @param restart_manager
180 /// @param output_manager_adapter
181 /// @param analysis_stat Base node of the analysis stats collection
182 ///
183 ///
185  const IO::CmdParse & command_line,
186  OutputMgrAdapter & output_manager_adapter,
187  Stats::Stat analysis_stat)
188  : StepEventNotifier(),
190  StepEventListener(this),
191  AnalysisEventListener(this),
192  commandLine_(command_line),
193  netlistFilename_(command_line.getArgumentValue("netlist")),
194  outputManagerAdapter_(output_manager_adapter),
195  workingIntgMethod_(0),
196  stepErrorControl_(0),
197  nonlinearEquationLoader_(0),
198  parallelManager_(0),
199  dataStore_(0),
200  activeOutput_(0),
201  analysisMode_(ANP_MODE_TRANSIENT),
202  resumeSimulation_(false),
203  blockAnalysisFlag_(false),
204  daeStateDerivFlag_(true),
205  // dcopRestartFlag_(false),
206  // saveFlag_(false),
207  dotOpSpecified_(false),
208  gui_(command_line.argExists("-gui")),
209  progressFlag_(true),
210  saveTimeGiven_(false),
211  savedAlready_(false),
212  sensFlag_(false),
213  sweepSourceResetFlag_(true),
214  switchIntegrator_(false),
215  xyceTranTimerPtr_(),
216  elapsedTimerPtr_(0),
217  solverStartTime_(0.0),
218  // saveTime_(0.0),
219  nextOutputTime_(0.0),
220  // nextRestartSaveTime_(0.0),
221  analysisObject_(0),
222  primaryAnalysisObject_(0),
223  breakPointRestartStep(0),
224  analysisStat_(analysis_stat),
225  twoLevelMode_(TWO_LEVEL_MODE_TRANSIENT_DCOP)
226 {
227  IO::setTimeIntegratorDebugLevel(command_line, 1);
228 }
229 
230 //-----------------------------------------------------------------------------
231 // Function : AnalysisManager::~AnalysisManager
232 //
233 // Purpose : destructor
234 // Special Notes :
235 // Scope : public
236 // Creator : Richard Schiek, SNL, Electrical and Microsystem Modeling
237 // Creation Date : 01/24/08
238 //-----------------------------------------------------------------------------
240 {
242  delete workingIntgMethod_;
243  delete dataStore_;
244  delete stepErrorControl_;
245 
246  for (std::vector<ProcessorBase *>::iterator it = analysisVector_.begin(), end = analysisVector_.end(); it != end; ++it)
247  delete (*it);
248 }
249 
250 Parallel::Machine
252 {
253  return parallelManager_->getPDSComm()->comm();
254 }
255 
256 
257 //-----------------------------------------------------------------------------
258 // Function : AnalysisManager::notify
259 // Purpose :
260 // Special Notes :
261 // Scope : public
262 // Creator : David G. Baur Raytheon Sandia National Laboratories 1355
263 // Creation Date : Mon Jul 14 12:15:30 2014
264 //-----------------------------------------------------------------------------
265 ///
266 /// Notification that there is a StepEvent.
267 ///
268 /// @param step_event information about the event
269 ///
270 void
272  const StepEvent & step_event)
273 {
274  if (step_event.state_ == StepEvent::STEP_STARTED) {
276  }
277 }
278 
279 //-----------------------------------------------------------------------------
280 // Function : AnalysisManager::notify
281 // Purpose :
282 // Special Notes :
283 // Scope : public
284 // Creator : David G. Baur Raytheon Sandia National Laboratories 1355
285 // Creation Date : Mon Jul 14 12:15:30 2014
286 //-----------------------------------------------------------------------------
287 ///
288 /// Notification that there is a AnalysisEvent.
289 ///
290 /// @param time_integrator_event information about the event
291 ///
292 void
294  const AnalysisEvent & analysis_event)
295 {
296 // Xyce::dout() << Dump<AnalysisEvent>(analysis_event) << std::endl;
297 }
298 
299 
300 void
302  const TimeIntg::TIAParams & tia_params,
303  const unsigned int integration_method)
304 {
305  workingIntgMethod_->createTimeIntegMethod(integration_method, tia_params, *stepErrorControl_, *dataStore_);
306 }
307 
308 //-----------------------------------------------------------------------------
309 // Function : AnalysisManager::resetSolverSystem
310 //
311 // Purpose : just like a destructor without the death
312 // Special Notes :
313 // Scope : public
314 // Creator : Todd Coffey, Rich Schiek, Ting Mei
315 // Creation Date : 7/24/08
316 //-----------------------------------------------------------------------------
318 {
319  // dataStore_ is created in initializeAll
320  delete dataStore_;
321  dataStore_ = 0;
322 
323  // stepErrorControl_ is created in initializeAll
324  delete stepErrorControl_;
325  stepErrorControl_ = 0;
326 
327  // workingIntgMethod_ is created in initializeAll
328  delete workingIntgMethod_;
329  workingIntgMethod_ = 0;
330 
331  // Reset step statistics to zero.
333 }
334 
335 //-----------------------------------------------------------------------------
336 // Function : AnalysisManager::isPaused
337 //
338 // Purpose : return the true if the simulation is currently paused
339 //
340 // Special Notes :
341 // Scope : public
342 // Creator : Rich Schiek, SNL, Electrical and Microsystems Simulation
343 // Creation Date : 02/18/2008
344 //-----------------------------------------------------------------------------
346 {
347  return stepErrorControl_->isPauseTime();
348 }
349 
350 //-----------------------------------------------------------------------------
351 // Function : AnalysisManager::initializeSolverSystem
352 // Purpose :
353 // Special Notes :
354 // Scope : public
355 // Creator : David G. Baur Raytheon Sandia National Laboratories 1355
356 // Creation Date : Mon Mar 16 14:06:00 2015
357 //-----------------------------------------------------------------------------
358 ///
359 /// Initializes the solver system. Called on initial analysis assembly and on change of time integrator.
360 ///
361 /// @invariant There be gremlins here. The datas tore, step error control, time integrator (managed by the working
362 /// integrator method) and nonlinear equation loader are destroyed and recreated. Hopefully none of the subordinate
363 /// users of those objects are stll hanging on. The linear system will have much of its information replaced by data
364 /// from the newly created datastore and vice versa.
365 ///
366 ///
367 ///
368 /// @param tia_params Time integrator parameters to construct new time integrator
369 /// @param loader Loader to loader linear system
370 /// @param linear_system Linear system
371 /// @param nonlinear_manager Nonlinear system
372 /// @param device_manager Device Manager
373 ///
374 /// @return true if initialization was successful
375 ///
376 ///
378  const TimeIntg::TIAParams & tia_params,
379  Loader::Loader & loader,
380  Linear::System & linear_system,
381  Nonlinear::Manager & nonlinear_manager,
382  Device::DeviceMgr & device_manager)
383 {
384  Stats::Stat stat(std::string(analysisObject_->getName()), analysisStat_);
385 
386  int solutionSize = linear_system.getSolutionSize();
387  int stateSize = linear_system.getStateSize();
388 
389  // allocate data store class, which will allocate all the vectors.
390  delete dataStore_;
391  delete stepErrorControl_;
392  delete workingIntgMethod_;
394 
395  dataStore_ = new TimeIntg::DataStore(solutionSize, stateSize, tia_params.maxOrder, linear_system, linear_system.builder());
397  stepErrorControl_ = new TimeIntg::StepErrorControl(netlistFilename_, *this, *workingIntgMethod_, tia_params);
398  nonlinearEquationLoader_ = new Loader::NonlinearEquationLoader(*dataStore_, loader, device_manager, *workingIntgMethod_, daeStateDerivFlag_);
399 
400  dataStore_->resetAll(tia_params.absErrorTol, tia_params.relErrorTol);
401 
403  // nextRestartSaveTime_ = stepErrorControl_->initialTime;
404 
405  // register current:
406  linear_system.registerCurrStaVector(&dataStore_->currStatePtr);
407  linear_system.registerCurrSolVector(&dataStore_->currSolutionPtr);
408 
409  // register next:
410  linear_system.registerNextStaVector(&dataStore_->nextStatePtr);
411  linear_system.registerNextSolVector(&dataStore_->nextSolutionPtr);
412 
413  // register last:
414  linear_system.registerLastStaVector(&dataStore_->lastStatePtr);
415  linear_system.registerLastSolVector(&dataStore_->lastSolutionPtr);
416 
417  linear_system.registerFlagSolVector(&dataStore_->flagSolutionPtr);
418 
419  // register temporaries:
420  linear_system.registerTmpSolVector(&dataStore_->tmpSolVectorPtr);
421  linear_system.registerTmpStaVector(&dataStore_->tmpStaVectorPtr);
422  linear_system.registerTmpStaDerivVector(&dataStore_->tmpStaDerivPtr);
423  linear_system.registerTmpStaDivDiffVector(&dataStore_->tmpStaDivDiffPtr);
424 
425  // register next derivatives:
426  linear_system.registerNextSolDerivVector(&dataStore_->nextSolutionDerivPtr);
427  linear_system.registerNextStaDerivVector(&dataStore_->nextStateDerivPtr);
428 
429  // register the device mask
430  linear_system.registerDeviceMaskVector(&dataStore_->deviceErrorWeightMask_);
431 
432  // Get the RHS and the Jacobian
433  dataStore_->JMatrixPtr = linear_system.getJacobianMatrix();
434  dataStore_->RHSVectorPtr = linear_system.getRHSVector();
435 
436  // DAE formulation vectors
437  linear_system.registerDAEQVector(dataStore_->daeQVectorPtr);
438  linear_system.registerDAEFVector(dataStore_->daeFVectorPtr);
439  linear_system.registerDAEBVector(dataStore_->daeBVectorPtr);
440 
441  // DAE formulation matrices
442  linear_system.registerDAEdQdxMatrix(dataStore_->dQdxMatrixPtr);
443  linear_system.registerDAEdFdxMatrix(dataStore_->dFdxMatrixPtr);
444 
445  // Get the limiter vectors
446  dataStore_->dFdxdVpVectorPtr = linear_system.getdFdxdVpVector();
447  dataStore_->dQdxdVpVectorPtr = linear_system.getdQdxdVpVector();
448 
450 
451  return true;
452 }
453 
454 //-----------------------------------------------------------------------------
455 // Function : AnalysisManager::getBlockAnalysisFlag
456 // Purpose :
457 // Special Notes :
458 // Scope : public
459 // Creator : David G. Baur Raytheon Sandia National Laboratories 1355
460 // Creation Date : Mon Mar 16 14:12:17 2015
461 //-----------------------------------------------------------------------------
462 ///
463 /// Return true if primary analysis is HB or MPDE.
464 ///
465 ///
466 /// @return true if primary analysis is HB or MPDE.
467 ///
468 ///
469 bool
471 {
472  return dynamic_cast<Analysis::HB *>(primaryAnalysisObject_) || dynamic_cast<Analysis::MPDE *>(primaryAnalysisObject_);
473 }
474 
475 //-----------------------------------------------------------------------------
476 // Function : AnalysisManager::run
477 // Purpose : Execute the control loop for the set analysis type.
478 // Special Notes :
479 // Scope : public
480 // Creator : Richard Schiek, SNL, Electrical and Microsystem Modeling
481 // Creation Date : 01/24/08
482 //-----------------------------------------------------------------------------
483 ///
484 /// Runs the top level analysis.
485 ///
486 /// @invariant
487 ///
488 ///
489 /// @return
490 ///
491 ///
492 bool
494 {
495  Stats::StatTop _analysisStat("Analysis");
496  Stats::TimeBlock _analysisTimer(_analysisStat);
497 
499  {
500  Report::UserError0() << "No analysis statement in the netlist";
501  return false;
502  }
503 
504  bool runStatus = false;
505  {
506  // This prepares the outputters for this analysis mode
507  IO::ActiveOutput active(outputManagerAdapter_.getOutputManager());
508 
509  active.setStepSweepVector(outputManagerAdapter_.getStepSweepVector());
510  active.setDCSweepVector(outputManagerAdapter_.getDCSweepVector());
511  active.add(parallelManager_->getPDSComm()->comm(), analysisMode_);
512 
513  if (VERBOSE_TIME)
515 
517 
518  Report::safeBarrier(parallelManager_->getPDSComm()->comm());
519 
520  solverStartTime_ = elapsedTimerPtr_->elapsedTime();
521 
522  // Start the solvers timers.
523  xyceTranTimerPtr_.resetStartTime();
524 
525  runStatus = analysisObject_->run();
526  }
527 
528  return runStatus;
529 }
530 
531 //-----------------------------------------------------------------------------
532 // Function : AnalysisManager::allocateAnalysisObject
533 // Purpose : Allocate analysis objects, and also setup params.
534 // Special Notes :
535 // Scope : private
536 // Creator : Eric Keiter, SNL
537 // Creation Date : 06/24/10
538 //-----------------------------------------------------------------------------
539 ///
540 /// Creates the primary analysis and driving analysis (.STEP, dakota).
541 ///
542 /// If no analysis was specified and .OP was specified, create a DC analysis as the primary analysis
543 ///
544 /// @invariant
545 ///
546 ///
547 void
549  AnalysisCreatorRegistry & analysis_registry)
550 {
551  // .OP, but no analysis creates a dcsweep analysis.
552  if (dotOpSpecified_ && (analysisCreatorVector_.empty() || (analysisCreatorVector_.size() == 1 && analysisCreatorVector_.front()->isType<Step>())))
553  {
554  for (CreatorVector::const_iterator it = analysis_registry.begin(), end = analysis_registry.end(); it != end; ++it)
555  {
556  if ((*it)->isType<DCSweep>())
557  {
559  primaryAnalysisObject_ = (*it)->create();
561  }
562  }
563  }
564 
565  // CRAZY HACK UNTIL PRIORITY QUEUE OR SOMETHING CLEVER ON ANALYSIS TYPES
566  for (CreatorVector::const_iterator it = analysisCreatorVector_.begin(), end = analysisCreatorVector_.end(); it != end; ++it)
567  {
568  if (!(*it)->isType<Step>())
569  {
570  primaryAnalysisObject_ = (*it)->create();
572  }
573  }
574  for (CreatorVector::const_iterator it = analysisCreatorVector_.begin(), end = analysisCreatorVector_.end(); it != end; ++it)
575  {
576  if ((*it)->isType<Step>())
577  {
578  analysisObject_ = (*it)->create();
579  analysisVector_.push_back(analysisObject_);
581  }
582  }
583 
584 #ifdef Xyce_ROL
585  // ANOTHER CRAZY HACK UNTIL PRIORITY QUEUE OR SOMETHING CLEVER ON ANALYSIS TYPES
586  for (CreatorVector::const_iterator it = analysisCreatorVector_.begin(), end = analysisCreatorVector_.end(); it != end; ++it)
587  {
588  if (!(*it)->isType<ROL>()) // TT: this part is probably not even needed
589  {
590  primaryAnalysisObject_ = (*it)->create();
592  }
593  }
594  for (CreatorVector::const_iterator it = analysisCreatorVector_.begin(), end = analysisCreatorVector_.end(); it != end; ++it)
595  {
596  if ((*it)->isType<ROL>())
597  {
598  primaryAnalysisObject_ = (*it)->create(); // TT: We want ROL analysis to by primary analysis (unlike STEP), hence call it primaryAnalysisObject
600  //pushActiveAnalysis(primaryAnalysisObject_);
601  }
602  }
603 #endif
604 
605  for (CreatorSet::const_iterator it = processorCreatorSet_.begin(), end = processorCreatorSet_.end(); it != end; ++it)
606  {
607  analysisVector_.push_back((*it)->create());
608  }
609 
611  {
612  Report::UserError() << "Analysis mode " << analysisMode_ << " is not available";
613  return;
614  }
615 
617 
618  if (!analysisObject_)
619  {
621  }
622 }
623 
624 //-----------------------------------------------------------------------------
625 // Function : AnalysisManager::printLoopInfo
626 // Purpose : Prints out time loop information.
627 // Special Notes : Prints stats from save point start to save point finish.
628 // Special case 0,0 is entire run to this point
629 // Scope : public
630 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
631 // Creation Date : 6/26/00
632 //-----------------------------------------------------------------------------
633 bool AnalysisManager::printLoopInfo(int start, int finish)
634 {
635  return primaryAnalysisObject_->printLoopInfo(start, finish);
636 }
637 
638 //-----------------------------------------------------------------------------
639 // Function : AnalysisManager::setOPAnalysisParams
640 // Purpose : Handle OP statement. (.OP)
641 // Special Notes :
642 // Scope : public
643 // Creator : Eric R. Keiter, SNL, Parallel Computational Sciences
644 // Creation Date : 10/15/07
645 //-----------------------------------------------------------------------------
647  const Util::OptionBlock & paramsBlock)
648 {
649  dotOpSpecified_ = true;
650 
651  return true;
652 }
653 
654 //-----------------------------------------------------------------------------
655 // Function : AnalysisManager::setSensOptions
656 // Purpose :
657 // Special Notes :
658 // Scope : public
659 // Creator : Eric Keiter, Sandia
660 // Creation Date : 6/5/13
661 //-----------------------------------------------------------------------------
662 bool AnalysisManager::setSensOptions(const Util::OptionBlock & OB)
663 {
664  sensFlag_ = true;
665  return true;
666 }
667 
668 //-----------------------------------------------------------------------------
669 // Function : AnalysisManager::completeOPStartStep
670 // Purpose : Call to rotate next state to current state following a
671 // : constrained DCOP solve when using a previous operating point
672 // Special Notes : Called from the Xyce-LOCA interface.
673 // Scope : public
674 // Creator : Dave Shirley
675 // Creation Date : 06/27/2006
676 //-----------------------------------------------------------------------------
678 {
679  bool bsuccess = true;
680 
681  bsuccess = dataStore_->updateStateDataArrays ();
682 
685 
686  return bsuccess;
687 }
688 
689 //-----------------------------------------------------------------------------
690 // Function : AnalysisManager::completeHomotopyStep
691 // Purpose : Call to do final cleanup after a single,
692 // successful homotopy step.
693 // Special Notes : Called from the Xyce-LOCA interface.
694 // Scope : public
695 // Creator : Eric Keiter, SNL
696 // Creation Date : 03/20/2006
697 //-----------------------------------------------------------------------------
700  const std::vector<std::string> & paramNames,
701  const std::vector<double> & paramVals,
702  Linear::Vector * solnVecPtr )
703 {
704  bool bsuccess = true;
705 
706  if (DEBUG_ANALYSIS)
707  Xyce::dout() << "\n " << netlistFilename_
708  << " AnalysisManager::completeHomotopyStep " << std::endl;
709 
710  // Rotate the data vectors:
711  bool bs1 = dataStore_->updateStateDataArrays ();
712  bsuccess = bsuccess && bs1;
715 
716  // Pass info in to the lower level solver:
717  loader.homotopyStepSuccess(paramNames,paramVals);
718 
719  // Call output
720  outputManagerAdapter_.outputHomotopy( paramNames, paramVals, *solnVecPtr );
721 
722  return bsuccess;
723 }
724 
725 //-----------------------------------------------------------------------------
726 // Function : AnalysisManager::failHomotopyStep
727 // Purpose : Call to do final cleanup after a single,
728 // failed homotopy step.
729 // Special Notes : Called from the Xyce-LOCA interface.
730 // Scope : public
731 // Creator : Eric Keiter, SNL
732 // Creation Date : 03/30/2006
733 //-----------------------------------------------------------------------------
735 {
736  if (DEBUG_ANALYSIS)
737  Xyce::dout() << "\n " << netlistFilename_
738  << " AnalysisManager::failHomotopyStep " << std::endl;
739 
740 // Pass info in to the lower level solver:
741  loader.homotopyStepFailure();
742 
743  return true;
744 }
745 
746 // ***** Accessor methods *****
747 //-----------------------------------------------------------------------------
748 // Function : AnalysisManager::setBeginningIntegrationFlag
749 // Purpose :
750 // Special Notes :
751 // Scope : public
752 // Creator : Eric R. Keiter, SNL
753 // Creation Date :
754 //-----------------------------------------------------------------------------
756 {
757  currentAnalysisStack_.back()->setBeginningIntegrationFlag(bif);
759 }
760 
761 //-----------------------------------------------------------------------------
762 // Function : AnalysisManager::getBeginningIntegrationFlag
763 // Purpose :
764 // Special Notes :
765 // Scope : public
766 // Creator : Eric R. Keiter, SNL
767 // Creation Date :
768 //-----------------------------------------------------------------------------
770 {
771  return currentAnalysisStack_.back()->getBeginningIntegrationFlag();
772 // return primaryAnalysisObject_->getBeginningIntegrationFlag();
773 }
774 
775 //-----------------------------------------------------------------------------
776 // Function : AnalysisManager::setIntegrationMethod
777 // Purpose :
778 // Special Notes :
779 // Scope : public
780 // Creator : Eric R. Keiter, SNL
781 // Creation Date :
782 //-----------------------------------------------------------------------------
784 {
785  currentAnalysisStack_.back()->setIntegrationMethod(im);
786 }
787 
788 //-----------------------------------------------------------------------------
789 // Function : AnalysisManager::getIntegrationMethod
790 // Purpose :
791 // Special Notes :
792 // Scope : public
793 // Creator : Eric R. Keiter, SNL
794 // Creation Date :
795 //-----------------------------------------------------------------------------
797 {
798  return currentAnalysisStack_.back()->getIntegrationMethod();
799 }
800 
801 
802 //-----------------------------------------------------------------------------
803 // Function : AnalysisManager::getTotalLinearSolutionTime
804 // Purpose :
805 // Special Notes :
806 // Scope : public
807 // Creator : Eric R. Keiter, SNL
808 // Creation Date :
809 //-----------------------------------------------------------------------------
811 {
813 }
814 
815 //-----------------------------------------------------------------------------
816 // Function : AnalysisManager::getTotalResidualLoadTime
817 // Purpose :
818 // Special Notes :
819 // Scope : public
820 // Creator : Eric R. Keiter, SNL
821 // Creation Date :
822 //-----------------------------------------------------------------------------
824 {
826 }
827 
828 //-----------------------------------------------------------------------------
829 // Function : AnalysisManager::getTotalJacobianLoadTime
830 // Purpose :
831 // Special Notes :
832 // Scope : public
833 // Creator : Eric R. Keiter, SNL
834 // Creation Date :
835 //-----------------------------------------------------------------------------
837 {
839 }
840 
841 //-----------------------------------------------------------------------------
842 // Function : AnalysisManager::getDoubleDCOPEnabled ()
843 // Purpose :
844 // Special Notes :
845 // Scope : public
846 // Creator :
847 // Creation Date :
848 //-----------------------------------------------------------------------------
850 {
852 }
853 
854 //-----------------------------------------------------------------------------
855 // Function : AnalysisManager::isSimulationComplete
856 // Purpose : return boolean signifying whether simulation complete or
857 // not.
858 //
859 // Special Notes :THIS VERSION IS ONLY VALID FOR TRANSIENT RUNS, where
860 // completion of the simulation means integration to final
861 // time.
862 // Scope : public
863 // Creator : Tom Russo, SNL, Component Information and Models
864 // Creation Date : 05/06/2004
865 //-----------------------------------------------------------------------------
867 {
869  {
870  return stepErrorControl_->isFinished();
871  }
872  else
873  {
874  Report::DevelFatal0().in("AnalysisManager::simulationComplete")
875  << "Called for non-transient run, not currently valid";
876  return false;
877  }
878 }
879 
880 //-----------------------------------------------------------------------------
881 // Function : AnalysisManager::getPauseTime
882 //
883 // Purpose : return the time at which the simulation will pause
884 //
885 // Special Notes :
886 // Scope : public
887 // Creator : Tom Russo, SNL, Component Information and Models
888 // Creation Date : 04/29/2004
889 //-----------------------------------------------------------------------------
891 {
893 }
894 
895 //-----------------------------------------------------------------------------
896 // Function : AnalysisManager::getStepNumber
897 // Purpose :
898 // Special Notes :
899 // Scope : public
900 // Creator :
901 // Creation Date : 12/16/2010
902 //-----------------------------------------------------------------------------
904 {
905 
906  if (!currentAnalysisStack_.empty()){
907  return currentAnalysisStack_.back()->getStepNumber();
908  }
909 
910  return 0;
911 }
912 
913 //-----------------------------------------------------------------------------
914 // Function : AnalysisManager::setStepNumber
915 // Purpose :
916 // Special Notes :
917 // Scope : public
918 // Creator :
919 // Creation Date : 12/16/2010
920 //-----------------------------------------------------------------------------
922 {
925  }
926 
927 }
928 
929 //-----------------------------------------------------------------------------
930 // Function : AnalysisManager::getTranStepNumber
931 // Purpose :
932 // Special Notes :
933 // Scope : public
934 // Creator :
935 // Creation Date : 12/16/2010
936 //-----------------------------------------------------------------------------
938 {
939  int number = 0;
940 
943 
944  return number;
945 }
946 
947 //-----------------------------------------------------------------------------
948 // Function : AnalysisManager::setTranStepNumber
949 // Purpose :
950 // Special Notes :
951 // Scope : public
952 // Creator :
953 // Creation Date : 12/16/2010
954 //-----------------------------------------------------------------------------
956 {
959 }
960 
961 
962 //-----------------------------------------------------------------------------
963 // Function : AnalysisManager::getInitTranFlag
964 // Purpose :
965 // Special Notes :
966 // Scope : public
967 // Creator :
968 // Creation Date : 12/16/2010
969 //-----------------------------------------------------------------------------
971 {
972  return getStepNumber() <= 0;
973 }
974 
975 //-----------------------------------------------------------------------------
976 // Function : AnalysisManager::getTime
977 // Purpose : Gets the next time value.
978 // Special Notes :
979 // Scope : public
980 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
981 // Creation Date : 6/27/00
982 //-----------------------------------------------------------------------------
984 {
985  return stepErrorControl_->nextTime;
986 }
987 
988 //-----------------------------------------------------------------------------
989 // Function : AnalysisManager::getFinalTime
990 // Purpose : Gets the final time-step value.
991 // Special Notes :
992 // Scope : public
993 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
994 // Creation Date : 6/27/00
995 //-----------------------------------------------------------------------------
997 {
999 }
1000 
1001 //-----------------------------------------------------------------------------
1002 // Function : AnalysisManager::getInitialTime
1003 // Purpose : Gets the initial time-step value.
1004 // Special Notes :
1005 // Scope : public
1006 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
1007 // Creation Date : 6/27/00
1008 //-----------------------------------------------------------------------------
1010 {
1012 }
1013 
1014 //-----------------------------------------------------------------------------
1015 // Function : AnalysisManager::getDCOPFlag
1016 // Purpose : Gets a flag indicating we are in steady state.
1017 // (steady=true)
1018 // Special Notes :
1019 // Scope : public
1020 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
1021 // Creation Date : 03/02/01
1022 //-----------------------------------------------------------------------------
1024 {
1026 }
1027 
1028 //-----------------------------------------------------------------------------
1029 // Function : AnalysisManager::getTranOPFlag
1030 // Purpose : Gets a flag indicating we are in a DCOP calculation that is
1031 // the initialization for a transient simulation.
1032 // Special Notes :
1033 // Scope : public
1034 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
1035 // Creation Date : 02/28/05
1036 //-----------------------------------------------------------------------------
1038 {
1041 }
1042 
1043 //-----------------------------------------------------------------------------
1044 // Function : AnalysisManager::getACOPFlag
1045 // Purpose : Gets a flag indicating we are in a DCOP calculation that is
1046 // the initialization for a AC simulation.
1047 // Special Notes :
1048 // Scope : public
1049 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
1050 // Creation Date : 04/16/12
1051 //-----------------------------------------------------------------------------
1053 {
1056 
1057  // if the analysis type is noise, this flag must also be set, as it is based on an
1058  // AC-style calculation.
1061 
1062  return (return1 || return2);
1063 }
1064 
1065 //-----------------------------------------------------------------------------
1066 // Function : AnalysisManager::getDCSweepFlag
1067 // Purpose :
1068 // Special Notes :
1069 // Scope : public
1070 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
1071 // Creation Date : 02/28/05
1072 //-----------------------------------------------------------------------------
1074 {
1076 }
1077 
1078 //-----------------------------------------------------------------------------
1079 // Function : AnalysisManager::getTransientFlag
1080 // Purpose :
1081 // Special Notes :
1082 // Scope : public
1083 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
1084 // Creation Date : 02/28/05
1085 //-----------------------------------------------------------------------------
1087 {
1090 }
1091 
1092 //-----------------------------------------------------------------------------
1093 // Function : AnalysisManager::getDoubleDCOPStep
1094 // Purpose : Gets the double DC Operating Point step value.
1095 // Special Notes :
1096 // Scope : public
1097 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
1098 // Creation Date : 04/25/01
1099 //-----------------------------------------------------------------------------
1101 {
1103 }
1104 
1105 //-----------------------------------------------------------------------------
1106 // Function : AnalysisManager::updateDerivs
1107 // Purpose : Calls the time int. method to update the corrector
1108 // derivatives.
1109 // Special Notes :
1110 // Scope : public
1111 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
1112 // Creation Date : 6/13/00
1113 //-----------------------------------------------------------------------------
1115 {
1117 
1118  return true;
1119 }
1120 
1121 //-----------------------------------------------------------------------------
1122 // Function : AnalysisManager::updateDivDiffs
1123 // Purpose : Updates the divided difference values.
1124 // Special Notes :
1125 // Scope : public
1126 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
1127 // Creation Date : 6/27/00
1128 //-----------------------------------------------------------------------------
1130 {
1132 
1133  return true;
1134 }
1135 
1136 //-----------------------------------------------------------------------------
1137 // Function : AnalysisManager::updateDerivsBlock
1138 // Purpose :
1139 // Special Notes :
1140 // Scope : public
1141 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
1142 // Creation Date : 01/10/01
1143 //-----------------------------------------------------------------------------
1145  const std::list<IndexPair> & solGIDList,
1146  const std::list<IndexPair> & staGIDList)
1147 {
1148  dataStore_->computeDivDiffsBlock(solGIDList, staGIDList);
1149  workingIntgMethod_->updateDerivsBlock (solGIDList, staGIDList);
1150 
1151  return true;
1152 }
1153 
1154 //-----------------------------------------------------------------------------
1155 // Function : AnalysisManager::registerElapsedTimer
1156 // Purpose :
1157 // Special Notes :
1158 // Scope : public
1159 // Creator : Dave Shirley, PSSI
1160 // Creation Date : 02/24/06
1161 //-----------------------------------------------------------------------------
1163 {
1164  elapsedTimerPtr_ = et;
1165 
1166  return true;
1167 }
1168 
1169 //-----------------------------------------------------------------------------
1170 // Function : AnalysisManager::getRestartDataSize
1171 // Purpose :
1172 // Special Notes :
1173 // Scope : public
1174 // Creator : Rob Hoekstra, SNL, Computational Sciences
1175 // Creation Date : 07/31/01
1176 //-----------------------------------------------------------------------------
1178 {
1179  return stepErrorControl_->getRestartDataSize( pack );
1180 }
1181 
1182 //-----------------------------------------------------------------------------
1183 // Function : AnalysisManager::dumpRestartData
1184 // Purpose :
1185 // Special Notes :
1186 // Scope : public
1187 // Creator : Rob Hoekstra, SNL, Computational Sciences
1188 // Creation Date : 07/31/01
1189 //-----------------------------------------------------------------------------
1191  char * buf,
1192  int bsize,
1193  int & pos,
1194  Parallel::Communicator * comm,
1195  bool pack)
1196 {
1197  return stepErrorControl_->dumpRestartData(buf, bsize, pos, comm, pack);
1198 }
1199 
1200 //-----------------------------------------------------------------------------
1201 // Function : AnalysisManager::restoreRestartData
1202 // Purpose :
1203 // Special Notes :
1204 // Scope : public
1205 // Creator : Rob Hoekstra, SNL, Computational Sciences
1206 // Creation Date : 07/31/01
1207 //-----------------------------------------------------------------------------
1208 bool
1210  char * buf,
1211  int bsize,
1212  int & pos,
1213  Parallel::Communicator * comm,
1214  bool pack)
1215 {
1216  return stepErrorControl_->restoreRestartData(buf, bsize, pos, comm, pack, getTIAParams().initialTime);
1217 }
1218 
1219 //-----------------------------------------------------------------------------
1220 // Function : AnalysisManager::getSolnVarData
1221 // Purpose :
1222 // Special Notes :
1223 // Scope : public
1224 // Creator : Rob Hoekstra, SNL, Computational Sciences
1225 // Creation Date : 07/31/01
1226 //-----------------------------------------------------------------------------
1227 bool AnalysisManager::getSolnVarData( const int & gid,
1228  std::vector<double> & varData ) const
1229 {
1230  return dataStore_->getSolnVarData( gid, varData );
1231 }
1232 
1233 //-----------------------------------------------------------------------------
1234 // Function : AnalysisManager::getStateVarData
1235 // Purpose :
1236 // Special Notes :
1237 // Scope : public
1238 // Creator : Rob Hoekstra, SNL, Computational Sciences
1239 // Creation Date : 07/31/01
1240 //-----------------------------------------------------------------------------
1241 bool
1243  const int & gid,
1244  std::vector<double> & varData ) const
1245 {
1246  return dataStore_->getStateVarData( gid, varData );
1247 }
1248 
1249 //-----------------------------------------------------------------------------
1250 // Function : AnalysisManager::getStoreVarData
1251 // Purpose :
1252 // Special Notes :
1253 // Scope : public
1254 // Creator : Eric Keiter
1255 // Creation Date :
1256 //-----------------------------------------------------------------------------
1257 bool AnalysisManager::getStoreVarData( const int & gid,
1258  std::vector<double> & varData ) const
1259 {
1260  return dataStore_->getStoreVarData( gid, varData );
1261 }
1262 //-----------------------------------------------------------------------------
1263 // Function : AnalysisManager::setSolnVarData
1264 // Purpose :
1265 // Special Notes :
1266 // Scope : public
1267 // Creator : Rob Hoekstra, SNL, Computational Sciences
1268 // Creation Date : 07/31/01
1269 //-----------------------------------------------------------------------------
1270 bool AnalysisManager::setSolnVarData( const int & gid,
1271  const std::vector<double> & varData )
1272 {
1273  return dataStore_->setSolnVarData( gid, varData );
1274 }
1275 
1276 //-----------------------------------------------------------------------------
1277 // Function : AnalysisManager::setStateVarData
1278 // Purpose :
1279 // Special Notes :
1280 // Scope : public
1281 // Creator : Rob Hoekstra, SNL, Computational Sciences
1282 // Creation Date : 07/31/01
1283 //-----------------------------------------------------------------------------
1284 bool AnalysisManager::setStateVarData( const int & gid,
1285  const std::vector<double> & varData )
1286 {
1287  return dataStore_->setStateVarData( gid, varData );
1288 }
1289 
1290 //-----------------------------------------------------------------------------
1291 // Function : AnalysisManager::setStoreVarData
1292 // Purpose :
1293 // Special Notes :
1294 // Scope : public
1295 // Creator : Eric Keiter
1296 // Creation Date :
1297 //-----------------------------------------------------------------------------
1298 bool AnalysisManager::setStoreVarData( const int & gid,
1299  const std::vector<double> & varData )
1300 {
1301  return dataStore_->setStoreVarData( gid, varData );
1302 }
1303 
1304 
1305 const TimeIntg::TIAParams &
1307 {
1309 }
1310 
1313 {
1315 }
1316 
1317 //-----------------------------------------------------------------------------
1318 // Function : AnalysisManager::registerParallelServices
1319 // Purpose :
1320 // Special Notes :
1321 // Scope : public
1322 // Creator : Eric R. Keiter, SNL, Parallel Computational Sciences
1323 // Creation Date : 04/19/02
1324 //-----------------------------------------------------------------------------
1326 {
1327  parallelManager_ = pds;
1328 
1329  return true;
1330 }
1331 
1332 //-----------------------------------------------------------------------------
1333 // Function : AnalysisManager::setNextSolVectorPtr
1334 // Purpose :
1335 // Special Notes :
1336 // Scope : public
1337 // Creator : Eric R. Keiter,SNL, Computational Sciences
1338 // Creation Date : 04/22/2003
1339 //-----------------------------------------------------------------------------
1340 bool AnalysisManager::setNextSolVectorPtr (Linear::Vector * solVecPtr)
1341 {
1342  return dataStore_->setNextSolVectorPtr (solVecPtr);
1343 }
1344 
1345 //-----------------------------------------------------------------------------
1346 // Function : AnalysisManager::setPauseTime
1347 //
1348 // Purpose : Set the time at which to pause the simulation
1349 //
1350 // Special Notes : This is a temporary implementation that I'm using to
1351 // begin the process of hiding time integrator internals from
1352 // the "N_CIR_Xyce::simulateUntil" method, so that I can
1353 // ultimately change those internals without the simulateUntil
1354 // method
1355 // Scope : public
1356 // Creator : Tom Russo, SNL, Component Information and Models
1357 // Creation Date : 04/29/2004
1358 //-----------------------------------------------------------------------------
1359 void
1361  double pause_time,
1362  double initial_time)
1363 {
1364  stepErrorControl_->setBreakPoint(Util::BreakPoint(pause_time, Util::BreakPoint::PAUSE), initial_time);
1365 }
1366 
1367 DCOPType
1369 {
1370  if (!getDoubleDCOPEnabled())
1371  return OFF;
1372  else if (getAnalysisObject().getIntegrationMethod() == 0 && getDoubleDCOPStep() == 0)
1373  return NL_POISSON;
1374  else
1375  return DRIFT_DIFFUSION;
1376 
1377  // if (!getDoubleDCOPEnabled())
1378  // return OFF;
1379  // else if (getDoubleDCOPStep() == 0)
1380  // return NL_POISSON;
1381  // else
1382  // return DRIFT_DIFFUSION;
1383 }
1384 
1385 //-----------------------------------------------------------------------------
1386 // Function : AnalysisManager::registerPkgOptionsMgr
1387 // Purpose :
1388 // Special Notes :
1389 // Scope : public
1390 // Creator : Rich Schiek, 1437
1391 // Creation Date : 10/21/08
1392 //-----------------------------------------------------------------------------
1393 bool registerPkgOptionsMgr(AnalysisManager &analysis_manager, IO::PkgOptionsMgr &options_manager)
1394 {
1395  options_manager.addCommandProcessor("OP", IO::createRegistrationOptions(analysis_manager, &AnalysisManager::setOPAnalysisParams));
1396  options_manager.addCommandProcessor("SENS", IO::createRegistrationOptions(analysis_manager, &AnalysisManager::setSensOptions));
1397 
1398  return true;
1399 }
1400 
1401 } // namespace Analysis
1402 } // namespace Xyce
bool setNextSolVectorPtr(Linear::Vector *solVecPtr)
Linear::Vector * lastSolutionPtr
void allocateAnalysisObject(AnalysisCreatorRegistry &analysis_registry)
Creates the primary analysis and driving analysis (.STEP, dakota).
virtual const TimeIntg::TIAParams & getTIAParams() const =0
const char * analysisModeName(Mode mode)
Returns the name of the analysis mode given by mode.
bool run()
Runs the top level analysis.
void notify(const StepEvent &step_event)
Notification that there is a StepEvent.
Registry::const_iterator begin() const
bool getStateVarData(const int &gid, std::vector< double > &varData) const
bool dumpRestartData(char *buf, int bsize, int &pos, N_PDS_Comm *comm, bool pack)
const std::string netlistFilename_
Netlist file name.
Util::ListenerAutoSubscribe< AnalysisEvent > AnalysisEventListener
TimeIntg::DataStore * dataStore_
Data store object.
Pure virtual class to augment a linear system.
Linear::Vector * nextSolutionDerivPtr
bool dumpRestartData(char *buf, int bsize, int &pos, Parallel::Communicator *comm, bool pack)
Registry::const_iterator end() const
bool resetAll(double absolute_error_tolerance, double relative_error_tolerance)
void pushActiveAnalysis(AnalysisBase *analysis)
double getTotalLinearSolutionTime() const
Linear::Vector * tmpStaVectorPtr
void updateDerivsBlock(const std::list< IndexPair > &solGIDList, const std::list< IndexPair > &staGIDList)
const Analysis::SweepVector & getDCSweepVector() const
Linear::Vector * lastStatePtr
Linear::Vector * tmpSolVectorPtr
void setBeginningIntegrationFlag(bool bif)
void createTimeIntegratorMethod(const TimeIntg::TIAParams &tia_params, const unsigned int integration_method)
virtual int getDoubleDCOPStep() const
void outputHomotopy(const std::vector< std::string > &paramNames, const std::vector< double > &paramVals, Linear::Vector &solnVecPtr)
const AnalysisBase & getAnalysisObject() const
std::vector< AnalysisBase * > currentAnalysisStack_
Util::ListenerAutoSubscribe< StepEvent > StepEventListener
Parallel::Machine getComm() const
Linear::Vector * currStatePtr
virtual bool isAnalysis(int analysis_type) const
TimeIntg::StepErrorControl * stepErrorControl_
Pointer to the TIA step-error control object.
Linear::Vector * daeQVectorPtr
Util::Timer * elapsedTimerPtr_
Xyce timing utility for timing the transient simulation CPU time.
bool registerParallelServices(Parallel::Manager *pds_tmp)
std::vector< ProcessorBase * > analysisVector_
Linear::Vector * tmpStaDerivPtr
bool restoreRestartData(char *buf, int bsize, int &pos, Parallel::Communicator *comm, bool pack)
Linear::Vector * deviceErrorWeightMask_
TimeIntg::WorkingIntegrationMethod * workingIntgMethod_
Working integration method.
bool initializeSolverSystem(const TimeIntg::TIAParams &tia_params, Loader::Loader &loader, Linear::System &linear_system, Nonlinear::Manager &nonlinear_manager, Device::DeviceMgr &device_manager)
Initializes the solver system.
bool restoreRestartData(char *buf, int bsize, int &pos, N_PDS_Comm *comm, bool pack, double &initial_time)
bool getSolnVarData(const int &gid, std::vector< double > &varData) const
Linear::Vector * daeFVectorPtr
Util::Notifier< StepEvent > StepEventNotifier
bool daeStateDerivFlag_
.OPTIONS TIMEINT DAESTATEDERIV=
bool setStoreVarData(const int &gid, const std::vector< double > &varData)
virtual bool getDCOPFlag() const =0
void setPauseTime(double pauseTime, double initial_time)
bool getStateVarData(const int &gid, std::vector< double > &varData)
bool getStoreVarData(const int &gid, std::vector< double > &varData) const
Nonlinear::AnalysisMode nonlinearAnalysisMode(Mode mode)
Returns the nonlinear analysis mode given the analysis mode.
bool setStateVarData(const int &gid, const std::vector< double > &varData)
void setBreakPoint(const Util::BreakPoint &breakpoint, double initial_time)
AnalysisBase * analysisObject_
.STEP, Dakota
Linear::Matrix * dFdxMatrixPtr
double getTotalJacobianLoadTime() const
Linear::Matrix * JMatrixPtr
void printParams(std::ostream &os, int analysis) const
virtual bool loadDeviceErrorWeightMask(Linear::Vector *deviceMask) const
Definition: N_LOA_Loader.h:151
Linear::Vector * nextStatePtr
Util::Notifier< AnalysisEvent > AnalysisEventNotifier
virtual bool printLoopInfo(int start, int finish)
Linear::Vector * dFdxdVpVectorPtr
bool setSolnVarData(const int &gid, const std::vector< double > &varData)
void homotopyStepSuccess(const std::vector< std::string > &paramNames, const std::vector< double > &paramVals)
double pauseTime
Time step value at which to "pause" the simulation.
const TimeIntg::TIAParams & getTIAParams() const
bool setOPAnalysisParams(const Util::OptionBlock &paramsBlock)
bool getSolnVarData(const int &gid, std::vector< double > &varData)
bool setSolnVarData(const int &gid, const std::vector< double > &varData)
Linear::Vector * tmpStaDivDiffPtr
Loader::NonlinearEquationLoader * nonlinearEquationLoader_
Pointer to the nonlinear equation loader.
bool updateDerivsBlock(const std::list< IndexPair > &solGIDList, const std::list< IndexPair > &staGIDList)
bool setSensOptions(const Util::OptionBlock &OB)
Linear::Vector * nextSolutionPtr
Linear::Vector * RHSVectorPtr
void createTimeIntegMethod(int type, const TIAParams &tia_params, StepErrorControl &step_error_control, DataStore &data_store)
double getTotalResidualLoadTime() const
OutputMgrAdapter & outputManagerAdapter_
Output manager adapter.
bool setStateVarData(const int &gid, const std::vector< double > &varData)
Linear::Vector * dQdxdVpVectorPtr
AnalysisManager(const IO::CmdParse &command_line, OutputMgrAdapter &output_manager_adapter, Stats::Stat analysis_stat)
Constructs the analysis manager.
bool completeHomotopyStep(Loader::NonlinearEquationLoader &loader, const std::vector< std::string > &paramNames, const std::vector< double > &paramVals, Linear::Vector *solnVecPtr)
virtual bool getLimiterFlag()
Definition: N_LOA_Loader.h:249
bool failHomotopyStep(Loader::NonlinearEquationLoader &loader)
double solverStartTime_
Xyce timing utility for timing elapsed run time.
bool setNextSolVectorPtr(Linear::Vector *solVecPtr)
Linear::Vector * currSolutionPtr
const Analysis::SweepVector & getStepSweepVector() const
bool getBlockAnalysisFlag() const
Return true if primary analysis is HB or MPDE.
bool setStoreVarData(const int &gid, const std::vector< double > &varData)
Linear::Vector * nextStateDerivPtr
bool registerPkgOptionsMgr(AnalysisManager &analysis_manager, IO::PkgOptionsMgr &options_manager)
bool getStoreVarData(const int &gid, std::vector< double > &varData)
Parallel::Manager * parallelManager_
Pointer to the parallel services manager.
Linear::Matrix * dQdxMatrixPtr
AnalysisBase * primaryAnalysisObject_
.TRAN, .AC, .HB, ...
Linear::Vector * flagSolutionPtr
const char * getName() const
Linear::Vector * daeBVectorPtr
bool printLoopInfo(int start, int finish)
void computeDivDiffsBlock(const std::list< IndexPair > &solGIDList, const std::list< IndexPair > &staGIDList)