Xyce  6.1
N_ANP_MPDE.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_MPDE.C,v $
27 // Purpose : MPDE analysis functions.
28 // Special Notes :
29 // Creator : Todd Coffey, 1414, Ting Mei, 1437
30 // Creation Date : 07/23/08
31 //
32 // Revision Information:
33 // ---------------------
34 // Revision Number: $Revision: 1.57 $
35 // Revision Date : $Date: 2015/06/12 19:59:33 $
36 // Current Owner : $Author: dgbaur $
37 //-----------------------------------------------------------------------------
38 #include <Xyce_config.h>
39 
40 #include <N_ANP_AnalysisManager.h>
41 #include <N_ANP_OutputMgrAdapter.h>
42 #include <N_ANP_MPDE.h>
43 #include <N_DEV_DeviceMgr.h>
44 #include <N_IO_CircuitBlock.h>
45 #include <N_IO_CmdParse.h>
46 #include <N_IO_OptionBlock.h>
47 #include <N_IO_OutputMgr.h>
48 #include <N_IO_PkgOptionsMgr.h>
49 #include <N_IO_SpiceSeparatedFieldTool.h>
50 #include <N_LOA_Loader.h>
51 #include <N_MPDE_Manager.h>
52 #include <N_TIA_DataStore.h>
53 #include <N_TIA_StepErrorControl.h>
55 #include <N_UTL_Factory.h>
56 #include <N_UTL_FeatureTest.h>
57 
58 namespace Xyce {
59 namespace Analysis {
60 
61 //-----------------------------------------------------------------------------
62 // Function : MPDE::MPDE( AnalysisManager * )
63 // Purpose :
64 // Special Notes :
65 // Scope : public
66 // Creator : Rich Schiek, SNL
67 // Creation Date : 3/11/06
68 //-----------------------------------------------------------------------------
70  AnalysisManager & analysis_manager,
71  Linear::System & linear_system,
72  Nonlinear::Manager & nonlinear_manager,
73  Loader::Loader & loader,
74  Device::DeviceMgr & device_manager,
75  Linear::Builder & builder,
76  Topo::Topology & topology,
77  IO::InitialConditionsManager & initial_conditions_manager,
78  IO::RestartMgr & restart_manager)
79  : AnalysisBase(analysis_manager, "MPDE"),
80  StepEventListener(&analysis_manager),
81  analysisManager_(analysis_manager),
82  loader_(loader),
83  linearSystem_(linear_system),
84  nonlinearManager_(nonlinear_manager),
85  topology_(topology),
86  mpdeManager_(new N_MPDE_Manager(analysisManager_, loader, device_manager, builder, topology, initial_conditions_manager, restart_manager, analysisManager_.getCommandLine()))
87 {}
88 
89 void MPDE::notify(const StepEvent &event)
90 {
91  if (event.state_ == StepEvent::STEP_STARTED)
92  {
94  }
95 }
96 
97 //-----------------------------------------------------------------------------
98 // Function : MPDE::~MPDE
99 // Purpose :
100 // Special Notes :
101 // Scope : public
102 // Creator :
103 // Creation Date :
104 //-----------------------------------------------------------------------------
106 {
107  delete mpdeManager_;
108 }
109 
110 const TimeIntg::TIAParams &
112 {
113  return mpdeManager_->getTIAParams();
114 }
115 
118 {
119  return mpdeManager_->getTIAParams();
120 }
121 
122 //-----------------------------------------------------------------------------
123 // Function : MPDE::getDCOPFlag()
124 // Purpose :
125 // Special Notes :
126 // Scope : public
127 // Creator : Eric Keiter, SNL
128 // Creation Date : 3/24/2014
129 //-----------------------------------------------------------------------------
130 bool MPDE::getDCOPFlag() const
131 {
133 }
134 
135 //-----------------------------------------------------------------------------
136 // Function : MPDE::run()
137 // Purpose :
138 // Special Notes :
139 // Scope : public
140 // Creator : Rich Schiek, SNL
141 // Creation Date : 3/11/06
142 //-----------------------------------------------------------------------------
144 {
145  // mpdeManager_->registerApplicationLoader(&loader_);
147 
148  return true;
149 }
150 
151 //-----------------------------------------------------------------------------
152 // Function : MPDE::init()
153 // Purpose :
154 // Special Notes :
155 // Scope : public
156 // Creator : Rich Schiek, SNL
157 // Creation Date : 3/11/06
158 //-----------------------------------------------------------------------------
160 {
161 // analysisManager_.getMPDEManager()->initializeAll();
162 
163  return false;
164 }
165 
166 //-----------------------------------------------------------------------------
167 // Function : MPDE::loopProcess()
168 // Purpose : Conduct the time stepping loop.
169 // Special Notes :
170 // Scope : public
171 // Creator : Rich Schiek, SNL
172 // Creation Date : 3/11/06
173 //-----------------------------------------------------------------------------
175 {
176  return false;
177 }
178 
179 //-----------------------------------------------------------------------------
180 // Function : MPDE::processSuccessfulDCOP()
181 // Purpose :
182 // Special Notes :
183 // Scope : public
184 // Creator : Rich Schiek, SNL
185 // Creation Date : 3/11/06
186 //-----------------------------------------------------------------------------
188 {
189  return false;
190 }
191 
192 //-----------------------------------------------------------------------------
193 // Function : MPDE::processSuccessfulStep()
194 // Purpose :
195 // Special Notes :
196 // Scope : public
197 // Creator : Rich Schiek, SNL
198 // Creation Date : 3/11/06
199 //-----------------------------------------------------------------------------
201 {
202  return false;
203 }
204 
205 //-----------------------------------------------------------------------------
206 // Function : MPDE::processFailedStep
207 // Purpose :
208 // Special Notes :
209 // Scope : public
210 // Creator : Rich Schiek, SNL
211 // Creation Date : 3/11/06
212 //-----------------------------------------------------------------------------
214 {
215  return false;
216 }
217 
218 //-----------------------------------------------------------------------------
219 // Function : MPDE::processFailedDCOP
220 // Purpose :
221 // Special Notes :
222 // Scope : public
223 // Creator : Rich Schiek, SNL
224 // Creation Date : 3/11/06
225 //-----------------------------------------------------------------------------
227 {
228  return false;
229 }
230 
231 //-----------------------------------------------------------------------------
232 // Function : MPDE::finish
233 // Purpose :
234 // Special Notes :
235 // Scope : public
236 // Creator : Rich Schiek, SNL
237 // Creation Date : 3/11/06
238 //-----------------------------------------------------------------------------
240 {
241  return false;
242 }
243 
245 {
246  return true;
247 }
248 
249 //-----------------------------------------------------------------------------
250 // Function : MPDE::finalVerboseOutput
251 // Purpose :
252 // Special Notes :
253 // Scope : public
254 // Creator : Rich Schiek, SNL
255 // Creation Date : 3/11/06
256 //-----------------------------------------------------------------------------
258 {
259  return false;
260 }
261 
262 namespace {
263 
264 typedef Util::Factory<AnalysisBase, MPDE> MPDEFactoryBase;
265 
266 //-----------------------------------------------------------------------------
267 // Class : MPDEFactory
268 // Purpose :
269 // Special Notes :
270 // Scope : public
271 // Creator : David G. Baur Raytheon Sandia National Laboratories 1355
272 // Creation Date : Thu Jan 29 12:53:02 2015
273 //-----------------------------------------------------------------------------
274 ///
275 /// Factory for parsing MPDE parameters from the netlist and creating MPDE analysis.
276 ///
277 class MPDEFactory : public MPDEFactoryBase
278 {
279 public:
280  //-----------------------------------------------------------------------------
281  // Function : MPDEFactory
282  // Purpose :
283  // Special Notes :
284  // Scope : public
285  // Creator : David G. Baur Raytheon Sandia National Laboratories 1355
286  // Creation Date : Thu Jan 29 12:54:09 2015
287  //-----------------------------------------------------------------------------
288  ///
289  /// Constructs the MPDE analysis factory
290  ///
291  /// @invariant Stores the results of parsing, so if more than one of the analysis and
292  /// associated lines are parsed, the second options simply overwrite the previously parsed
293  /// values.
294  ///
295  /// @invariant The existence of the parameters specified in the constructor cannot
296  /// change.
297  ///
298  /// @param analysis_manager
299  /// @param linear_system
300  /// @param nonlinear_manager
301  /// @param device_manager
302  /// @param builder
303  /// @param topology
304  ///
305  MPDEFactory(
306  Analysis::AnalysisManager & analysis_manager,
307  Linear::System & linear_system,
308  Nonlinear::Manager & nonlinear_manager,
309  Loader::Loader & loader,
310  Device::DeviceMgr & device_manager,
311  Linear::Builder & builder,
312  Topo::Topology & topology,
313  IO::InitialConditionsManager & initial_conditions_manager,
314  IO::RestartMgr & restart_manager)
315  : MPDEFactoryBase(),
316  analysisManager_(analysis_manager),
317  linearSystem_(linear_system),
318  nonlinearManager_(nonlinear_manager),
319  loader_(loader),
320  deviceManager_(device_manager),
321  builder_(builder),
322  topology_(topology),
323  initialConditionsManager_(initial_conditions_manager),
324  restartManager_(restart_manager)
325  {}
326 
327  virtual ~MPDEFactory()
328  {}
329 
330  //-----------------------------------------------------------------------------
331  // Function : create
332  // Purpose :
333  // Special Notes :
334  // Scope : public
335  // Creator : David G. Baur Raytheon Sandia National Laboratories 1355
336  // Creation Date : Thu Jan 29 12:59:00 2015
337  //-----------------------------------------------------------------------------
338  ///
339  /// Create a new MPDE analysis and applies the analysis and time integrator option blocks.
340  ///
341  /// @return new MPDE analysis object
342  ///
343  MPDE *create() const
344  {
345  analysisManager_.setAnalysisMode(ANP_MODE_MPDE);
346 
348 
349  mpde->getMPDEManager().setMPDEAnalysisParams(mpdeAnalysisOptionBlock_);
350  mpde->getMPDEManager().setMPDEOptions(mpdeIntOptionBlock_);
351  mpde->getMPDEManager().setTransientOptions(mpdeTimeIntegratorOptionBlock_);
352 
353  return mpde;
354  }
355 
356  //-----------------------------------------------------------------------------
357  // Function : setMPDEAnalysisOptionBlock
358  // Purpose :
359  // Special Notes :
360  // Scope : public
361  // Creator : David G. Baur Raytheon Sandia National Laboratories 1355
362  // Creation Date : Thu Jan 29 13:00:14 2015
363  //-----------------------------------------------------------------------------
364  ///
365  /// Saves the analysis parsed options block in the factory.
366  ///
367  /// @invariant Overwrites any previously specified analysis option block.
368  ///
369  /// @param option_block parsed option block
370  ///
371  void setMPDEAnalysisOptionBlock(const Util::OptionBlock &option_block)
372  {
373  mpdeAnalysisOptionBlock_ = option_block;
374  }
375 
376  //-----------------------------------------------------------------------------
377  // Function : setMPDETimeIntegratorOptionBlock
378  // Purpose :
379  // Special Notes :
380  // Scope : public
381  // Creator : David G. Baur Raytheon Sandia National Laboratories 1355
382  // Creation Date : Thu Jan 29 13:01:27 2015
383  //-----------------------------------------------------------------------------
384  ///
385  /// Saves the time integrator parsed option block.
386  ///
387  /// @invariant Overwrites any previously specified time integrator option block.
388  ///
389  /// @param option_block parsed option block
390  ///
391  bool setMPDETimeIntegratorOptionBlock(const Util::OptionBlock &option_block)
392  {
393  mpdeTimeIntegratorOptionBlock_ = option_block;
394 
395  return true;
396  }
397 
398  //-----------------------------------------------------------------------------
399  // Function : setMPDEIntOptionBlock
400  // Purpose :
401  // Special Notes :
402  // Scope : public
403  // Creator : David G. Baur Raytheon Sandia National Laboratories 1355
404  // Creation Date : Thu Jan 29 13:01:27 2015
405  //-----------------------------------------------------------------------------
406  ///
407  /// Saves the MPDEINT parsed option block.
408  ///
409  /// @invariant Overwrites any previously specified time integrator option block.
410  ///
411  /// @param option_block parsed option block
412  ///
413  bool setMPDEIntOptionBlock(const Util::OptionBlock &option_block)
414  {
415  mpdeIntOptionBlock_ = option_block;
416 
417  return true;
418  }
419 
420 public:
421  AnalysisManager & analysisManager_;
422  Linear::System & linearSystem_;
423  Nonlinear::Manager & nonlinearManager_;
424  Loader::Loader & loader_;
425  Device::DeviceMgr & deviceManager_;
426  Linear::Builder & builder_;
427  Topo::Topology & topology_;
428  IO::InitialConditionsManager & initialConditionsManager_;
429  IO::RestartMgr & restartManager_;
430 
431 private:
432  Util::OptionBlock mpdeAnalysisOptionBlock_;
433  Util::OptionBlock mpdeIntOptionBlock_;
435  Util::OptionBlock timeIntegratorOptionBlock_;
436 };
437 
438 // .MPDE
439 struct MPDEAnalysisReg : public IO::PkgOptionsReg
440 {
441  MPDEAnalysisReg(
442  MPDEFactory & factory )
443  : factory_(factory)
444  {}
445 
446  bool operator()(const Util::OptionBlock &option_block)
447  {
448  factory_.setMPDEAnalysisOptionBlock(option_block);
449  factory_.deviceManager_.setBlockAnalysisFlag(true);
450 
451  factory_.analysisManager_.addAnalysis(&factory_);
452 
453  return true;
454  }
455 
456  MPDEFactory & factory_;
457 };
458 
459 //-----------------------------------------------------------------------------
460 // Function : extractMPDEData
461 // Purpose : Extract the parameters from a netlist .DC line held in
462 // parsed_line.
463 // Special Notes :
464 // Scope : public
465 // Creator : Todd Coffey, Rich Schiek
466 // Creation Date : 7/23/08
467 //-----------------------------------------------------------------------------
468 bool
469 extractMPDEData(
470  IO::PkgOptionsMgr & options_manager,
471  IO::CircuitBlock & circuit_block,
472  const std::string & netlist_filename,
473  const IO::TokenVector & parsed_line)
474 {
475  Util::OptionBlock option_block("MPDE", Util::OptionBlock::NO_EXPRESSIONS, netlist_filename, parsed_line[0].lineNumber_);
476 
477  int numFields = parsed_line.size();
478 
479  // Check that the minimum required number of fields are on the line.
480  if ( numFields < 3 || numFields > 6 )
481  {
482  Report::UserError0().at(netlist_filename, parsed_line[0].lineNumber_)
483  << ".MPDE line has an unexpected number of fields";
484  }
485 
486  int linePosition = 1; // Start of parameters on .param line.
487  int endPosition = numFields - 1;
488 
489  Util::Param parameter("", "");
490 
491  // TSTEP and TSTOP are required, get them now.
492  parameter.setTag( "TSTEP" );
493  parameter.setVal( parsed_line[linePosition].string_ );
494  option_block.addParam( parameter );
495  ++linePosition; // Advance to next parameter.
496 
497  parameter.setTag( "TSTOP" );
498  parameter.setVal( parsed_line[linePosition].string_ );
499  option_block.addParam( parameter );
500  ++linePosition; // Advance to next parameter.
501 
502  // Next check last field to see if it is UIC or NOOP.
503  parameter.setTag( parsed_line[endPosition].string_ );
504  if ( parameter.uTag() == "NOOP" || parameter.uTag() == "UIC" )
505  {
506  parameter.setVal( "1" );
507  option_block.addParam( parameter );
508  --endPosition;
509  }
510  else if ( numFields == 6)
511  {
512  Report::UserError0().at(netlist_filename, parsed_line[endPosition].lineNumber_) << "expected NOOP/UIC field on .MPDE line but found" << parameter.usVal();
513  }
514 
515  if ( linePosition <= endPosition )
516  {
517  parameter.setTag( "TSTART" );
518  parameter.setVal( parsed_line[linePosition].string_ );
519  option_block.addParam( parameter );
520  ++linePosition; // Advance to next parameter.
521  }
522 
523  if ( linePosition <= endPosition )
524  {
525  parameter.setTag( "DTMAX" );
526  parameter.setVal( parsed_line[linePosition].string_ );
527  option_block.addParam( parameter );
528  ++linePosition; // Advance to next parameter.
529  }
530 
531  circuit_block.addOptions(option_block);
532 
533  return true;
534 }
535 
536 void
537 populateMetadata(
538  IO::PkgOptionsMgr & options_manager)
539 {
540  {
541  Util::ParamMap &parameters = options_manager.addOptionsMetadataMap("TIMEINT-MPDE");
542 
543  parameters.insert(Util::ParamMap::value_type("METHOD", Util::Param("METHOD", 1)));
544  if (DEBUG_ANALYSIS)
545  parameters.insert(Util::ParamMap::value_type("CONSTSTEP", Util::Param("CONSTSTEP", 0)));
546  parameters.insert(Util::ParamMap::value_type("USEDEVICEMAX", Util::Param("USEDEVICEMAX", 1)));
547  parameters.insert(Util::ParamMap::value_type("RELTOL", Util::Param("RELTOL", 1.0E-2)));
548  parameters.insert(Util::ParamMap::value_type("ABSTOL", Util::Param("ABSTOL", 1.0E-6)));
549  parameters.insert(Util::ParamMap::value_type("RESTARTSTEPSCALE", Util::Param("RESTARTSTEPSCALE", .005)));
550  parameters.insert(Util::ParamMap::value_type("NLNEARCONV", Util::Param("NLNEARCONV", 0)));
551  parameters.insert(Util::ParamMap::value_type("NLSMALLUPDATE", Util::Param("NLSMALLUPDATE", 1)));
552  parameters.insert(Util::ParamMap::value_type("DOUBLEDCOPSTEP", Util::Param("DOUBLEDCOPSTEP", 0)));
553  parameters.insert(Util::ParamMap::value_type("FIRSTDCOPSTEP", Util::Param("FIRSTDCOPSTEP", 0)));
554  parameters.insert(Util::ParamMap::value_type("LASTDCOPSTEP", Util::Param("LASTDCOPSTEP", 1)));
555  parameters.insert(Util::ParamMap::value_type("RESETTRANNLS", Util::Param("RESETTRANNLS", 1)));
556  parameters.insert(Util::ParamMap::value_type("BPENABLE", Util::Param("BPENABLE", 1)));
557  parameters.insert(Util::ParamMap::value_type("EXITTIME", Util::Param("EXITTIME", 0.0)));
558  parameters.insert(Util::ParamMap::value_type("EXITSTEP", Util::Param("EXITSTEP", 0)));
559  parameters.insert(Util::ParamMap::value_type("ERROPTION", Util::Param("ERROPTION", 0)));
560  parameters.insert(Util::ParamMap::value_type("DEBUGLEVEL", Util::Param("DEBUGLEVEL", 0)));
561  parameters.insert(Util::ParamMap::value_type("JACLIMITFLAG", Util::Param("JACLIMITFLAG", 0)));
562  parameters.insert(Util::ParamMap::value_type("JACLIMIT", Util::Param("JACLIMIT", 1.0e17)));
563  parameters.insert(Util::ParamMap::value_type("DAESTATEDERIV", Util::Param("DAESTATEDERIV", 0)));
564  parameters.insert(Util::ParamMap::value_type("TESTFIRSTSTEP", Util::Param("TESTFIRSTSTEP", 0)));
565  parameters.insert(Util::ParamMap::value_type("DTMIN", Util::Param("DTMIN", 0.0)));
566  parameters.insert(Util::ParamMap::value_type("MAXORD", Util::Param("MAXORD", 5)));
567  parameters.insert(Util::ParamMap::value_type("MINORD", Util::Param("MINORD", 1)));
568  parameters.insert(Util::ParamMap::value_type("OUTPUTINTERPMPDE", Util::Param("OUTPUTINTERPMPDE", 1)));
569  parameters.insert(Util::ParamMap::value_type("INTERPOUTPUT", Util::Param("INTERPOUTPUT", 1)));
570  parameters.insert(Util::ParamMap::value_type("CONDTEST", Util::Param("CONDTEST", 0)));
571  parameters.insert(Util::ParamMap::value_type("CONDTESTDEVICENAME", Util::Param("CONDTESTDEVICENAME", "dev_name")));
572  parameters.insert(Util::ParamMap::value_type("ISOCONDTEST", Util::Param("ISOCONDTEST", 0)));
573  parameters.insert(Util::ParamMap::value_type("ISOCONDTESTDEVICENAME", Util::Param("ISOCONDTESTDEVICENAME", "dev_name")));
574  parameters.insert(Util::ParamMap::value_type("MINTIMESTEPSBP", Util::Param("MINTIMESTEPSBP", 10)));
575  parameters.insert(Util::ParamMap::value_type("NLMIN", Util::Param("NLMIN", 3)));
576  parameters.insert(Util::ParamMap::value_type("NLMAX", Util::Param("NLMAX", 8)));
577  parameters.insert(Util::ParamMap::value_type("DELMAX", Util::Param("DELMAX", 1.0e+99)));
578  parameters.insert(Util::ParamMap::value_type("TIMESTEPSREVERSAL", Util::Param("TIMESTEPSREVERSAL", false)));
579  }
580 
581  {
582  Util::ParamMap &parameters = options_manager.addOptionsMetadataMap("MPDEINT");
583 
584  parameters.insert(Util::ParamMap::value_type("AUTON2", Util::Param("AUTON2", false)));
585  parameters.insert(Util::ParamMap::value_type("AUTON2MAX", Util::Param("AUTON2MAX", 100)));
586  parameters.insert(Util::ParamMap::value_type("DCOPEXIT", Util::Param("DCOPEXIT", 0)));
587  parameters.insert(Util::ParamMap::value_type("DEBUGLEVEL", Util::Param("DEBUGLEVEL", 0)));
588  parameters.insert(Util::ParamMap::value_type("DIFF", Util::Param("DIFF", 0)));
589  parameters.insert(Util::ParamMap::value_type("DIFFORDER", Util::Param("DIFFORDER", 1)));
590  parameters.insert(Util::ParamMap::value_type("EXITSAWTOOTHSTEP", Util::Param("EXITSAWTOOTHSTEP", -1)));
591  parameters.insert(Util::ParamMap::value_type("FREQDOMAIN", Util::Param("FREQDOMAIN", 0)));
592  parameters.insert(Util::ParamMap::value_type("IC", Util::Param("IC", 0)));
593  parameters.insert(Util::ParamMap::value_type("ICEXIT", Util::Param("ICEXIT", 0)));
594  parameters.insert(Util::ParamMap::value_type("ICPER", Util::Param("ICPER", 10)));
595  parameters.insert(Util::ParamMap::value_type("N2", Util::Param("N2", 10)));
596  parameters.insert(Util::ParamMap::value_type("NONLTESTEPS", Util::Param("NONLTESTEPS", 10)));
597  parameters.insert(Util::ParamMap::value_type("OSCOUT", Util::Param("OSCOUT", "")));
598  parameters.insert(Util::ParamMap::value_type("OSCSRC", Util::Param("OSCSRC", "VECTOR")));
599  parameters.insert(Util::ParamMap::value_type("PHASE", Util::Param("PHASE", 0)));
600  parameters.insert(Util::ParamMap::value_type("PHASECOEFF", Util::Param("PHASECOEFF", 0)));
601  parameters.insert(Util::ParamMap::value_type("SAVEICDATA", Util::Param("SAVEICDATA", false)));
602  parameters.insert(Util::ParamMap::value_type("STARTUPPERIODS", Util::Param("STARTUPPERIODS", 0)));
603  parameters.insert(Util::ParamMap::value_type("T2", Util::Param("T2", 0.0)));
604  parameters.insert(Util::ParamMap::value_type("TEST", Util::Param("TEST", 0)));
605  parameters.insert(Util::ParamMap::value_type("WAMPDE", Util::Param("WAMPDE", 0)));
606  }
607 }
608 
609 } // namespace <unnamed>
610 
611 bool
613  FactoryBlock & factory_block)
614 {
615  MPDEFactory *factory = new MPDEFactory(factory_block.analysisManager_, factory_block.linearSystem_, factory_block.nonlinearManager_, factory_block.loader_, factory_block.deviceManager_, factory_block.builder_, factory_block.topology_, factory_block.initialConditionsManager_, factory_block.restartManager_);
616 
617  addAnalysisFactory(factory_block, factory);
618 
619  populateMetadata(factory_block.optionsManager_);
620 
621  factory_block.optionsManager_.addCommandParser(".MPDE", extractMPDEData);
622 
623  factory_block.optionsManager_.addCommandProcessor("MPDE", new MPDEAnalysisReg(*factory));
624 
625  factory_block.optionsManager_.addOptionsProcessor("MPDEINT", IO::createRegistrationOptions(*factory, &MPDEFactory::setMPDEIntOptionBlock));
626  factory_block.optionsManager_.addOptionsProcessor("TIMEINT-MPDE", IO::createRegistrationOptions(*factory, &MPDEFactory::setMPDETimeIntegratorOptionBlock));
627 
628  return true;
629 }
630 
631 } // namespace Analysis
632 } // namespace Xyce
bool doProcessSuccessfulStep()
Definition: N_ANP_MPDE.C:200
Pure virtual class to augment a linear system.
MPDEFactory & factory_
Definition: N_ANP_MPDE.C:456
Device::DeviceMgr & deviceManager_
Definition: N_ANP_MPDE.C:425
Util::ListenerAutoSubscribe< StepEvent > StepEventListener
void notify(const StepEvent &event)
Definition: N_ANP_MPDE.C:89
Topo::Topology & topology_
Definition: N_ANP_MPDE.C:427
Util::OptionBlock mpdeIntOptionBlock_
Definition: N_ANP_MPDE.C:433
Nonlinear::Manager & nonlinearManager_
Definition: N_ANP_MPDE.h:119
Linear::System & linearSystem_
Definition: N_ANP_MPDE.h:118
Topo::Topology & topology_
Definition: N_ANP_MPDE.h:120
Util::OptionBlock mpdeTimeIntegratorOptionBlock_
Definition: N_ANP_MPDE.C:434
The FactoryBlock contains parameters needed by the analysis creation functions.
IO::InitialConditionsManager & initialConditionsManager_
bool registerMPDEFactory(FactoryBlock &factory_block)
Definition: N_ANP_MPDE.C:612
Linear::System & linearSystem_
Definition: N_ANP_MPDE.C:422
Util::OptionBlock timeIntegratorOptionBlock_
Definition: N_ANP_MPDE.C:435
Linear::Builder & builder_
Definition: N_ANP_MPDE.C:426
MPDE(AnalysisManager &analysis_manager, Linear::System &linear_system, Nonlinear::Manager &nonlinear_manager, Loader::Loader &loader, Device::DeviceMgr &device_manager, Linear::Builder &builder, Topo::Topology &topology, IO::InitialConditionsManager &initial_conditions_manager, IO::RestartMgr &restart_manager)
Definition: N_ANP_MPDE.C:69
Loader::Loader & loader_
Definition: N_ANP_MPDE.C:424
Nonlinear::Manager & nonlinearManager_
Definition: N_ANP_MPDE.C:423
IO::RestartMgr & restartManager_
Definition: N_ANP_MPDE.C:429
Nonlinear::Manager & nonlinearManager_
const TimeIntg::TIAParams & getTIAParams() const
Definition: N_ANP_MPDE.C:111
void addAnalysisFactory(FactoryBlock &factory_block, Util::Factory< AnalysisBase, void > *factory)
IO::InitialConditionsManager & initialConditionsManager_
Definition: N_ANP_MPDE.C:428
bool processSuccessfulDCOP()
Definition: N_ANP_MPDE.C:187
AnalysisManager & analysisManager_
Definition: N_ANP_MPDE.C:421
Util::OptionBlock mpdeAnalysisOptionBlock_
Definition: N_ANP_MPDE.C:432
N_MPDE_Manager * mpdeManager_
Definition: N_ANP_MPDE.h:121
bool doProcessFailedStep()
Definition: N_ANP_MPDE.C:213
bool getDCOPFlag() const
Definition: N_ANP_MPDE.C:130