Xyce  6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
N_DEV_DeviceMgr.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // Copyright Notice
3 //
4 // Copyright 2002 Sandia Corporation. Under the terms
5 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
6 // Government retains certain rights in this software.
7 //
8 // Xyce(TM) Parallel Electrical Simulator
9 // Copyright (C) 2002-2014 Sandia Corporation
10 //
11 // This program is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation, either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 //-----------------------------------------------------------------------------
24 
25 //-----------------------------------------------------------------------------
26 // Filename : $RCSfile: N_DEV_DeviceMgr.h,v $
27 //
28 // Purpose :
29 //
30 // Special Notes :
31 //
32 // Creator : Eric R. Keiter, SNL, Parallel Computational Sciences
33 //
34 // Creation Date : 02/28/00
35 //
36 // Revision Information:
37 // ---------------------
38 //
39 // Revision Number: $Revision: 1.350.2.1 $
40 //
41 // Revision Date : $Date: 2014/02/26 20:16:30 $
42 //
43 // Current Owner : $Author: tvrusso $
44 //-----------------------------------------------------------------------------
45 
46 #ifndef Xyce_N_DEV_DeviceMgr_h
47 #define Xyce_N_DEV_DeviceMgr_h
48 
49 #include <map>
50 #include <set>
51 #include <string>
52 #include <vector>
53 
54 #include <N_DEV_fwd.h>
55 #include <N_IO_fwd.h>
56 #include <N_UTL_fwd.h>
57 #include <N_ANP_fwd.h>
58 
59 #include <N_DEV_DeviceOptions.h>
60 #include <N_DEV_DeviceSupport.h>
61 #include <N_DEV_ExternData.h>
62 #include <N_DEV_MatrixLoadData.h>
63 #include <N_DEV_Pars.h>
64 #include <N_DEV_SolverState.h>
65 #include <N_IO_PkgOptionsMgr.h>
66 
67 class N_LAS_Matrix;
68 class N_LAS_System;
69 class N_LAS_Vector;
70 class N_NLS_Manager;
71 class N_PDS_Manager;
73 
74 namespace Xyce {
75 namespace Device {
76 
77 void setupIOName(const std::string & name, std::string & outputName);
78 
79 //-----------------------------------------------------------------------------
80 // Class : DeviceMgr
81 // Purpose :
82 // Special Notes :
83 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
84 // Creation Date : 3/16/00
85 //-----------------------------------------------------------------------------
86 class DeviceMgr
87 {
88 public:
89  typedef std::vector<Device *> DeviceVector;
90  typedef std::vector<DeviceInstance *> InstanceVector;
91  typedef std::vector<DeviceModel *> ModelVector;
92  typedef std::map<std::string, DeviceEntity *, LessNoCase> DeviceEntityMap;
93  typedef std::map<std::string, ModelTypeId, LessNoCase> ModelTypeNameModelTypeIdMap;
94 
95  static DeviceMgr * factory(IO::CmdParse & cp);
96 
97 private:
98  DeviceMgr(IO::CmdParse & cp); ///< Only the factory can create a device manager
99 
100  DeviceMgr(const DeviceMgr &); ///< No copying
101  DeviceMgr &operator=(const DeviceMgr &); ///< No assignment
102 
103 public:
104  ~DeviceMgr();
105 
106  // registration functions:
107  bool registerLinearSystem(N_LAS_System * tmp_system_ptr);
108 
110 
111  bool registerOutputMgr (IO::OutputMgr * tmp_outputMgrPtr);
112 
113  bool registerParallelMgr(N_PDS_Manager * tmp_pdsMgrPtr);
114 
115  bool registerNonlinearSolver (N_NLS_Manager * tmp_nlsMgrPtr);
116 
117  bool registerICLoads( std::vector<std::pair<int,double> > * icLoads );
118 
119  bool registerPkgOptionsMgr( IO::PkgOptionsMgr *pkgOptPtr );
120 
121  // this function is called from the output manager (through the
122  // device interface) to inform the device package of the devices for
123  // which lead currents have been requested. The device manager will
124  // take care of doing isolated F and Q loads for these devices so
125  // the lead currents can be calculated
126  bool setLeadCurrentRequests(const std::set<std::string> & deviceNames );
127 
128  // MPDE related registrations:
129  std::vector<double> getFastSourcePeriod (std::vector<std::string>& sourceNames);
130  std::vector<double> registerFastSources (std::vector<std::string> & sourceNames);
131  void deRegisterFastSources (std::vector<std::string> & sourceNames);
132  void deactivateSlowSources();
133  void activateSlowSources();
134 
135  void setMPDEFlag( bool flagVal );
136  void setBlockAnalysisFlag( bool flagVal );
137  void setFastTime( double timeVal );
138 
139  // Initialization function, to be called after all registrations are
140  // finished, and the linear system class is completely set up.
141  bool initializeAll();
142 
143  void resetForStepAnalysis ();
144 
145  // Device accessor functions:
146 
147  bool addDeviceModel(const ModelBlock & MB);
148 
150 
152 
153  bool deleteDeviceInstance (const std::string & name);
154 
155  int getHomotopyBlockSize() const;
156 
157  // void printOutLists();
158 
159  bool output ();
160  bool finishOutput ();
161 
162  void dotOpOutput ();
163 
164  // Load functions:
165  bool setInitialGuess (N_LAS_Vector * solVectorPtr);
166  bool loadDeviceMask();
167 
168  void debugOutput1();
169  void debugOutput2();
170 
171  bool setParam(std::string & name, double val);
172  double getParamAndReduce(const std::string & name);
173  bool getParamAndReduce(const std::string & name, double & val);
174  double getParamNoReduce(const std::string & name) const;
175  bool findParam(const std::string & name) const;
176  bool getVsrcLIDs (std::string & srcName, int & li_Pos, int & li_Neg, int & li_Bra);
177 
178  bool updateTemperature (double val);
179 
180  bool updateSources();
181 
183  {
184  return deviceMap_;
185  }
186 
187  bool resetRHSLoadFlags (int index);
188 
190  {
191  return *devSensPtr_;
192  }
193 
194  const N_NLS_Manager &getNlsMgrPtr() const
195  {
196  return *nlsMgrPtr_;
197  }
198 
199  bool getLinearSystemFlag ();
200  bool getVoltageLimiterFlag ();
201  bool getPDESystemFlag ();
202 
203  // setup initial conditions on devices
204  bool setICs (N_LAS_Vector * tmpSolVectorPtr,
205  N_LAS_Vector * tmpCurrSolVectorPtr,
206  N_LAS_Vector * tmpLastSolVectorPtr,
207  N_LAS_Vector * tmpStaVectorPtr,
208  N_LAS_Vector * tmpCurrStaVectorPtr,
209  N_LAS_Vector * tmpLasStaVectorPtr,
210  N_LAS_Vector * tmpStaDerivVectorPtr,
211  N_LAS_Vector * tmpStoVectorPtr,
212  N_LAS_Vector * tmpCurrStoVectorPtr,
213  N_LAS_Vector * tmpLastStoVectorPtr,
214  N_LAS_Vector * tmpQVectorPtr,
215  N_LAS_Vector * tmpFVectorPtr,
216  N_LAS_Vector * tmpdFdxdVpVectorPtr,
217  N_LAS_Vector * tmpdQdxdVpVectorPtr);
218 
219  // Testing functions
220  bool runParameterTests (std::string & deviceName);
221 
222  // time integration stuff:
223  bool getBreakPoints ( std::vector<Util::BreakPoint> & breakPointTimes );
224  double getMaxTimeStepSize ();
226 
227  // Used by mixed signal:
228  bool getDACDeviceNames(std::vector<std::string> & dacNames);
229  bool getADCMap(std::map<std::string,std::map<std::string,double> >& ADCMap);
231  std::map<std::string,std::vector<std::pair<double,double> >* > const & timeVoltageUpdateMap);
232  bool getTimeVoltagePairs(
233  std::map<std::string,std::vector<std::pair<double,double> > > & timeVoltageUpdateMap);
234 
235  bool setADCWidths(std::map<std::string,int> const & ADCWidthMap);
236 
237  // Generic API calls (so far used only by Xygra interface)
238  bool getDeviceNames(const std::string & model_type_name, std::vector<std::string> & deviceNames);
239 
240  int xygraGetNumNodes (const std::string & deviceName);
241  int xygraGetNumWindings (const std::string & deviceName);
242  void xygraGetCoilWindings (const std::string & deviceName,
243  std::vector<int> & cW);
244  void xygraGetCoilNames (const std::string & deviceName,
245  std::vector<std::string> & cN);
246  bool xygraSetConductances (const std::string & deviceName,
247  const std::vector<std::vector<double> > &cM );
248  bool xygraSetSources (const std::string & deviceName,
249  const std::vector<double> &sV,
250  const double t=0);
251  bool xygraSetK (const std::string & deviceName,
252  const std::vector<std::vector<double> > &kM,
253  const double t=0);
254  bool xygraGetVoltages (const std::string & deviceName,
255  std::vector<double> & vN );
256 
257  // two-level newton and pde-continuation
258  int enablePDEContinuation ();
259  bool disablePDEContinuation ();
260  void getNumInterfaceNodes (std::vector<int> & numInterfaceNodes);
261  bool loadCouplingRHS (int iPDEDevice, int iElectrode, N_LAS_Vector * dfdvPtr);
262  bool calcCouplingTerms (int iSubProblem, int iElectrode, const N_LAS_Vector * dxdvPtr);
263  bool raiseDebugLevel (int increment);
264 
265  bool calcPDESubProblemInfo ();
266 
267  // load functions:
268  bool loadDAEMatrices (N_LAS_Vector * tmpSolVectorPtr,
269  N_LAS_Vector * tmpStaVectorPtr,
270  N_LAS_Vector * tmpStaDerivVectorPtr,
271  N_LAS_Vector * tmpStoVectorPtr,
272  N_LAS_Matrix * tmpdQdxMatrixPtr,
273  N_LAS_Matrix * tmpdFdxMatrixPtr);
274 
275  bool loadDAEVectors (N_LAS_Vector * tmpNextSolVectorPtr,
276  N_LAS_Vector * tmpCurrSolVectorPtr,
277  N_LAS_Vector * tmpLastSolVectorPtr,
278  N_LAS_Vector * tmpNextStaVectorPtr,
279  N_LAS_Vector * tmpCurrStaVectorPtr,
280  N_LAS_Vector * tmpLastStaVectorPtr,
281  N_LAS_Vector * tmpStaDerivVectorPtr,
282  N_LAS_Vector * tmpNextStoVectorPtr,
283  N_LAS_Vector * tmpCurrStoVectorPtr,
284  N_LAS_Vector * tmpLastStoVectorPtr,
285  N_LAS_Vector * tmpStoLeadCurrQCompVectorPtr,
286  N_LAS_Vector * tmpQVectorPtr,
287  N_LAS_Vector * tmpFVectorPtr,
288  N_LAS_Vector * tmpdFdxdVpVectorPtr,
289  N_LAS_Vector * tmpdQdxdVpVectorPtr);
290 
291  bool updateState (N_LAS_Vector * nextSolVectorPtr,
292  N_LAS_Vector * currSolVectorPtr,
293  N_LAS_Vector * lastSolVectorPtr,
294  N_LAS_Vector * nextStaVectorPtr,
295  N_LAS_Vector * currStaVectorPtr,
296  N_LAS_Vector * lastStaVectorPtr,
297  N_LAS_Vector * nextStoVectorPtr,
298  N_LAS_Vector * currStoVectorPtr,
299  N_LAS_Vector * lastStoVectorPtr
300  );
301 
302  bool loadBVectorsforAC (N_LAS_Vector * bVecRealPtr,
303  N_LAS_Vector * bVecImagPtr);
304 
305  bool getBMatrixEntriesforMOR(std::vector<int>& bMatEntriesVec, std::vector<int>& bMatPosEntriesVec);
306 
307  // voltlim doesn't work with MPDE, but does work for DCOP and the
308  // various initial conditions used in MPDE. Hence the need for these
309  // functions.
310  // void setVoltageLimiterFlag ();
311  void unsetVoltageLimiterFlag ();
312 
313  void setVoltageLimiterFlag ( bool flagVal );
314 
315  void addGlobalPar(Util::Param &);
316  const double *findGlobalPar( const std::string & parName) const;
317  double getGlobalPar( const std::string & parName ) const;
318 
319 
320  // structs related to options registration
321  struct DeviceMgr_OptionsReg : public IO::PkgOptionsReg
322  {
324 
325  bool operator()(const Util::OptionBlock & options)
326  {return devMgr->registerOptions(options);}
327 
329  };
330 
331  struct DeviceMgr_SensOptionsReg : public IO::PkgOptionsReg
332  {
334 
335  bool operator()(const Util::OptionBlock & options)
336  {return devMgr->registerSensParams(options);}
337 
339  };
340 
341  struct DeviceMgr_TimeOptionsReg : public IO::PkgOptionsReg
342  {
344 
345  bool operator()(const Util::OptionBlock & options)
346  {return devMgr->registerTimeOptions(options);}
347 
349  };
350 
351  // .TRAN
352  struct DeviceMgr_TransAnalysisReg : public IO::PkgOptionsReg
353  {
355 
356  bool operator()(const Util::OptionBlock & options)
357  {return Mgr->setTranAnalysisParams(options);}
358 
360  };
361 
362  // .DC
363  struct DeviceMgr_DCAnalysisReg : public IO::PkgOptionsReg
364  {
366 
367  bool operator()(const Util::OptionBlock & options)
368  {return Mgr->setDCAnalysisParams(options);}
369 
371  };
372 
373  // .OP
374  struct DeviceMgr_OPAnalysisReg : public IO::PkgOptionsReg
375  {
377 
378  bool operator()(const Util::OptionBlock & options)
379  {return Mgr->setOPAnalysisParams(options);}
380 
382  };
383 
384  // .STEP
385  struct DeviceMgr_STEPAnalysisReg : public IO::PkgOptionsReg
386  {
388 
389  bool operator()(const Util::OptionBlock & options)
390  {return Mgr->setSTEPAnalysisParams(options);}
391 
393  };
394 
395  // .MPDE
396  struct DeviceMgr_MPDE_AnalysisReg : public IO::PkgOptionsReg
397  {
399 
400  bool operator()(const Util::OptionBlock & options)
401  {return devMgr_->setMPDEAnalysisParams(options);}
402 
404  };
405 
406  // .HB
407  struct DeviceMgr_HB_AnalysisReg : public IO::PkgOptionsReg
408  {
410 
411  bool operator()(const Util::OptionBlock & options)
412  {return devMgr_->setHBAnalysisParams(options);}
413 
415  };
416 
417  // .AC
418  struct DeviceMgr_AC_AnalysisReg : public IO::PkgOptionsReg
419  {
421 
422  bool operator()(const Util::OptionBlock & options)
423  {return devMgr_->setACAnalysisParams(options);}
424 
426  };
427 
428  // .MOR
429  struct DeviceMgr_MOR_AnalysisReg : public IO::PkgOptionsReg
430  {
432 
433  bool operator()(const Util::OptionBlock & options)
434  {return devMgr_->setMORAnalysisParams(options);}
435 
437  };
438 
439  // functions related to options registration
440  bool registerOptions(const Util::OptionBlock & OB) {
441  bool result = devOptions_.registerOptions(OB);
443  return result;
444  }
445  bool registerSensParams(const Util::OptionBlock & OB);
446  bool registerTimeOptions(const Util::OptionBlock & OB){return true;}
447  bool setTranAnalysisParams(const Util::OptionBlock & OB);
448  bool setDCAnalysisParams(const Util::OptionBlock & OB);
449  bool setOPAnalysisParams(const Util::OptionBlock & OB);
450  bool setSTEPAnalysisParams(const Util::OptionBlock & OB);
451  bool setMPDEAnalysisParams(const Util::OptionBlock & OB);
452  bool setHBAnalysisParams(const Util::OptionBlock & OB);
453  bool setACAnalysisParams(const Util::OptionBlock & OB);
454  bool setMORAnalysisParams(const Util::OptionBlock & OB);
455 
456  // convergence: allow devices to signal back to the solvers that
457  // they've played some game that invalidates normal convergence tests,
458  // and so the solution should be considered unconverged no matter how
459  // small the various norms are.
460  bool allDevsConverged();
461 
462  // Similar to allDevsConverged, but specific to "inner" devices of
463  // 2-level solves. They are handled slightly differently.
464  bool innerDevsConverged();
465 
466  // Functions needed for power node (2-level) algorithm):
467 #ifdef Xyce_EXTDEV
468  // for the parallel case, we need to give all the processors a copy
469  // of the device so all the parallel synchronized calls such are
470  // called by all processors together.
471  bool setupExternalDevices();
472 #endif
473 
474  const std::map<std::string,int> &getDeviceCountMap() {
475  return localDeviceCountMap_;
476  }
477 
478  void addDeviceToCount(const std::string & device_name)
479  {
480  localDeviceCountMap_[device_name]++;
481  }
482 
483  void addDeviceEntity(const std::string &param, DeviceEntity *entity)
484  {
485  nameDevEntityMap_[param] = entity;
486  }
487 
488  DeviceEntity *getDeviceEntity(const std::string &param) const;
489 
491  (const std::vector<std::string> & paramNames,
492  const std::vector<double> & paramVals);
493 
494  void homotopyStepFailure ();
495 
496  void stepSuccess (int analysis);
497  void stepFailure (int analysis);
498 
499  void acceptStep();
500 
501  bool getInitialQnorm (std::vector<N_TIA_TwoLevelError> & tleVec );
502  bool getInnerLoopErrorSums (std::vector<N_TIA_TwoLevelError> & tleVec);
503 
504  bool updateStateArrays();
505  bool startTimeStep ();
506  void setExternalSolverState (const SolverState & ss);
507 
508  int restartDataSize(bool pack);
509 
510  // Output restart data.
511  bool dumpRestartData(char * buf, int bsize, int & pos, N_PDS_Comm * comm, bool pack );
512 
513  // Load restart data.
514  bool restoreRestartData(char * buf, int bsize, int & pos, N_PDS_Comm * comm, bool pack );
515 
516 private:
517  Device *getDevice(EntityTypeId model_type_id)
518  {
519  EntityTypeIdDeviceMap::iterator it = deviceMap_.find(model_type_id);
520  return it == deviceMap_.end() ? 0 : (*it).second;
521  }
522 
523  Device &getDeviceByModelType(const EntityTypeId model_type);
524  EntityTypeId getModelGroup(const std::string &device_type_name);
525 
526  bool setupSolverInfo_ ();
527  bool setupRawVectorPointers_ ();
528  bool setupRawMatrixPointers_ ();
529 
530 
531 #ifdef Xyce_EXTDEV
532  void setUpPassThroughParamsMap_();
533 #endif
534 
536  bool updatePrimaryState_();
537  bool updateSecondaryState_();
538 
540 
541 #ifdef Xyce_EXTDEV
542  // Do the actual solve/calculation for the external devices
543  void updateExternalDevices_();
544  // add external devices for processors that don't own it
545  ExternDevice::Instance * addExtDeviceInstance_(InstanceBlock & IB);
546 #endif
547 
548  Xygra::Instance * getXygraInstancePtr_(const std::string & deviceName);
549 
550  // attributes:
551 
552 private:
553  IO::CmdParse & commandLine_; ///< Command line
554 
555  // user-defined options:
557 
559 
560  DeviceSupport devSupport; // doesn't appear to be used in the code at all.
561  // an object owned by DeviceInstance looks like it's
562  // used in all cases.
563 
565  bool sensFlag_;
567 
569 
571 
574 
576 
578 
580 
581  N_LAS_Vector * numJacSolVectorPtr_;
582  N_LAS_Vector * numJacStaVectorPtr_;
583  N_LAS_Vector * numJacStoVectorPtr_;
584 
585  N_LAS_Vector * diagonalVectorPtr_;
586 
587  N_LAS_System * lasSysPtr_;
588 
590 
591  IO::OutputMgr * outputMgrPtr_;
592 
593  N_PDS_Manager * pdsMgrPtr_;
594 
596 
598 
599  IO::PkgOptionsMgr *pkgOptMgrPtr_;
600 
601  std::vector< std::pair<int,double> > * icLoads_;
602 
603  ModelTypeNameModelTypeIdMap modelTypeMap_; ///< Model type name to model
604  ModelTypeNameModelTypeIdMap modelGroupMap_; ///< Model type name to model group
605 
606  std::map<std::string,int> localDeviceCountMap_;
607 
608  std::map<std::string, Xygra::Instance *> xygraPtrMap_;
609 
610  std::multimap<int,DeviceInstance *> solDevInstMap_;
611 
615 
617  InstanceVector bpInstancePtrVec_; // instances with breakpoints functions
623  std::map<std::string, Vsrc::Instance *> vsrcInstancePtrMap_;
624 
626 
627  std::map<std::string,SourceInstance *> indepSourcePtrMap_;
628  std::vector<SourceInstance *> indepSourceInstancePtrVec_;
629 
630  // this is used to store the contents of the indepSourceInstancePtrVec_
631  // during an mpde initialization where we'll remove slow sources from
632  // the that vector so that they don't get updated
633  std::vector<SourceInstance *> indepSourceInstanceBackupPtrVec_;
634 
635  std::set<std::string> devicesNeedingLeadCurrentLoads_;
636 
637 #ifdef Xyce_EXTDEV
638  std::vector<ExternDevice::Instance *> extDevInstancePtrVec_;
639  std::vector<InstanceBlock *> extDevIBPtrVec_;
640 
641  std::map<std::string, int> passThroughParamsMap_;
642 #endif
643 
645 
646  // vector of pointers to devices under test.
648 
656 
657  std::vector<DeviceEntity *> dependentPtrVec_;
658 
659  std::vector<int> numInterfaceNodes_;
662 
665 
666  // real time solver data:
670 
671  // sensitivities:
673 
674  // MPDE fast source list
675  std::vector<std::string> fastSourceNames_;
676 
677  // Device mask flag:
679 
680  // .OP output flags.
682 
683  // temporary jacobian load structures:
685 
686  // solution variable names vector:
687  std::vector<std::string> nameVec_;
688 
689 public:
690  // needed for parallel only:
691  void setGlobalFlags ();
692 
694  {
695  return setupSolverInfo_();
696  }
697 };
698 
699 //-----------------------------------------------------------------------------
700 // Function : DeviceMgr::registerLinearSystem
701 // Purpose :
702 // Special Notes :
703 // Scope : public
704 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
705 // Creation Date : 4/13/00
706 //-----------------------------------------------------------------------------
707 inline bool DeviceMgr::registerLinearSystem (N_LAS_System * tmp_system_ptr)
708 {
709  lasSysPtr_ = tmp_system_ptr;
710 
711  if (lasSysPtr_ != 0) return true;
712  else return false;
713 }
714 
715 //-----------------------------------------------------------------------------
716 // Function : DeviceMgr::registerAnalysisInterface
717 // Purpose :
718 // Special Notes :
719 // Scope : public
720 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
721 // Creation Date : 3/16/00
722 //-----------------------------------------------------------------------------
724 {
725  anaIntPtr_ = tmp_anaIntPtr;
726 
727  if (anaIntPtr_ != 0) return true;
728  else return false;
729 }
730 
731 //-----------------------------------------------------------------------------
732 // Function : DeviceMgr::registerOutputMgr
733 // Purpose :
734 // Special Notes :
735 // Scope : public
736 // Creator : Dave Shirley, PSSI
737 // Creation Date : 8/15/06
738 //-----------------------------------------------------------------------------
739 inline bool DeviceMgr::registerOutputMgr (IO::OutputMgr * tmp_outputMgrPtr)
740 {
741  outputMgrPtr_ = tmp_outputMgrPtr;
742 
743  if (outputMgrPtr_ != 0) return true;
744  else return false;
745 }
746 
747 //-----------------------------------------------------------------------------
748 // Function : DeviceMgr::registerParallelMgr
749 // Purpose :
750 // Special Notes :
751 // Scope : public
752 // Creator : Robert Hoekstra, SNL, Parallel Computational Sciences
753 // Creation Date : 6/29/01
754 //-----------------------------------------------------------------------------
755 inline bool DeviceMgr::registerParallelMgr (N_PDS_Manager * tmp_pdsMgrPtr )
756 {
757  pdsMgrPtr_ = tmp_pdsMgrPtr;
758 
759  if (pdsMgrPtr_ != 0 ) return true;
760  else return false;
761 }
762 
763 //-----------------------------------------------------------------------------
764 // Function : DeviceMgr::registerNonlinearSolver
765 // Purpose :
766 // Special Notes :
767 // Scope : public
768 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
769 // Creation Date : 2/23/01
770 //-----------------------------------------------------------------------------
772 {
773  nlsMgrPtr_ = tmp_nlsMgrPtr;
774 
775  if (nlsMgrPtr_ != 0) return true;
776  else return false;
777 }
778 
779 //-----------------------------------------------------------------------------
780 // Function : DeviceMgr::setVoltageLimiterFlag ()
781 // Purpose :
782 // Special Notes :
783 // Scope : public
784 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
785 // Creation Date : 04/09/04
786 //-----------------------------------------------------------------------------
787 //inline void DeviceMgr::setVoltageLimiterFlag ()
788 //{
789 // devOptions_.voltageLimiterFlag = true;
790 //}
791 
792 //-----------------------------------------------------------------------------
793 // Function : DeviceMgr::unsetVoltageLimiterFlag ()
794 // Purpose :
795 // Special Notes :
796 // Scope : public
797 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
798 // Creation Date : 04/09/04
799 //-----------------------------------------------------------------------------
801 {
803 }
804 
805 //-----------------------------------------------------------------------------
806 // Function : DeviceMgr::setVoltageLimiterFlag ()
807 // Purpose :
808 // Special Notes :
809 // Scope : public
810 // Creator : Ting Mei, SNL
811 // Creation Date : 02/18/14
812 //-----------------------------------------------------------------------------
813 inline void DeviceMgr::setVoltageLimiterFlag ( bool flagVal )
814 {
816 }
817 
818 //-----------------------------------------------------------------------------
819 // Function : DeviceMgr::registerICLoads
820 // Purpose :
821 // Special Notes :
822 // Scope : public
823 // Creator : Robert Hoekstra, SNL, Computational Sciences
824 // Creation Date : 04/03/01
825 //-----------------------------------------------------------------------------
826 inline bool DeviceMgr::registerICLoads( std::vector< std::pair<int,double> > * icLoads )
827 {
828  return (icLoads_ = icLoads) != 0;
829 }
830 
831 } // namespace Device
832 } // namespace Xyce
833 
835 
836 #endif // Xyce_N_DEV_DeviceMgr_h