Xyce  6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
N_DEV_DeviceMaster.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_DeviceMaster.h,v $
27 //
28 // Purpose : Provides templated versions of some boilerplate functions
29 // that are device-specific (so they can't easily be included
30 // in the base device, instance, or model classes).
31 //
32 // Special Notes : Much of the functionality of the device classes, like
33 // N_DEV_Capacitor, is simply to manage STL containers
34 // of model and instance pointers. That management is pretty
35 // generic, so templating that functionality makes sense.
36 //
37 // Creator : Eric R. Keiter, SNL, Parallel Computational Sciences
38 //
39 // Creation Date : 01/31/06
40 //
41 // Revision Information:
42 // ---------------------
43 //
44 // Revision Number: $Revision: 1.3.2.2 $
45 //
46 // Revision Date : $Date: 2014/03/03 18:29:27 $
47 //
48 // Current Owner : $Author: tvrusso $
49 //-------------------------------------------------------------------------
50 
51 #ifndef Xyce_N_DEV_Device_Template_h
52 #define Xyce_N_DEV_Device_Template_h
53 
54 #include <map>
55 #include <string>
56 #include <vector>
57 
58 #include <N_DEV_Device.h>
59 #include <N_DEV_DeviceBlock.h>
60 
61 namespace Xyce {
62 namespace Device {
63 
64 void duplicate_entity_warning(const DeviceEntity &entity);
65 void instance_must_reference_model_error(const Device &device, const std::string &name, const std::string &netlist_path, int line_number);
66 void could_not_find_model(const Device &device, const std::string &model_name, const std::string &instance_name, const std::string &netlist_path, int line_number);
67 void duplicate_model_warning(const Device &device, const std::string &model_name, const std::string &netlist_path, int line_number);
68 
69 //-----------------------------------------------------------------------------
70 // Class : DeviceMaster
71 //
72 // Purpose : This class contains a lot of boilerplate functions, such
73 // as addInstance, factory_block, which are needed by every device. However,
74 // as functions of this nature are device-specific, they
75 // didn't naturally fit as base class Device functions.
76 //
77 // This class is a template, which takes 2 typenames;
78 // model, instance and model-ptr STL vector. A specific
79 // example of these would be CapacitorModel and
80 // CapacitorInstance
81 //
82 // Each derived device class will need to set up its own
83 // version of this template.
84 //
85 // Special Notes :
86 // Creator : Eric Keiter, SNL
87 // Creation Date : 1/31/06
88 //-----------------------------------------------------------------------------
89 
90 /**
91  * DeviceMaster instantiates a device as described by the device traits T.
92  *
93  * The Device Traits are described in in the device configuration.
94  *
95  * @see Xyce::Device::Configuration
96  *
97  * @param T device traits class
98  *
99  * @author David G. Baur Raytheon Sandia National Laboratories 1355
100  * @date Tue Feb 4 10:33:44 2014
101  */
102 template<class T>
103 class DeviceMaster : public Device
104 {
105 public:
106  typedef typename T::ModelType ModelType; ///< Make the model begin defined available
107  typedef typename T::InstanceType InstanceType; ///< Make the instance being define available
108 
109 protected:
110  typedef std::vector<InstanceType *> InstanceVector;
111  typedef std::map<std::string, ModelType *, LessNoCase> ModelMap ;
112  typedef std::map<std::string, DeviceEntity *, LessNoCase> EntityMap;
113 
114 public:
115  /**
116  * Constructs a device
117  *
118  * When a device is constructed, a default model is created.
119  *
120  * @param configuration const reference to device configuration
121  * @param factory_block const reference to the factory provided parameters
122  * @param solver_state const reference to the solver state to use for the device
123  * @param device_options const reference to the device options to use for the device
124  *
125  * @author David G. Baur Raytheon Sandia National Laboratories 1355
126  * @date Tue Feb 4 10:20:40 2014
127  */
129  const Configuration & configuration,
130  const FactoryBlock & factory_block,
131  const SolverState & solver_state,
132  const DeviceOptions & device_options)
133  : Device(),
134  deviceName_(T::name()),
135  defaultModelName_(std::string(T::deviceTypeName()) + " (" + T::name() + ")"),
136  configuration_(configuration),
137  deviceOptions_(device_options),
138  solverState_(solver_state),
139  modelMap_(),
140  instanceVector_(),
141  entityMap_(),
143  {
144  // add default model to the model list.
146  }
147 
148  /**
149  * Constructs a device
150  *
151  * When a device is constructed, a default model is created.
152  *
153  * @param configuration const reference to the device configuration
154  * @param model_type_name const reference to the model type name inserted into the ModelBlock when creating the default model
155  * @param factory_block const reference to the factory provided parameters
156  * @param solver_state const reference to the solver state to use for the device
157  * @param device_options const reference to the device options to use for the device
158  *
159  * @author David G. Baur Raytheon Sandia National Laboratories 1355
160  * @date Tue Feb 4 10:22:41 2014
161  */
163  const std::string & model_type_name,
164  const Configuration & configuration,
165  const FactoryBlock & factory_block,
166  const SolverState & solver_state,
167  const DeviceOptions & device_options)
168  : Device(),
169  deviceName_(T::name()),
170  defaultModelName_(std::string(T::deviceTypeName()) + " (" + T::name() + ")"),
171  configuration_(configuration),
172  deviceOptions_(device_options),
173  solverState_(solver_state),
174  modelMap_(),
175  instanceVector_(),
176  entityMap_(),
177  defaultModel_(new ModelType(configuration_, ModelBlock(defaultModelName_, model_type_name), factory_block))
178  {
179  // add default model to the model list.
181  }
182 
183  /**
184  * Destroys the device
185  *
186  * Delete the models created by this device. The model will handle deleting the instances.
187  *
188  * @return
189  *
190  * @author David G. Baur Raytheon Sandia National Laboratories 1355
191  * @date Tue Feb 4 10:23:31 2014
192  */
193  virtual ~DeviceMaster()
194  {
195  for (typename ModelMap::iterator model_it = modelMap_.begin(); model_it != modelMap_.end(); ++model_it)
196  {
197  delete (*model_it).second;
198  }
199  }
200 
201 private:
202  DeviceMaster(const DeviceMaster &right); ///< No copying
203  DeviceMaster(const Device &); ///< Eh?
204  DeviceMaster &operator=(const DeviceMaster &right); ///< No assignments
205 
206 public:
207  /**
208  * Returns the name of this device
209  *
210  * @return const reference to the device's name
211  *
212  * @author David G. Baur Raytheon Sandia National Laboratories 1355
213  * @date Tue Feb 4 10:25:37 2014
214  */
215  virtual const std::string &getName() const /* override */
216  {
217  return deviceName_;
218  }
219 
220  /**
221  * Returns the default model name to use if the instance being created does not specify one
222  *
223  * @return const reference to the default model name
224  *
225  * @author David G. Baur Raytheon Sandia National Laboratories 1355
226  * @date Tue Feb 4 10:26:10 2014
227  */
228  virtual const std::string &getDefaultModelName() const /* override */
229  {
230  return defaultModelName_;
231  }
232  /**
233  * Returns a pointer to the model or instance entity with the specified name
234  *
235  * @param entity_name const reference to the entity name
236  *
237  * @return pointer to the entity or 0 is not found
238  *
239  * @author David G. Baur Raytheon Sandia National Laboratories 1355
240  * @date Tue Feb 4 10:36:44 2014
241  */
242  virtual DeviceEntity *findEntity(const std::string &entity_name) /* override */
243  {
244  EntityMap::iterator it = entityMap_.find(entity_name);
245  if (it != entityMap_.end())
246  return (*it).second;
247 
248  return 0;
249  }
250 
251  /**
252  * Returns a pointer to the model or instance entity with the specified name
253  *
254  * @param entity_name const reference to the entity name
255  *
256  * @return const pointer to the entity or 0 is not found
257  *
258  * @author David G. Baur Raytheon Sandia National Laboratories 1355
259  * @date Tue Feb 4 10:36:44 2014
260  */
261  virtual const DeviceEntity *findEntity(const std::string &entity_name) const /* override */
262  {
263  EntityMap::const_iterator it = entityMap_.find(entity_name);
264  if (it != entityMap_.end())
265  return (*it).second;
266 
267  return 0;
268  }
269 
270  /**
271  * Returns true if this device is a linear device
272  *
273  * @return the device is linear value provided via the device trait.
274  *
275  * @author David G. Baur Raytheon Sandia National Laboratories 1355
276  * @date Tue Feb 4 10:51:52 2014
277  */
278  virtual bool isLinearDevice() const /* override */
279  {
280  return T::isLinearDevice();
281  }
282 
283  /**
284  * Returns true if this device is a PDE device
285  *
286  * @return the device is PDE value provided via the device trait.
287  *
288  * @author David G. Baur Raytheon Sandia National Laboratories 1355
289  * @date Tue Feb 4 10:53:10 2014
290  */
291  virtual bool isPDEDevice() const /* override */
292  {
293  return T::isPDEDevice();
294  }
295 
296  /**
297  * Executes operator op, passing its DeviceModel pointer, for each device model
298  *
299  * Since the model information is managed in a map of ModelType pointers, it is not possible to return the map as an
300  * association to DeviceModel pointers. This function iterates over the models and passes it the DeviceModel
301  * pointer for each.
302  *
303  * @param op functor taking a DeviceModel pointer as an argument
304  *
305  * @author David G. Baur Raytheon Sandia National Laboratories 1355
306  * @date Tue Feb 4 10:53:45 2014
307  */
308  virtual void forEachModel(DeviceModelOp &op) const /* override */
309  {
310  for (typename ModelMap::const_iterator it = modelMap_.begin(); it != modelMap_.end(); ++it)
311  op((*it).second);
312  }
313 
314  /**
315  * Executes operator op, passing its DeviceInstance pointer, for each device instance
316  *
317  * Since the instance information is managed in a map of InstanceType pointers, it is not possible to return the map as an
318  * association to DeviceInstance pointers. This function iterates over the instances and passes it the DeviceInstance
319  * pointer for each.
320  *
321  * @param op functor taking a DeviceInstance pointer as an argument
322  *
323  * @author David G. Baur Raytheon Sandia National Laboratories 1355
324  * @date Tue Feb 4 10:53:45 2014
325  */
326  virtual void forEachInstance(DeviceInstanceOp &op) const /* override */
327  {
328  for (typename InstanceVector::const_iterator it = instanceVector_.begin(); it != instanceVector_.end(); ++it)
329  op(*it);
330  }
331 
332  // virtual bool deleteInstance(DeviceInstance *instance) /* override */;
333 
334  virtual DeviceModel *addModel(const ModelBlock & MB, const FactoryBlock &factory_block) /* override */;
335  virtual DeviceInstance *addInstance(const InstanceBlock &instance_block, const FactoryBlock &factory_block); /* override */
336 
337  virtual bool updateSources() /* override */;
338  virtual bool updateState (double * solVec, double * staVec, double * stoVec)/* override */;
339  virtual bool updateSecondaryState (double * staDerivVec, double * stoVec) /* override */;
340  virtual bool loadDAEVectors (double * solVec, double * fVec, double * qVec, double * storeLeadF, double * storeLeadQ) /* override */;
341  virtual bool loadDAEMatrices (N_LAS_Matrix & dFdx, N_LAS_Matrix & dQdx) /* override */;
342 
343 protected:
344  /**
345  * Returns the solver state given during device construction
346  *
347  * @return const reference to the solver state
348  *
349  * @author David G. Baur Raytheon Sandia National Laboratories 1355
350  * @date Tue Feb 4 10:27:14 2014
351  */
352  const SolverState &getSolverState() const
353  {
354  return solverState_;
355  }
356 
357  /**
358  * Returns the device options given during device construction
359  *
360  * @return const reference to the device options
361  *
362  * @author David G. Baur Raytheon Sandia National Laboratories 1355
363  * @date Tue Feb 4 10:27:48 2014
364  */
366  {
367  return deviceOptions_;
368  }
369 
370  /**
371  * Returns an iterator to the beginning of the vector of all instances created for this device
372  *
373  * While a device instance is created, the device model owns the pointer to the device. The instanceVector_ gets a
374  * copy so that all instances of this device may be iterated over without needing to go through the model.
375  *
376  * @return iterator to the beginning of the device instance vector
377  *
378  * @author David G. Baur Raytheon Sandia National Laboratories 1355
379  * @date Tue Feb 4 10:28:29 2014
380  */
381  typename InstanceVector::const_iterator getInstanceBegin() const
382  {
383  return instanceVector_.begin();
384  }
385 
386  /**
387  * Returns an iterator to the ending of the vector of all instances created for this device
388  *
389  * While a device instance is created, the device model owns the pointer to the device. The instanceVector_ gets a
390  * copy so that all instances of this device may be iterated over without needing to go through the model.
391  *
392  * @return iterator to the ending of the device instance vector
393  *
394  * @author David G. Baur Raytheon Sandia National Laboratories 1355
395  * @date Tue Feb 4 10:28:29 2014
396  */
397  typename InstanceVector::const_iterator getInstanceEnd() const
398  {
399  return instanceVector_.end();
400  }
401 
402  /**
403  * Returns true if the model name must be specified for each instance
404  *
405  * @return the device model required value provided via the device trait.
406  *
407  * @author David G. Baur Raytheon Sandia National Laboratories 1355
408  * @date Tue Feb 4 10:32:10 2014
409  */
410  bool isModelRequired() const
411  {
412  return T::modelRequired();
413  }
414 
415 private:
416  /**
417  * Adds an entity to the mapping of model and instance name to its entity
418  *
419  * Note that currently if the name is duplicated, the previous value is overwritten.
420  *
421  * @param name const reference to the model or instance name
422  * @param entity pointer to the model or instance
423  *
424  * @author David G. Baur Raytheon Sandia National Laboratories 1355
425  * @date Tue Feb 4 10:35:00 2014
426  */
427  void addEntity(const std::string &name, DeviceEntity *entity)
428  {
429  std::pair<EntityMap::iterator, bool> result = entityMap_.insert(EntityMap::value_type(name, entity));
430  if (!result.second)
431  duplicate_entity_warning(*entity);
432  }
433 
434  virtual bool getBreakPoints(std::vector<Util::BreakPoint> & breakPointTimes);
435 
436 private:
437  const std::string deviceName_;
438  const std::string defaultModelName_;
446 };
447 
448 //-----------------------------------------------------------------------------
449 // Function : DeviceMaster::addInstance
450 // Purpose : This function adds an instance to the list of instances.
451 //
452 // Special Notes : All device instances are contained in one of many lists.
453 // Each model owns exactly one list of instances. If
454 // an instance is added which does not reference a model, or
455 // that references a model that does not exist, factory_block, then a new
456 // model has to be added.
457 //
458 // For now, this function will only add a model for instances
459 // that do not specifically reference one. If an instance
460 // references a non-existant model, this function will return a
461 // fatal error. (This function should only be called from the
462 // device manager function, AddDeviceInstance, and that
463 // function will not call this one if the instance refers to a
464 // non-existant model.)
465 //
466 // Scope : public
467 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
468 // Creation Date : 1/31/06
469 //-----------------------------------------------------------------------------
470 template<class T>
473  const InstanceBlock & instance_block,
474  const FactoryBlock & factory_block)
475 {
476  std::string model_name = instance_block.getModelName();
477 
478  if (model_name.empty()) // If no model name, use the default model.
479  {
480  if (isModelRequired())
481  {
482  instance_must_reference_model_error(*this, model_name, instance_block.netlistFileName_, instance_block.lineNumber_);
483  }
484  else
485  {
486  model_name = defaultModelName_;
487  }
488  }
489 
490  typename ModelMap::iterator it = modelMap_.find(model_name);
491  if (it == modelMap_.end())
492  {
493  could_not_find_model(*this, model_name, instance_block.getName(), instance_block.netlistFileName_, instance_block.lineNumber_);
494  return 0;
495  }
496 
497  ModelType &model = *(*it).second;
498 
499  InstanceType *instance = new InstanceType(configuration_, instance_block, model, factory_block);
500  instance->setDefaultParamName(T::instanceDefaultParameter());
501 
502  addEntity(instance_block.getName(), instance);
503 
504  model.addInstance(instance);
505 
506  instanceVector_.push_back(instance);
507 
508  return instance;
509 }
510 
511 //-----------------------------------------------------------------------------
512 // Function : DeviceMaster::addModel
513 // Purpose : This function adds a model to the list of device models.
514 //
515 // Special Notes : This is the "public" version of the function, meaning that
516 // it returns a bool to indicate success or failure (rather
517 // than a pointer to the model). Also, factory_block, it checks to see if the
518 // model being added is already part of the list. If the model
519 // already exists, it generates an error.
520 //
521 // Scope : public
522 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
523 // Creation Date : 1/31/06
524 //-----------------------------------------------------------------------------
525 template<class T>
527  const ModelBlock & model_block,
528  const FactoryBlock & factory_block)
529 {
530  // Check to make sure that there doesn't already exist a model of this name.
531  if (modelMap_.find(model_block.name) != modelMap_.end())
532  {
533  duplicate_model_warning(*this, model_block.name, model_block.netlistFileName_, model_block.lineNumber_);
534 
535  return 0;
536  }
537 
538  ModelType *model = new ModelType(configuration_, model_block, factory_block);
539 
540  // Add to the model list.
541  modelMap_[model_block.name] = model;
542 
543  // Add model to the local processor entity list
544  addEntity(model_block.name, model);
545 
546  return model;
547 }
548 
549 // //-----------------------------------------------------------------------------
550 // // Function : DeviceMaster::deleteInstance
551 // // Purpose :
552 // // Special Notes :
553 // // Scope : public
554 // // Creator : Eric Keiter, SNL, factory_block, Parallel Computational Sciences
555 // // Creation Date : 2/03/06
556 // //-----------------------------------------------------------------------------
557 // template<class T>
558 // bool DeviceMaster<T>::deleteInstance(const std::string & instance_name)
559 // {
560 // for (typename ModelMap::iterator it_model = modelMap_.begin(); it_model != modelMap_.end(); ++it_model)
561 // {
562 // InstanceVector &instance_list = (*it_model).second->getInstanceVector();
563 
564 // for (typename InstanceVector::iterator it_instance = instance_list.begin(); it_instance != instance_list.end(); ++it_instance)
565 // {
566 // if (equal_nocase(instance_name, (*it_instance)->getName()))
567 // {
568 // delete *it_instance;
569 // instance_list.erase(it_instance);
570 
571 // return true;
572 // }
573 // }
574 // }
575 
576 // return false;
577 // }
578 
579 //-----------------------------------------------------------------------------
580 // Function : DeviceMaster::getBreakPoints
581 // Purpose : This function adds break points to a vector of breakpoints.
582 //
583 // Special Notes : For most devices, this function won't get called. The
584 // device manager only calls getBreakPoints for certain
585 // pre-selected devices. Ultimately, factory_block, this function probably
586 // isn't neccessary, as the device manager usually accesses
587 // device instances directly, rather than going through a
588 // device class middleman.
589 //
590 // Scope : public
591 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
592 // Creation Date : 2/05/06
593 //-----------------------------------------------------------------------------
594 template<class T>
595 bool DeviceMaster<T>::getBreakPoints( std::vector<Util::BreakPoint> & breakPointTimes )
596 {
597  bool bsuccess = true;
598 
599  for (typename InstanceVector::iterator it = instanceVector_.begin(); it != instanceVector_.end(); ++it)
600  bsuccess = (*it)->getInstanceBreakPoints(breakPointTimes) && bsuccess;
601 
602  return bsuccess;
603 }
604 
605 //-----------------------------------------------------------------------------
606 // Function : DeviceMaster::updateSources
607 //
608 // Purpose :
609 //
610 // Special Notes : Just like for the getBreakPoints function, for most devices, factory_block,
611 // this function won't get called. The
612 // device manager only calls updateSources for certain
613 // pre-selected devices. Ultimately, this function probably
614 // isn't neccessary, as the device manager usually accesses
615 // device instances directly, rather than going through a
616 // device class middleman.
617 //
618 // Scope : public
619 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
620 // Creation Date : 02/05/06
621 //-----------------------------------------------------------------------------
622 template<class T>
624 {
625  bool bsuccess = true;
626 
627  for (typename InstanceVector::iterator it = instanceVector_.begin(); it != instanceVector_.end(); ++it)
628  bsuccess = (*it)->updateSource() && bsuccess;
629 
630  return bsuccess;
631 }
632 
633 //-----------------------------------------------------------------------------
634 // Function : DeviceMaster::updateState
635 // Purpose :
636 // Special Notes :
637 // Scope : public
638 // Creator : Eric Keiter, SNL, factory_block, Parallel Computational Sciences
639 // Creation Date : 11/25/08
640 //-----------------------------------------------------------------------------
641 template<class T>
642 bool DeviceMaster<T>::updateState (double * solVec, double * staVec, double * stoVec)
643 {
644  bool bsuccess = true;
645  for (typename InstanceVector::const_iterator it = instanceVector_.begin(); it != instanceVector_.end(); ++it)
646  {
647  bool tmpBool = (*it)->updatePrimaryState();
648  bsuccess = bsuccess && tmpBool;
649  }
650 
651  return bsuccess;
652 }
653 
654 //-----------------------------------------------------------------------------
655 // Function : DeviceMaster::updateSecondaryState
656 // Purpose :
657 // Special Notes :
658 // Scope : public
659 // Creator : Eric Keiter, SNL, factory_block, Parallel Computational Sciences
660 // Creation Date : 11/25/08
661 //-----------------------------------------------------------------------------
662 template<class T>
663 bool DeviceMaster<T>::updateSecondaryState (double * staDerivVec, double * stoVec)
664 {
665  bool bsuccess = true;
666  for (typename InstanceVector::const_iterator it = instanceVector_.begin(); it != instanceVector_.end(); ++it)
667  {
668  bool tmpBool = (*it)->updateSecondaryState ();
669  bsuccess = bsuccess && tmpBool;
670  }
671 
672  return bsuccess;
673 }
674 
675 //-----------------------------------------------------------------------------
676 // Function : DeviceMaster::loadDAEVectors
677 // Purpose :
678 // Special Notes :
679 // Scope : public
680 // Creator : Eric Keiter, SNL, factory_block, Parallel Computational Sciences
681 // Creation Date : 11/25/08
682 //-----------------------------------------------------------------------------
683 template<class T>
684 bool DeviceMaster<T>::loadDAEVectors(double * solVec, double * fVec, double * qVec, double * storeLeadF, double * storeLeadQ)
685 {
686  bool bsuccess = true;
687  for (typename InstanceVector::const_iterator it = instanceVector_.begin(); it != instanceVector_.end(); ++it)
688  {
689  bool tmpBool = (*it)->loadDAEFVector();
690  bsuccess = bsuccess && tmpBool;
691  tmpBool = (*it)->loadDAEQVector();
692  bsuccess = bsuccess && tmpBool;
693  }
694 
695  return bsuccess;
696 }
697 
698 //-----------------------------------------------------------------------------
699 // Function : DeviceMaster::loadDAEMatrices
700 // Purpose :
701 // Special Notes :
702 // Scope : public
703 // Creator : Eric Keiter, SNL, factory_block, Parallel Computational Sciences
704 // Creation Date : 11/25/08
705 //-----------------------------------------------------------------------------
706 template<class T>
707 bool DeviceMaster<T>::loadDAEMatrices (N_LAS_Matrix & dFdx, N_LAS_Matrix & dQdx)
708 {
709  bool bsuccess = true;
710  for (typename InstanceVector::const_iterator it = instanceVector_.begin(); it != instanceVector_.end(); ++it)
711  {
712  bool tmpBool = (*it)->loadDAEdFdx();
713  bsuccess = bsuccess && tmpBool;
714  tmpBool = (*it)->loadDAEdQdx();
715  bsuccess = bsuccess && tmpBool;
716  }
717 
718  return bsuccess;
719 }
720 
721 } // namespace Device
722 } // namespace Xyce
723 
724 #endif