Xyce  6.1
N_NLS_LOCA_Group.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_NLS_LOCA_Group.C,v $
27 //
28 // Purpose : Interface to Xyce for LOCA continuation routines.
29 //
30 // Special Notes :
31 //
32 // Creator : Roger Pawlowski, SNL 9233
33 //
34 // Creation Date : 02/17/03
35 //
36 // Revision Information:
37 // ---------------------
38 //
39 // Revision Number: $Revision: 1.68 $
40 //
41 // Revision Date : $Date: 2015/07/11 23:40:30 $
42 //
43 // Current Owner : $Author: erkeite $
44 //-------------------------------------------------------------------------
45 
46 #include <Xyce_config.h>
47 
48 #include <N_ANP_AnalysisManager.h>
49 #include <N_ERH_ErrorMgr.h>
50 #include <N_IO_OutputMgr.h>
51 #include <N_LAS_Builder.h>
52 #include <N_LAS_Matrix.h>
53 #include <N_LAS_System.h>
54 #include <N_LAS_Vector.h>
56 #include <N_NLS_LOCA_Group.h>
58 #include <N_NLS_NOX_SharedSystem.h>
59 #include <N_UTL_FeatureTest.h>
60 
61 // ---------- NOX Includes ----------
62 #include <Teuchos_ParameterList.hpp>
63 #include <NOX_Abstract_Vector.H>
64 #include <LOCA_Parameter_Vector.H>
65 
66 // using namespace Xyce::Nonlinear::N_NLS_NOX;
67 
68 namespace Xyce {
69 namespace Nonlinear {
70 namespace N_NLS_LOCA {
71 
72 //-----------------------------------------------------------------------------
73 // Function : Group::Group
74 // Purpose : constructor
75 // Special Notes :
76 // Scope : public
77 // Creator :
78 // Creation Date :
79 //-----------------------------------------------------------------------------
80 Group::Group(Teuchos::RCP<LOCA::GlobalData> gd,
81  N_NLS_NOX::SharedSystem& s, Loader::NonlinearEquationLoader& l,
82  IO::OutputMgr& o, Analysis::AnalysisManager & t) :
83  N_NLS_NOX::Group(s),
84  LOCA::Abstract::Group(gd),
85  loader(l),
86  outputMgr(o),
87  anaInt(t),
88  derivUtils(gd),
89  tmpVectorPtr(0),
90  scalingVecPtr(0),
91  useAugmentLinSys_(false),
92  outputLinear_(false),
93  serialNumber_(0),
94  op_(0),
95  allNodes_(0),
96  pdsCommPtr_(0),
97  nonContinuationSolve_(true)
98 {
99  tmpVectorPtr = sharedSystemPtr_->getLasSystem()->builder().createVector();
100 }
101 
102 //-----------------------------------------------------------------------------
103 // Function : Group::Group
104 // Purpose : constructor
105 // Special Notes :
106 // Scope : public
107 // Creator :
108 // Creation Date :
109 //-----------------------------------------------------------------------------
110 Group::Group(const Group& source, NOX::CopyType type) :
111  N_NLS_NOX::Group(source, type),
112  LOCA::Abstract::Group(source, type),
113  loader(source.loader),
114  outputMgr(source.outputMgr),
115  anaInt(source.anaInt),
116  params(source.params),
117  derivUtils(source.derivUtils),
118  tmpVectorPtr(0),
119  scalingVecPtr(source.scalingVecPtr),
120  useAugmentLinSys_(source.useAugmentLinSys_),
121  outputLinear_(source.outputLinear_),
122  serialNumber_(source.serialNumber_),
123  oldSol_(source.oldSol_),
124  op_(source.op_),
125  allNodes_(source.allNodes_),
126 #ifdef Xyce_PARALLEL_MPI
127  pdsCommPtr_(source.pdsCommPtr_),
128 #endif
129  augmentLSStrategy_(source.augmentLSStrategy_),
130  nonContinuationSolve_(source.nonContinuationSolve_)
131 {
132  tmpVectorPtr = sharedSystemPtr_->getLasSystem()->builder().createVector();
133 }
134 
135 //-----------------------------------------------------------------------------
136 // Function : Group::~Group
137 // Purpose : destructor
138 // Special Notes :
139 // Scope : public
140 // Creator :
141 // Creation Date :
142 //-----------------------------------------------------------------------------
144 {
145  delete tmpVectorPtr;
146 }
147 
148 //-----------------------------------------------------------------------------
149 // Function : Group::operator=
150 // Purpose :
151 // Special Notes :
152 // Scope : public
153 // Creator :
154 // Creation Date :
155 //-----------------------------------------------------------------------------
156 NOX::Abstract::Group&
157 Group::operator=(const NOX::Abstract::Group& source)
158 {
159  return operator=(dynamic_cast<const Group&>(source));
160 }
161 
162 //-----------------------------------------------------------------------------
163 // Function : Group::operator=
164 // Purpose :
165 // Special Notes :
166 // Scope : public
167 // Creator :
168 // Creation Date :
169 //-----------------------------------------------------------------------------
172 {
173  return operator=(dynamic_cast<const Group&>(source));
174 }
175 
176 //-----------------------------------------------------------------------------
177 // Function : Group::operator=
178 // Purpose :
179 // Special Notes :
180 // Scope : public
181 // Creator :
182 // Creation Date :
183 //-----------------------------------------------------------------------------
184 LOCA::Abstract::Group&
185 Group::operator=(const LOCA::Abstract::Group& source)
186 {
187  return operator=(dynamic_cast<const Group&>(source));
188 }
189 
190 //-----------------------------------------------------------------------------
191 // Function : Group::operator=
192 // Purpose :
193 // Special Notes :
194 // Scope : public
195 // Creator :
196 // Creation Date :
197 //-----------------------------------------------------------------------------
198 Group&
199 Group::operator=(const Group& source)
200 {
202  params = source.params;
203  derivUtils = source.derivUtils;
204  if (source.scalingVecPtr != 0)
205  scalingVecPtr = source.scalingVecPtr;
208  return *this;
209 }
210 
211 //-----------------------------------------------------------------------------
212 // Function : Group::copy
213 // Purpose :
214 // Special Notes :
215 // Scope : public
216 // Creator :
217 // Creation Date :
218 //-----------------------------------------------------------------------------
219 void Group::copy(const NOX::Abstract::Group &source)
220 {
221  *this = source;
222 }
223 
224 //-----------------------------------------------------------------------------
225 // Function : Group::clone
226 // Purpose :
227 // Special Notes :
228 // Scope : public
229 // Creator :
230 // Creation Date :
231 //-----------------------------------------------------------------------------
232 Teuchos::RCP<NOX::Abstract::Group> Group::
233 clone(NOX::CopyType type) const
234 {
235  Teuchos::RCP<Group> ptr =
236  Teuchos::rcp(new Group(*this, type));
237  return ptr;
238 }
239 
240 //-----------------------------------------------------------------------------
241 // Function : Group::computeF()
242 // Purpose :
243 // Special Notes :
244 // Scope : public
245 // Creator :
246 // Creation Date :
247 //-----------------------------------------------------------------------------
248 NOX::Abstract::Group::ReturnType Group::computeF()
249 {
250  // Set continuation parameters, if neccessary
251  // Note: If the tranOP solve was a continuation, but the
252  // transient is traditional Newton, make SURE that the
253  // setParam calls are not happening for transient!
255  {
256  for (int i = 0; i < params.length(); ++i)
257  {
258  std::string label = params.getLabel(i);
259  loader.setParam(label, params.getValue(i));
260 
261  if (label == "GSTEPPING" && useAugmentLinSys_)
262  augmentLSStrategy_->setProgressVariable(params.getValue(i));
263 
264  }
265  }
266 
267  NOX::Abstract::Group::ReturnType status = N_NLS_NOX::Group::computeF();
268 
269  if (useAugmentLinSys_)
270  augmentLSStrategy_->augmentResidual(xVec_.getNativeVectorPtr(),
272 
273  return status;
274 }
275 
276 //-----------------------------------------------------------------------------
277 // Function : Group::computeJacobian()
278 // Purpose :
279 // Special Notes :
280 // Scope : public
281 // Creator :
282 // Creation Date :
283 //-----------------------------------------------------------------------------
284 NOX::Abstract::Group::ReturnType Group::computeJacobian()
285 {
286  // Set continuation parameters, if neccessary
287  // Note: If the tranOP solve was a continuation, but the
288  // transient is traditional Newton, make SURE that the
289  // setParam calls are not happening for transient!
291  {
292  for (int i = 0; i < params.length(); ++i) {
293  std::string label = params.getLabel(i);
294  loader.setParam(label, params.getValue(i));
295 
296  if (label == "GSTEPPING" && useAugmentLinSys_)
297  augmentLSStrategy_->setProgressVariable(params.getValue(i));
298 
299  }
300  }
301 
302  NOX::Abstract::Group::ReturnType status =
304 
305  // Augment jacobian for pseudo transient if enabled
306  if (useAugmentLinSys_) {
307  Linear::Matrix& jacobian =
308  const_cast<Linear::Matrix&>(sharedSystemPtr_->getJacobian());
309  augmentLSStrategy_->augmentJacobian(&jacobian);
310  }
311 
312  if (outputLinear_)
313  {
314  Linear::Matrix& jacobian =
315  const_cast<Linear::Matrix&>(sharedSystemPtr_->getJacobian());
316  dout() << "After computeJacobian, linear system is:" << std::endl;
319  }
320 
321  if (DEBUG_NONLINEAR)
322  {
323  Linear::Matrix& jacobian = const_cast<Linear::Matrix&>(sharedSystemPtr_->getJacobian());
325  }
326 
327  return status;
328 }
329 
330 //-----------------------------------------------------------------------------
331 // Function : Group::computeDfDpMulti
332 // Purpose :
333 // Special Notes :
334 // Scope : public
335 // Creator : Eric Keiter
336 // Creation Date :
337 //-----------------------------------------------------------------------------
338 NOX::Abstract::Group::ReturnType Group::computeDfDpMulti
339  (const std::vector< int > & paramIDs,
340  NOX::Abstract::MultiVector & dfdp,
341  bool isValidF)
342 {
343  // Do it the old way (LOCA performs the finite difference DfDp):
344  //if (true)
345  if (false)
346  {
347  // obtain voltage limiting status:
348  bool voltageLimterStatus = loader.getVoltageLimiterStatus();
349 
350  // turn off voltage limiting:
351  loader.setVoltageLimiterStatus(false);
352 
353  LOCA::Abstract::Group::computeDfDpMulti (paramIDs, dfdp, isValidF);
354 
355  // turn on voltage limiting (assuming it was on to begin with):
356  loader.setVoltageLimiterStatus(voltageLimterStatus);
357  }
358  else
359  {
360  // Do it the new way (Xyce provides DfDp)
361  bool tmp = sharedSystemPtr_->computeDfDpMulti (paramIDs, dfdp, isValidF);
362  }
363 
364 #if 0
365  // temporary debug:
366  std::cout << "dfdp vector[0]:" <<std::endl;
367  NOX::Abstract::Vector *DFDP = &dfdp[0];
368  DFDP->print(std::cout);
369 
370  std::cout << "dfdp vector[1]:" <<std::endl;
371  DFDP = &dfdp[1];
372  DFDP->print(std::cout);
373 #endif
374 
375  return NOX::Abstract::Group::Ok;
376 }
377 
378 //-----------------------------------------------------------------------------
379 // Function : Group::setOutputLinear
380 // Purpose :
381 // Special Notes : for DCOP restart (debugging)
382 // Scope : public
383 // Creator : Dave Shirley
384 // Creation Date : 2006
385 //-----------------------------------------------------------------------------
386 void Group::setOutputLinear (NodeNameMap * op,
387  NodeNameMap * allNodes,
388  N_PDS_Comm * pdsCommPtr)
389 {
390  op_ = op;
391  allNodes_ = allNodes;
392  pdsCommPtr_ = pdsCommPtr;
393  outputLinear_ = true;
394  serialNumber_ = 0;
395 }
396 
397 //-----------------------------------------------------------------------------
398 // Function : Group::outputLinearSystem_
399 // Purpose :
400 // Special Notes : for DCOP restart (debugging)
401 // Scope : private
402 // Creator : Dave Shirly
403 // Creation Date : 2006
404 //-----------------------------------------------------------------------------
405 void Group::outputLinearSystem_ (Linear::Matrix* jacobian,
406  Linear::Vector* solPtr_,
407  Linear::Vector* resPtr_)
408 {
409  NodeNameMap::iterator op_i;
410  NodeNameMap::iterator op_end;
411  int i, row, global_row;
412  int num;
413  std::vector<int> col;
414  std::vector<double> val;
415  std::map<int,std::string> rowOut;
416  int rowLen, GID;
417 
418  if (!outputLinear_)
419  return;
420 
421 #ifdef Xyce_PARALLEL_MPI
422  N_PDS_ParMap * pmap_;
423  pmap_ = resPtr_->pmap();
424  int procID = pdsCommPtr_->procID();
425 #endif
426  op_i = allNodes_->begin();
427  op_end = allNodes_->end();
428  for ( ; op_i != op_end ; ++op_i)
429  {
430  std::ostringstream s;
431  row = (*op_i).second;
432 #ifdef Xyce_PARALLEL_MPI
433  global_row = pmap_->localToGlobalIndex(row);
434 #else
435  global_row = row;
436 #endif
437  s << "Global: " << global_row << " : " << (*op_i).first << " Row: " << global_row;
438  s << " Value: " << (*solPtr_)[row];
439  if (serialNumber_ > 0)
440  {
441  s << std::endl;
442  s << " Delta Value: " << (*solPtr_)[row] - oldSol_[row];
443  s << std::endl;
444  }
445  oldSol_[row] = (*solPtr_)[row];
446  s << " Residual: " << (*resPtr_)[row];
447 #ifdef Xyce_PARALLEL_MPI
448  s << " proc: " << procID;
449 #endif
450  s << std::endl;
451  rowLen = jacobian->getLocalRowLength(row);
452  col.resize(rowLen);
453  val.resize(rowLen);
454  jacobian->getRowCopy(global_row, rowLen, rowLen, &val[0], &col[0]);
455  for (i=0 ; i<rowLen ; i++)
456  {
457  if (i>1 && i%10 == 0)
458  s << std::endl;
459  GID = col[i];
460  s << " " << GID << "(" << val[i] << ")";
461  }
462  rowOut[global_row] = s.str();
463  }
464  serialNumber_++;
465  std::map<int,std::string>::iterator row_i;
466  std::map<int,std::string>::iterator row_end = rowOut.end();
467  row_i = rowOut.begin();
468  std::string str;
469 #ifdef Xyce_PARALLEL_MPI
470  int numG;
471  int pos, posG;
472  int len;
473  std::string buf;
474 #endif
475  int big=2000000000;
476  for ( ; ; ++row_i )
477  {
478  if (row_i == row_end)
479  {
480  str = "";
481  num = big;
482  }
483  else
484  {
485  str = (*row_i).second;
486  num = (*row_i).first;
487  }
488 #ifdef Xyce_PARALLEL_MPI
489  numG = -1;
490  while (numG != num)
491  {
492  pdsCommPtr_->minAll (&num, &numG, 1);
493  if (numG == big)
494  break;
495  if (num == numG)
496  pos = procID;
497  else
498  pos = 0;
499  pdsCommPtr_->sumAll (&pos, &posG, 1);
500  if (procID == 0)
501  {
502  if (posG != 0)
503  {
504  pdsCommPtr_->recv(&len, 1, posG);
505  buf.resize(len);
506  pdsCommPtr_->recv(&buf[0], len, posG);
507  dout() << buf << std::endl;
508  }
509  else
510  dout() << str << std::endl;
511  }
512  else if (procID == posG)
513  {
514  len = str.size();
515  pdsCommPtr_->send(&len, 1, 0);
516  pdsCommPtr_->send(str.c_str(), len, 0);
517  }
518  }
519  if (numG == big)
520  break;
521 #else
522  dout() << str << std::endl;
523  if (num == big)
524  break;
525 #endif
526  }
527 }
528 
529 //-----------------------------------------------------------------------------
530 // Function : Group::setParams
531 // Purpose :
532 // Special Notes :
533 // Scope : public
534 // Creator :
535 // Creation Date :
536 //-----------------------------------------------------------------------------
537 void Group::setParams(const LOCA::ParameterVector& p)
538 {
540  params = p;
541  return;
542 }
543 
544 //-----------------------------------------------------------------------------
545 // Function : Group::getParams
546 // Purpose :
547 // Special Notes :
548 // Scope : public
549 // Creator :
550 // Creation Date :
551 //-----------------------------------------------------------------------------
552 const LOCA::ParameterVector& Group::getParams() const
553 {
554  return params;
555 }
556 
557 //-----------------------------------------------------------------------------
558 // Function : Group::setParam
559 // Purpose :
560 // Special Notes :
561 // Scope : public
562 // Creator :
563 // Creation Date :
564 //-----------------------------------------------------------------------------
565 void Group::setParam(int paramID, double value)
566 {
568  params.setValue(paramID, value);
569  return;
570 }
571 
572 //-----------------------------------------------------------------------------
573 // Function : Group::getParam
574 // Purpose :
575 // Special Notes :
576 // Scope : public
577 // Creator :
578 // Creation Date :
579 //-----------------------------------------------------------------------------
580 double Group::getParam(int paramID) const
581 {
582  return params.getValue(paramID);
583 }
584 
585 //-----------------------------------------------------------------------------
586 // Function : Group::setParam
587 // Purpose :
588 // Special Notes :
589 // Scope : public
590 // Creator :
591 // Creation Date :
592 //-----------------------------------------------------------------------------
593 void Group::setParam(std::string paramID, double value)
594 {
596  params.setValue(paramID, value);
597  return;
598 }
599 
600 //-----------------------------------------------------------------------------
601 // Function : Group::getParam
602 // Purpose :
603 // Special Notes :
604 // Scope : public
605 // Creator :
606 // Creation Date :
607 //-----------------------------------------------------------------------------
608 double Group::getParam(std::string paramID) const
609 {
610  return params.getValue(paramID);
611 }
612 
613 //-----------------------------------------------------------------------------
614 // Function : Group::setScaleVec
615 // Purpose :
616 // Special Notes :
617 // Scope : public
618 // Creator :
619 // Creation Date :
620 //-----------------------------------------------------------------------------
621 void Group::setScaleVec(const NOX::Abstract::Vector& s)
622 {
623  scalingVecPtr = &s;
624 }
625 
626 //-----------------------------------------------------------------------------
627 // Function : Group::getScaleVec()
628 // Purpose :
629 // Special Notes :
630 // Scope : public
631 // Creator :
632 // Creation Date :
633 //-----------------------------------------------------------------------------
634 const NOX::Abstract::Vector& Group::getScaleVec() const
635 {
636  if (scalingVecPtr == 0) {
637  const std::string message = "Group::getScaleVec() - scaling vector not set!";
638  N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
639  }
640 
641  return (*scalingVecPtr);
642 }
643 
644 //-----------------------------------------------------------------------------
645 // Function : Group::augmentJacobianForHomotopy
646 // Purpose :
647 // Special Notes :
648 // Scope : public
649 // Creator :
650 // Creation Date :
651 //-----------------------------------------------------------------------------
652 NOX::Abstract::Group::ReturnType
654 {
655 
656  Linear::Matrix& jacobian =
657  const_cast<Linear::Matrix&>(sharedSystemPtr_->getJacobian());
658 
659  //jacobian.printPetraObject();
660  jacobian.scale(conParamValue);
661  jacobian.getDiagonal(*tmpVectorPtr);
662  (*tmpVectorPtr).addScalar(1.0 - conParamValue);
663  jacobian.replaceDiagonal(*tmpVectorPtr);
664  //jacobian.printPetraObject();
665 
666  return NOX::Abstract::Group::Ok;
667 }
668 
669 //-----------------------------------------------------------------------------
670 // Function : Group::printSolution
671 // Purpose :
672 // Special Notes :
673 // Scope : public
674 // Creator :
675 // Creation Date :
676 //-----------------------------------------------------------------------------
677 void Group::printSolution (const double conParam) const
678 {
679  // ERK: This is a KLUDGE! I put it here because the "printSolution"
680  // functions were the only place in this class that were called
681  // only after a continuation step was successful.
682  //
683  // Note: homotopy output is now called from the time integrator,
684  // so it is this function still results in the the solution being
685  // printed.
686  //
687  // Note: This will be replaced by "stepSuccess" (see below), once
688  // stepSuccess completely works.
689  anaInt.completeHomotopyStep(loader, params.getNamesVector(), params.getValuesVector(), xVec_.getNativeVectorPtr());
690 
691  return;
692 }
693 
694 //-----------------------------------------------------------------------------
695 // Function : Group::printSolution
696 // Purpose :
697 // Special Notes :
698 // Scope : public
699 // Creator :
700 // Creation Date :
701 //-----------------------------------------------------------------------------
702 void Group::printSolution (const NOX::Abstract::Vector &x,
703  const double conParam) const
704 {
705  // const N_NLS_NOX::Vector& noxVector =
706  // dynamic_cast<const N_NLS_NOX::Vector&>(x);
707 
708  // ERK: The function call below (completeHomotopyStep) handles both PRINT
709  // output , and also other data management that is necessary at the end of a
710  // successful homotopy step. I put it here because (at the time) the
711  // "printSolution" functions were the only place in this class that were called
712  // only after a continuation step was successful. That is no longer
713  // true (see postPorcessContinuationStep, below), but there isn't
714  // a compelling reason to change it at this point.
715  anaInt.completeHomotopyStep(loader, params.getNamesVector(), params.getValuesVector(), xVec_.getNativeVectorPtr());
716 
717  return;
718 }
719 
720 //-----------------------------------------------------------------------------
721 // Function : Group::preProcessContinuationStep
722 // Purpose :
723 // Special Notes :
724 // Scope : public
725 // Creator : Eric Keiter, SNL
726 // Creation Date : 4/20/2015
727 //-----------------------------------------------------------------------------
728 void Group::preProcessContinuationStep(LOCA::Abstract::Iterator::StepStatus stepStatus)
729 {
730 }
731 
732 //-----------------------------------------------------------------------------
733 // Function : Group::postProcessContinuationStep
734 // Purpose :
735 // Special Notes :
736 // Scope : public
737 // Creator : Eric Keiter, SNL
738 // Creation Date : 4/20/2015
739 //-----------------------------------------------------------------------------
740 void Group::postProcessContinuationStep(LOCA::Abstract::Iterator::StepStatus stepStatus)
741 {
742  if (stepStatus == 0)
743  {
745  }
746 }
747 
748 
749 //-----------------------------------------------------------------------------
750 // Function : Group::setAugmentLinearSystem
751 // Purpose :
752 // Special Notes :
753 // Scope : public
754 // Creator :
755 // Creation Date :
756 //-----------------------------------------------------------------------------
757 void Group::setAugmentLinearSystem(bool enable_value,
758  const Teuchos::RCP<N_NLS_NOX::AugmentLinSys>& ls)
759 {
760  useAugmentLinSys_ = enable_value;
761  augmentLSStrategy_ = ls;
762 }
763 
764 //-----------------------------------------------------------------------------
765 // Function : Group::setNonContinuationFlag
766 // Purpose :
767 // Special Notes :
768 // Scope : public
769 // Creator :
770 // Creation Date :
771 //-----------------------------------------------------------------------------
773 {
775 }
776 
777 //-----------------------------------------------------------------------------
778 // Function : Group::getNonContinuationFlag
779 // Purpose :
780 // Special Notes :
781 // Scope : public
782 // Creator :
783 // Creation Date :
784 //-----------------------------------------------------------------------------
786 {
787  return nonContinuationSolve_;
788 }
789 
790 }}} // namespace N_NLS_LOCA
Definition: N_NLS_fwd.h:97
NOX::Abstract::Group::ReturnType augmentJacobianForHomotopy(double conParamValue)
void preProcessContinuationStep(LOCA::Abstract::Iterator::StepStatus stepStatus)
NOX::Abstract::Group & operator=(const NOX::Abstract::Group &source)
Assignment Operator.
Pure virtual class to augment a linear system.
Teuchos::RCP< NOX::Abstract::Group > clone(NOX::CopyType type=NOX::DeepCopy) const
Cloning function.
Group(Teuchos::RCP< LOCA::GlobalData > globalData, N_NLS_NOX::SharedSystem &s, Xyce::Loader::NonlinearEquationLoader &l, Xyce::IO::OutputMgr &o, Xyce::Analysis::AnalysisManager &t)
Basic Constructor.
NOX::Abstract::Group::ReturnType computeF()
NOX::Abstract::Group::ReturnType computeDfDpMulti(const std::vector< int > &paramIDs, NOX::Abstract::MultiVector &dfdp, bool isValidF)
Overloaded dfdp sensitivity calculation.
Xyce::Linear::Vector * getNativeVectorPtr()
double getParam(int paramID) const
const T & value(const ParameterBase &entity, const Descriptor &descriptor)
Returns the value of the parameter for the entity.
Definition: N_DEV_Pars.h:1224
bool setParam(std::string &name, double val, bool overrideOriginal=false)
void setParam(int paramID, double value)
NOX::Abstract::Group::ReturnType computeJacobian()
Overloaded Jacobian evaluation routine.
NOX::Abstract::Group::ReturnType computeJacobian()
void setOutputLinear(Xyce::NodeNameMap *op, Xyce::NodeNameMap *allNodes, N_PDS_Comm *pdsCommPtr)
NOX::Abstract::Group & operator=(const Group &source)
void printSolution(const double conParam) const
void copy(const NOX::Abstract::Group &source)
Special LOCA assignment operator.
void setScaleVec(const NOX::Abstract::Vector &s)
void outputLinearSystem_(Xyce::Linear::Matrix *jacobian, Xyce::Linear::Vector *solution, Xyce::Linear::Vector *residual_vector)
Xyce::Loader::NonlinearEquationLoader & loader
Keep a reference to the loader to set parameters.
const Xyce::Linear::Matrix & getJacobian() const
Teuchos::RCP< N_NLS_NOX::AugmentLinSys > augmentLSStrategy_
Xyce::Analysis::AnalysisManager & anaInt
need xyce's time integration manager.
const NOX::Abstract::Vector & getScaleVec() const
LOCA::DerivUtils derivUtils
Utilities for computing derivatives.
LOCA::ParameterVector params
Parameter vector container.
const NOX::Abstract::Vector * scalingVecPtr
LOCA Scaling Vector.
bool completeHomotopyStep(Loader::NonlinearEquationLoader &loader, const std::vector< std::string > &paramNames, const std::vector< double > &paramVals, Linear::Vector *solnVecPtr)
bool failHomotopyStep(Loader::NonlinearEquationLoader &loader)
const LOCA::ParameterVector & getParams() const
void debugOutput1(Xyce::Linear::Matrix &jacobian, Xyce::Linear::Vector &rhs)
NOX::Abstract::Group::ReturnType computeF()
Overloaded function evluation routine.
void postProcessContinuationStep(LOCA::Abstract::Iterator::StepStatus stepStatus)
void setAugmentLinearSystem(bool enable, const Teuchos::RCP< N_NLS_NOX::AugmentLinSys > &ls)
void setParams(const LOCA::ParameterVector &p)
Xyce::Linear::Vector * tmpVectorPtr
Temporary vector used for homotopy calculation.