Xyce  6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
N_ANP_InnerLevelSolve.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-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_InnerLevelSolve.C,v $
27 // Purpose : This file contains functions from control-algorithm that are
28 // used by the inner solve of a 2-level xyce-to-xyce solve.
29 // Special Notes :
30 // Creator : Eric Keiter
31 // Creation Date : 1/23/08
32 //
33 // Revision Information:
34 // ---------------------
35 // Revision Number: $Revision: 1.65.2.2 $
36 // Revision Date : $Date: 2014/08/26 22:31:06 $
37 // Current Owner : $Author: dgbaur $
38 //-----------------------------------------------------------------------------
39 
40 #include <Xyce_config.h>
41 
42 
43 // ---------- Standard Includes ----------
44 #define Xyce_MPDE_IC
45 #include <N_UTL_Misc.h>
46 
47 #include <iostream>
48 #include <ctime>
49 
50 #ifdef HAVE_CSTDIO
51 #include <cstdio>
52 #else
53 #include <stdio.h>
54 #endif
55 
56 #ifdef HAVE_CMATH
57 #include <cmath>
58 #else
59 #include <math.h>
60 #endif
61 
62 #include <N_ANP_AnalysisManager.h>
63 #include <N_ANP_DCSweep.h>
64 #include <N_ANP_Transient.h>
65 #include <N_ERH_ErrorMgr.h>
66 #include <N_IO_ActiveOutput.h>
67 #include <N_IO_CmdParse.h>
68 #include <N_LOA_Loader.h>
69 #include <N_NLS_Manager.h>
70 #include <N_PDS_Comm.h>
71 #include <N_PDS_Manager.h>
72 #include <N_TIA_DataStore.h>
73 #include <N_TIA_StepErrorControl.h>
74 #include <N_TIA_TIAParams.h>
75 #include <N_TIA_TimeIntInfo.h>
77 #include <N_TIA_TwoLevelError.h>
78 #include <N_UTL_BreakPoint.h>
79 #include <N_UTL_OptionBlock.h>
80 #include <N_UTL_Timer.h>
81 
82 namespace Xyce {
83 namespace Analysis {
84 
85 //-----------------------------------------------------------------------------
86 // Function : AnalysisManager::provisionalStep
87 // Purpose : Used by mixed-signal.
88 // Special Notes :
89 // Scope : public
90 // Creator : Eric Keiter, SNL
91 // Creation Date : 03/04/2009
92 //-----------------------------------------------------------------------------
93 bool AnalysisManager::provisionalStep (double maxTimeStep, double &timeStep)
94 {
95  bool bsuccess = true;
96  bool b1 = true;
97  std::string msg;
98  bool dcopFlag = true;
99 
101  {
103  {
104  mixedSignalAnalysisObject_ = Teuchos::rcp(new N_ANP_Transient(*this));
105  mixedSignalAnalysisObject_->setAnalysisParams(tranParamsBlock);
107  }
108  else if (analysisMode_ == ANP_MODE_DC_SWEEP)
109  {
110  mixedSignalAnalysisObject_ = Teuchos::rcp(new N_ANP_DCSweep(*this));
111  for (int i=0;i<dcParamsBlockVec.size();++i)
112  {
113  mixedSignalAnalysisObject_->setAnalysisParams(dcParamsBlockVec[i]);
114  }
115  }
116  else
117  {
118  Report::DevelFatal().in("AnalysisManager::provisionalStep") << "unknown type of analysis";
119  }
121 
122  // Start the solvers timer.
123  xyceTranTimerPtr_->resetStartTime();
124 
126  }
127 
129 
130  RefCountPtr<N_ANP_Transient> mixedSignalTransientAnalysisObject =
131  Teuchos::rcp_dynamic_cast<N_ANP_Transient>(mixedSignalAnalysisObject_);
132 
133  if (!Teuchos::is_null(mixedSignalTransientAnalysisObject))
134  {
135  dcopFlag = mixedSignalTransientAnalysisObject->getDCOPFlag();
136  }
137 
138  // Now save time step info, in case this step gets rejected.
139 
140  if (!(stepErrorControl_->isFinished()))
141  {
142  bool stepSuccess = false;
143 
144  if (dcopFlag) // if dcop step, make one attempt.
145  {
146  mixedSignalAnalysisObject_->preStepDetails (maxTimeStep);
147  b1 = mixedSignalAnalysisObject_->mixedSignalStep();
148 
149  // only call finalize step here if we have failed.
151  {
152  mixedSignalAnalysisObject_->finalizeStep();
153  }
154  stepSuccess = stepErrorControl_->stepAttemptStatus;
155  }
156  else // else, if transient step, keep re-taking the step
157  // until it succeeds, or gets an unrecoverable failure,
158  // such as time-step-too-small.
159  {
160  bool recoverableFailureFlag=true;
161  while (!stepSuccess && recoverableFailureFlag)
162  {
163  mixedSignalAnalysisObject_->preStepDetails (maxTimeStep);
164  b1 = mixedSignalAnalysisObject_->mixedSignalStep();
165 
166  // Only call finalize step here if step has failed.
167  // If we succeed, we want to give Habanero the opportunity
168  // to reject the step, after this function (provisionalStep)
169  // exits.
171  {
172  recoverableFailureFlag = mixedSignalAnalysisObject_->finalizeStep ();
173  }
174  else
175  {
176  stepSuccess = true;
177  }
178  }
179  }
180  bsuccess = stepSuccess;
181  }
182 
183  // get the step information.
184  //
185 
186  if (dcopFlag)
187  {
188  timeStep = 0.0;
189  }
190  else
191  {
192  N_TIA_TimeIntInfo tiInfo;
193  getTimeIntInfo(tiInfo);
194  timeStep = tiInfo.nextTimeStep;
195  }
196 
197  return bsuccess;
198 }
199 
200 //-----------------------------------------------------------------------------
201 // Function : AnalysisManager::acceptProvisionalStep
202 // Purpose : Used by mixed-signal.
203 // Special Notes :
204 // Scope : public
205 // Creator : Eric Keiter, SNL
206 // Creation Date : 04/10/2009
207 //-----------------------------------------------------------------------------
209 {
210  mixedSignalAnalysisObject_->finalizeStep ();
211 }
212 
213 //-----------------------------------------------------------------------------
214 // Function : AnalysisManager::rejectProvisionalStep
215 // Purpose : Used by mixed-signal.
216 // Special Notes :
217 // Scope : public
218 // Creator : Eric Keiter, SNL
219 // Creation Date : 04/10/2009
220 //-----------------------------------------------------------------------------
222 {
225 
226  bool dcopFlag = false;
227  RefCountPtr<N_ANP_Transient> mixedSignalTransientAnalysisObject =
228  Teuchos::rcp_dynamic_cast<N_ANP_Transient>(mixedSignalAnalysisObject_);
229 
230  if (!Teuchos::is_null(mixedSignalTransientAnalysisObject))
231  {
232  dcopFlag = mixedSignalTransientAnalysisObject->getDCOPFlag();
233  }
234 
235  if (dcopFlag)
236  {
237  mixedSignalAnalysisObject_->finalizeStep ();
238  }
239  // Transient
240  else
241  {
242  // bool b1 = processFailedStep();
243  loader_->stepFailure(currentMode_);
245 
246  mixedSignalTransientAnalysisObject->stats_.failedStepsAttempted_ += 1;
248 
249  } // transient
250 
251 #if 0
253  {
254  // Failure at this point only indicates that the simulation
255  // is paused and may be resumed.
257  isPaused = true;
258  }
259 #endif
260 }
261 
262 //-----------------------------------------------------------------------------
263 // Function : AnalysisManager::setExternalSolverState
264 // Purpose :
265 // Special Notes : Used for multi-level Newton solves, for levels other
266 // than the top level.
267 // Scope : public
268 // Creator : Eric Keiter, SNL
269 // Creation Date : 05/22/2014
270 //-----------------------------------------------------------------------------
272 {
273  loader_->setExternalSolverState (ss);
274 }
275 
276 
277 //-----------------------------------------------------------------------------
278 // Function : AnalysisManager::runStep
279 //
280 // Purpose : This function is similar to "run" except that only a single
281 // integration (or DC sweep) step will be executed.
282 //
283 // Special Notes : Used for multi-level Newton solves, for levels other
284 // than the top level.
285 //
286 // Scope : public
287 // Creator : Eric Keiter, SNL
288 // Creation Date : 03/06/2006
289 //-----------------------------------------------------------------------------
291  (const N_TIA_TimeIntInfo & tiInfo, N_TIA_TwoLevelError & tlError)
292 {
293  std::string msg;
294 
295  if (initializeAllFlag_ == false)
296  {
297  Report::DevelFatal().in("AnalysisManager::runStep") << "Call initializeAll function first";
298  }
299 
300  if (analysisParamsRegistered == false)
301  {
302  Report::UserError() << "No analysis statement in the netlist";
303  return false;
304  }
305 
306  bool integration_status = false;
307 
308 #ifdef Xyce_VERBOSE_TIME
309  tiaParams_.printParams(Xyce::lout(), anpAnalysisModeToNLS(analysisMode_));
310 #endif
311 
312  solverStartTime_ = elapsedTimerPtr_->elapsedTime();
313 
314  if (stepLoopFlag_)
315  {
316  Report::UserError() << "Not valid to use .STEP statements in an inner solve";
317  }
318  else
319  {
320  if (analysisMode_ == ANP_MODE_TRANSIENT)
321  {
322 #ifdef Xyce_VERBOSE_TIME
323  Xyce::dout() << "AnalysisManager::runStep:" << std::endl;
324  Xyce::dout() << "nextTime = " << tiInfo.nextTime << std::endl;
325  Xyce::dout() << "stepSize = " << tiInfo.nextTimeStep << std::endl;
326 #endif
327  }
328  else if (analysisMode_ == ANP_MODE_DC_SWEEP)
329  {
330  // do nothing
331  }
332  else
333  {
334  Report::DevelFatal().in("AnalysisManager::runStep") << "Unknown type of analysis";
335  }
336  integration_status = twoLevelAnalysisObject_->twoLevelStep();
337  workingIntgMethod_->setupTwoLevelError(tlError);
338  }
339 
340  return integration_status;
341 }
342 
343 
344 //-----------------------------------------------------------------------------
345 // Function : AnalysisManager::startTimeStep_
346 // Purpose : used by 2-level solves.
347 // Special Notes : One of the primary purposes for this function is to impose
348 // a lot of upper level information from the top level time
349 // integrator on the inner level time integrator. This
350 // information is contained in the N_TIA_TimeIntInfo
351 // class (tiInfo here). This includes things like the
352 // time step size, the time integration order, etc.
353 //
354 // In general, in a 2-level solve, an inner solver doesn't
355 // have enough information to correctly determine the
356 // step size, order, etc. This is in part because the
357 // inner solver, while it knows about the top level solver,
358 // it cannot know about any OTHER inner solvers.
359 //
360 // The top level solver, however, does have enough information.
361 // It gathers break point, error analysis, and other info
362 // from all the inner solves. So, the top level solver
363 // makes all the decisions and imposes them on the inner
364 // solves. This function is where it does that impose.
365 //
366 // Scope : public
367 // Creator : Eric Keiter, SNL
368 // Creation Date : 03/06/2006
369 //-----------------------------------------------------------------------------
371 {
372  // Beginning Integration flag is the only piece of data in tiInfo that is
373  // currently owned by the control algorithm class. Everything else
374  // is owned by the step error control, or the integration method.
375  twoLevelAnalysisObject_->setBeginningIntegrationFlag(tiInfo.beginIntegrationFlag);
376 
377 #ifdef Xyce_DEBUG_ANALYSIS
378  if (tiaParams_.debugLevel > 0)
379  {
380  Xyce::dout() << "AnalysisManager::startTimeStep:" << std::endl;
381  }
382 #endif
383 
384 #ifdef Xyce_VERBOSE_TIME
385  if( !is_null(twoLevelAnalysisObject_) )
386  {
387  // an MPDE run also traverses this area so catch case where this is null
388  twoLevelAnalysisObject_->printStepHeader(Xyce::lout());
389  }
390 #endif
391  if (switchIntegrator_)
393 
394  // ------------------------------------------------------------------------
395  // Set the step size, current time and next time.
396 #ifndef Xyce_CHARON
397  if ( twoLevelAnalysisObject_->getIntegrationMethod() != TIAMethod_NONE)
398 #endif
399  {
401  }
402 
403 
404  if (twoLevelAnalysisObject_->getBeginningIntegrationFlag() && stepErrorControl_->stepAttemptStatus)
405  {
406  workingIntgMethod_->setTwoLevelTimeInfo(tiInfo); // new-dae only
407  }
408 
409  // ------------------------------------------------------------------------
410  // If we've switched the integration method, we need to obtain the
411  // corrector derivative only after we've updated the TimeInfo.
412  if (switchIntegrator_)
413  {
414  switchIntegrator_ = false;
416  }
417 
418  bool dcopFlag = true;
419  RefCountPtr<N_ANP_Transient> twoLevelTransientAnalysisObject = Teuchos::rcp_dynamic_cast<N_ANP_Transient>(twoLevelAnalysisObject_);
420  if (!Teuchos::is_null(twoLevelTransientAnalysisObject)) {
421  dcopFlag = twoLevelTransientAnalysisObject->getDCOPFlag();
422  }
423 #ifdef Xyce_VERBOSE_TIME
424  if (!dcopFlag) stepErrorControl_->outputTimeInfo(lout());
425 #endif
426 
427  // ------------------------------------------------------------------------
428  // Set the nonlinear solver parameters to those appropriate for the
429  // transient solution, if neccessary.
430  if (!dcopFlag)
431  {
433  }
434 
435  // Ask the method to update its coefficients
437  twoLevelAnalysisObject_->handlePredictor();
438 
439  return true;
440 }
441 
442 //-----------------------------------------------------------------------------
443 // Function : AnalysisManager::conductanceTest
444 // Purpose :
445 // Special Notes :
446 // Scope : public
447 // Creator : Eric Keiter, SNL
448 // Creation Date : 03/06/2006
449 //-----------------------------------------------------------------------------
451 {
452  std::map<std::string,double> inputMap;
453  std::vector<double> outputVector;
454  std::vector< std::vector<double> > jacobian;
455 
456  // load inputMap from tiaParam.condTestDeviceNames option
457  std::list< std::string >::iterator currentDeviceName = tiaParams_.condTestDeviceNames.begin();
458  std::list< std::string >::iterator endDeviceName = tiaParams_.condTestDeviceNames.end();
459  while( currentDeviceName != endDeviceName )
460  {
461  inputMap[ *currentDeviceName ] = 0.0;
462  ++currentDeviceName;
463  }
464 
465 #ifdef Xyce_DEBUG_ANALYSIS
466  if (tiaParams_.debugLevel > 0)
467  {
468  Xyce::dout() << "AnalysisManager::conductanceTest()" << std::endl;
469  currentDeviceName = tiaParams_.condTestDeviceNames.begin();
470  while( currentDeviceName != endDeviceName )
471  {
472  Xyce::dout() << "currentDeviceName = \"" << *currentDeviceName << "\" added to inputMap[ "
473  << *currentDeviceName << " ] = " << inputMap[ *currentDeviceName ] << std::endl;
474  ++currentDeviceName;
475  }
476  }
477 #endif
478 
479  int isize=inputMap.size();
480  outputVector.resize(isize,0.0);
481  jacobian.resize(isize);
482  for (int i=0;i<isize;++i)
483  {
484  jacobian[i].resize(isize,0.0);
485  }
486 
487  bool b1 = nlsMgrPtr_->obtainConductances(
488  inputMap,
489  outputVector,
490  jacobian
491  );
492 
493  int iE1, iE2;
494  int numElectrodes = isize;
495 
496  FILE *fp1;
497  fp1 = fopen("conductance.txt","w");
498 
499  fprintf(fp1, "%s", "Conductance array: \n");
500  fprintf(fp1,"%s", " ");
501  if (b1)
502  {
503  std::map<std::string,double>::iterator iterM = inputMap.begin();
504  std::map<std::string,double>::iterator endM = inputMap.end ();
505  for (iE2 = 0; iE2 < numElectrodes; ++iE2,++iterM)
506  {
507  std::string srcname = iterM->first;
508  fprintf(fp1,"\t%14s",srcname.c_str());
509  }
510  fprintf(fp1,"%s", "\n");
511 
512  iterM = inputMap.begin();
513  for (iE1 = 0; iE1 < numElectrodes; ++iE1, ++iterM)
514  {
515  std::string srcname = iterM->first;
516  fprintf(fp1,"%14s",srcname.c_str());
517  for (iE2 = 0; iE2 < numElectrodes; ++iE2)
518  {
519  fprintf(fp1,"\t%14.4e",jacobian[iE1][iE2]);
520  }
521  fprintf(fp1,"%s", "\n");
522  }
523  fprintf(fp1,"%s", "\n");
524  }
525  else
526  {
527  fprintf(fp1,"%s", "\nConductance calculation failed!\n");
528  }
529 
530  fclose(fp1);
531 
532 }
533 
534 //-----------------------------------------------------------------------------
535 // Function : AnalysisManager::startupSolvers
536 // Purpose :
537 // Special Notes : Used only for 2-level solves.
538 // Scope : public
539 // Creator : Eric R. Keiter
540 // Creation Date : 3/10/2006
541 //-----------------------------------------------------------------------------
543 {
544  bool bsuccess = true;
545  std::string msg;
546 
548  {
550  twoLevelAnalysisObject_ = Teuchos::rcp(new N_ANP_Transient(*this));
551  twoLevelAnalysisObject_->setAnalysisParams(tranParamsBlock);
553  }
554  else if (analysisMode_ == ANP_MODE_DC_SWEEP)
555  {
557  twoLevelAnalysisObject_ = Teuchos::rcp(new N_ANP_DCSweep(*this));
558  for (int i=0;i<dcParamsBlockVec.size();++i)
559  {
560  twoLevelAnalysisObject_->setAnalysisParams(dcParamsBlockVec[i]);
561  }
562  }
563  else
564  {
565  Report::UserError() << "Multi-Level Newton solves only supports DC and Transient analysis";
566  return false;
567  }
568 
570  twoLevelAnalysisObject_->init();
571 
572  // outputManagerAdapter_->prepareOutput(analysisMode_);
573  activeOutput_ = new IO::ActiveOutput(*outMgrPtr_);
574  activeOutput_->add(pdsMgrPtr_->getPDSComm()->comm(), analysisMode_);
575 
576  // Reset the solvers timer.
577  xyceTranTimerPtr_->resetStartTime();
578 
579  // Hardwire the erroption parameter to 1, which will force the inner
580  // solve (initiated by this function) to only use the Newton success/failure
581  // as step criteria. Predictor-corrector information is handled in the
582  // upper level solver.
584  // tscoffe 03/07/08 With the new errorAnalysisOption = 1 features of nlmin
585  // and nlmax, we should enforce the original mode where nlmin=nlmax=maxNLSteps.
586  //int maxNLSteps = ???;
587  //tiaParams_.NLmax = maxNLSteps;
588  //tiaParams_.NLmin = maxNLSteps;
589 
590  return bsuccess;
591 }
592 
593 //-----------------------------------------------------------------------------
594 // Function : AnalysisManager::finishSolvers
595 // Purpose :
596 // Special Notes : Used only for 2-level solves.
597 // Scope : public
598 // Creator : Eric Keiter
599 // Creation Date : 3/10/2006
600 //-----------------------------------------------------------------------------
602 {
603  bool bsuccess = true;
604  std::string msg;
605 
606  twoLevelAnalysisObject_->finish();
607 
608  delete activeOutput_;
609  activeOutput_ = 0;
610 
611  return bsuccess;
612 }
613 
614 //-----------------------------------------------------------------------------
615 // Function : AnalysisManager::homotopyStepSuccess
616 // Purpose : Lower-level processing of a successful homotopy step,
617 // which was controlled from the upper level of a 2-level solve.
618 // Special Notes :
619 // Scope : public
620 // Creator : Eric R. Keiter, SNL
621 // Creation Date : 03/20/06
622 //-----------------------------------------------------------------------------
624  ( const std::vector<std::string> & paramNames,
625  const std::vector<double> & paramVals)
626 {
627 #ifdef Xyce_DEBUG_ANALYSIS
628  std::string netListFile = commandLine_.getArgumentValue("netlist");
629  Xyce::dout() << "\n " << netListFile;
630  Xyce::dout() << " AnalysisManager::homotopyStepSuccess " << std::endl;
631 #endif
632  // output:
633  outputManagerAdapter_->outputHomotopy( paramNames, paramVals, *getTIADataStore()->nextSolutionPtr );
634 
635  // update the data arrays:
636  getTIADataStore()->updateSolDataArrays();
637 
638  // pass info to the next level down, if it exists.
639  loader_->homotopyStepSuccess (paramNames,paramVals);
640 
641  return;
642 }
643 
644 //-----------------------------------------------------------------------------
645 // Function : AnalysisManager::homotopyStepFailure
646 //
647 // Purpose : Lower-level processing of a failed homotopy step,
648 // which was controlled from the upper level of a
649 // 2-level solve.
650 // Special Notes :
651 // Scope : public
652 // Creator : Eric R. Keiter, SNL
653 // Creation Date : 03/30/06
654 //-----------------------------------------------------------------------------
656 {
657 #ifdef Xyce_DEBUG_ANALYSIS
658  std::string netListFile = commandLine_.getArgumentValue("netlist");
659  Xyce::dout() << "\n " << netListFile;
660  Xyce::dout() << " AnalysisManager::homotopyStepFailure " << std::endl;
661 #endif
662 
663  // The solutions currently in place represent failure. Get rid of them.
665 
666  // pass info to the next level down, if it exists.
667  loader_->homotopyStepFailure ();
668 
669  return;
670 }
671 
672 //-----------------------------------------------------------------------------
673 // Function : AnalysisManager::stepSuccess
674 // Purpose :
675 // Special Notes :
676 // Scope : public
677 // Creator : Eric R. Keiter, SNL
678 // Creation Date : 03/12/06
679 //-----------------------------------------------------------------------------
681 {
682 
683 #ifdef Xyce_DEBUG_ANALYSIS
684  std::string netListFile = commandLine_.getArgumentValue("netlist");
685  Xyce::dout() << "\n " << netListFile;
686  Xyce::dout() << " AnalysisManager::stepSuccess " << std::endl;
687 #endif
688 
689  setCurrentMode(analysisUpper);
691  switch (analysisUpper)
692  {
694  {
695  N_ANP_Transient * twoLevelTransientAnalysisObject = dynamic_cast<N_ANP_Transient*>(&*twoLevelAnalysisObject_);
696  if (twoLevelTransientAnalysisObject)
697  {
698  twoLevelTransientAnalysisObject->processSuccessfulDCOP();
699  }
700  else
701  {
702  Report::DevelFatal().in("AnalysisManager::stepSuccess") << "Failed dynamic_cast of twoLevelAnalysisObject to N_ANP_Transient.";
703  }
704  }
705  break;
707  twoLevelAnalysisObject_->processSuccessfulStep();
708  break;
710  twoLevelAnalysisObject_->processSuccessfulStep();
711  break;
712  default:
713  Report::DevelFatal().in("AnalysisManager::stepSuccess") << "Unknown type of analysis";
714  }
715 }
716 
717 //-----------------------------------------------------------------------------
718 // Function : AnalysisManager::stepFailure
719 // Purpose :
720 // Special Notes :
721 // Scope : public
722 // Creator : Eric R. Keiter, SNL
723 // Creation Date : 03/12/06
724 //-----------------------------------------------------------------------------
726 {
727  setCurrentMode(analysisUpper);
729  switch (analysisUpper)
730  {
732  {
733  N_ANP_Transient * twoLevelTransientAnalysisObject = dynamic_cast<N_ANP_Transient*>(&*twoLevelAnalysisObject_);
734  if (twoLevelTransientAnalysisObject)
735  {
736  twoLevelTransientAnalysisObject->processFailedDCOP();
737  }
738  else
739  {
740  Report::DevelFatal().in("AnalysisManager::stepFailure") << "Failed dynamic_cast of twoLevelAnalysisObject to N_ANP_Transient.";
741  }
742  }
743  break;
745  twoLevelAnalysisObject_->processFailedStep();
746  break;
748  twoLevelAnalysisObject_->processFailedStep();
749  break;
750  default:
751  Report::DevelFatal().in("AnalysisManager::stepFailure") << "Unknown type of analysis";
752  }
753 }
754 
755 //-----------------------------------------------------------------------------
756 // Function : AnalysisManager::getInitialQnorm
757 // Purpose : Used for 2-level solves.
758 // Special Notes :
759 // Scope : public
760 // Creator : Eric R. Keiter, SNL
761 // Creation Date : 03/12/06
762 //-----------------------------------------------------------------------------
764 {
765  bool bsuccess = true;
767  return bsuccess;
768 }
769 
770 //-----------------------------------------------------------------------------
771 // Function : AnalysisManager::getBreakPoints
772 // Purpose : Used for 2-level solves.
773 // Special Notes :
774 // Scope : public
775 // Creator : Eric R. Keiter, SNL
776 // Creation Date : 03/12/06
777 //-----------------------------------------------------------------------------
778 bool AnalysisManager::getBreakPoints(std::vector<N_UTL_BreakPoint> &breakPointTimes)
779 {
780  bool bsuccess = true;
781  loader_->getBreakPoints(breakPointTimes);
782  return bsuccess;
783 }
784 
785 } // namespace Analysis
786 } // namespace Xyce