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.65.2.1 $
40 //
41 // Revision Date : $Date: 2015/04/02 18:20:17 $
42 //
43 // Current Owner : $Author: tvrusso $
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  std::string label = params.getLabel(i);
258  loader.setParam(label, params.getValue(i));
259 
260  if (label == "GSTEPPING" && useAugmentLinSys_)
261  augmentLSStrategy_->setProgressVariable(params.getValue(i));
262 
263  }
264  }
265 
266  NOX::Abstract::Group::ReturnType status = N_NLS_NOX::Group::computeF();
267 
268  if (useAugmentLinSys_)
269  augmentLSStrategy_->augmentResidual(xVec_.getNativeVectorPtr(),
271 
272  return status;
273 }
274 
275 //-----------------------------------------------------------------------------
276 // Function : Group::computeJacobian()
277 // Purpose :
278 // Special Notes :
279 // Scope : public
280 // Creator :
281 // Creation Date :
282 //-----------------------------------------------------------------------------
283 NOX::Abstract::Group::ReturnType Group::computeJacobian()
284 {
285  // Set continuation parameters, if neccessary
286  // Note: If the tranOP solve was a continuation, but the
287  // transient is traditional Newton, make SURE that the
288  // setParam calls are not happening for transient!
290  {
291  for (int i = 0; i < params.length(); ++i) {
292  std::string label = params.getLabel(i);
293  loader.setParam(label, params.getValue(i));
294 
295  if (label == "GSTEPPING" && useAugmentLinSys_)
296  augmentLSStrategy_->setProgressVariable(params.getValue(i));
297 
298  }
299  }
300 
301  NOX::Abstract::Group::ReturnType status =
303 
304  // Augment jacobian for pseudo transient if enabled
305  if (useAugmentLinSys_) {
306  Linear::Matrix& jacobian =
307  const_cast<Linear::Matrix&>(sharedSystemPtr_->getJacobian());
308  augmentLSStrategy_->augmentJacobian(&jacobian);
309  }
310 
311  if (outputLinear_)
312  {
313  Linear::Matrix& jacobian =
314  const_cast<Linear::Matrix&>(sharedSystemPtr_->getJacobian());
315  dout() << "After computeJacobian, linear system is:" << std::endl;
318  }
319 
320  if (DEBUG_NONLINEAR)
321  {
322  Linear::Matrix& jacobian = const_cast<Linear::Matrix&>(sharedSystemPtr_->getJacobian());
324  }
325 
326  return status;
327 }
328 
329 //-----------------------------------------------------------------------------
330 // Function : Group::setOutputLinear
331 // Purpose :
332 // Special Notes : for DCOP restart (debugging)
333 // Scope : public
334 // Creator : Dave Shirley
335 // Creation Date : 2006
336 //-----------------------------------------------------------------------------
337 void Group::setOutputLinear (NodeNameMap * op,
338  NodeNameMap * allNodes,
339  N_PDS_Comm * pdsCommPtr)
340 {
341  op_ = op;
342  allNodes_ = allNodes;
343  pdsCommPtr_ = pdsCommPtr;
344  outputLinear_ = true;
345  serialNumber_ = 0;
346 }
347 
348 //-----------------------------------------------------------------------------
349 // Function : Group::outputLinearSystem_
350 // Purpose :
351 // Special Notes : for DCOP restart (debugging)
352 // Scope : private
353 // Creator : Dave Shirly
354 // Creation Date : 2006
355 //-----------------------------------------------------------------------------
356 void Group::outputLinearSystem_ (Linear::Matrix* jacobian,
357  Linear::Vector* solPtr_,
358  Linear::Vector* resPtr_)
359 {
360  NodeNameMap::iterator op_i;
361  NodeNameMap::iterator op_end;
362  int i, row, global_row;
363  int num;
364  std::vector<int> col;
365  std::vector<double> val;
366  std::map<int,std::string> rowOut;
367  int rowLen, GID;
368 
369  if (!outputLinear_)
370  return;
371 
372 #ifdef Xyce_PARALLEL_MPI
373  N_PDS_ParMap * pmap_;
374  pmap_ = resPtr_->pmap();
375  int procID = pdsCommPtr_->procID();
376 #endif
377  op_i = allNodes_->begin();
378  op_end = allNodes_->end();
379  for ( ; op_i != op_end ; ++op_i)
380  {
381  std::ostringstream s;
382  row = (*op_i).second;
383 #ifdef Xyce_PARALLEL_MPI
384  global_row = pmap_->localToGlobalIndex(row);
385 #else
386  global_row = row;
387 #endif
388  s << "Global: " << global_row << " : " << (*op_i).first << " Row: " << global_row;
389  s << " Value: " << (*solPtr_)[row];
390  if (serialNumber_ > 0)
391  {
392  s << std::endl;
393  s << " Delta Value: " << (*solPtr_)[row] - oldSol_[row];
394  s << std::endl;
395  }
396  oldSol_[row] = (*solPtr_)[row];
397  s << " Residual: " << (*resPtr_)[row];
398 #ifdef Xyce_PARALLEL_MPI
399  s << " proc: " << procID;
400 #endif
401  s << std::endl;
402  rowLen = jacobian->getLocalRowLength(row);
403  col.resize(rowLen);
404  val.resize(rowLen);
405  jacobian->getRowCopy(global_row, rowLen, rowLen, &val[0], &col[0]);
406  for (i=0 ; i<rowLen ; i++)
407  {
408  if (i>1 && i%10 == 0)
409  s << std::endl;
410  GID = col[i];
411  s << " " << GID << "(" << val[i] << ")";
412  }
413  rowOut[global_row] = s.str();
414  }
415  serialNumber_++;
416  std::map<int,std::string>::iterator row_i;
417  std::map<int,std::string>::iterator row_end = rowOut.end();
418  row_i = rowOut.begin();
419  std::string str;
420 #ifdef Xyce_PARALLEL_MPI
421  int numG;
422  int pos, posG;
423  int len;
424  std::string buf;
425 #endif
426  int big=2000000000;
427  for ( ; ; ++row_i )
428  {
429  if (row_i == row_end)
430  {
431  str = "";
432  num = big;
433  }
434  else
435  {
436  str = (*row_i).second;
437  num = (*row_i).first;
438  }
439 #ifdef Xyce_PARALLEL_MPI
440  numG = -1;
441  while (numG != num)
442  {
443  pdsCommPtr_->minAll (&num, &numG, 1);
444  if (numG == big)
445  break;
446  if (num == numG)
447  pos = procID;
448  else
449  pos = 0;
450  pdsCommPtr_->sumAll (&pos, &posG, 1);
451  if (procID == 0)
452  {
453  if (posG != 0)
454  {
455  pdsCommPtr_->recv(&len, 1, posG);
456  buf.resize(len);
457  pdsCommPtr_->recv(&buf[0], len, posG);
458  dout() << buf << std::endl;
459  }
460  else
461  dout() << str << std::endl;
462  }
463  else if (procID == posG)
464  {
465  len = str.size();
466  pdsCommPtr_->send(&len, 1, 0);
467  pdsCommPtr_->send(str.c_str(), len, 0);
468  }
469  }
470  if (numG == big)
471  break;
472 #else
473  dout() << str << std::endl;
474  if (num == big)
475  break;
476 #endif
477  }
478 }
479 
480 //-----------------------------------------------------------------------------
481 // Function : Group::setParams
482 // Purpose :
483 // Special Notes :
484 // Scope : public
485 // Creator :
486 // Creation Date :
487 //-----------------------------------------------------------------------------
488 void Group::setParams(const LOCA::ParameterVector& p)
489 {
491  params = p;
492  return;
493 }
494 
495 //-----------------------------------------------------------------------------
496 // Function : Group::getParams
497 // Purpose :
498 // Special Notes :
499 // Scope : public
500 // Creator :
501 // Creation Date :
502 //-----------------------------------------------------------------------------
503 const LOCA::ParameterVector& Group::getParams() const
504 {
505  return params;
506 }
507 
508 //-----------------------------------------------------------------------------
509 // Function : Group::setParam
510 // Purpose :
511 // Special Notes :
512 // Scope : public
513 // Creator :
514 // Creation Date :
515 //-----------------------------------------------------------------------------
516 void Group::setParam(int paramID, double value)
517 {
519  params.setValue(paramID, value);
520  return;
521 }
522 
523 //-----------------------------------------------------------------------------
524 // Function : Group::getParam
525 // Purpose :
526 // Special Notes :
527 // Scope : public
528 // Creator :
529 // Creation Date :
530 //-----------------------------------------------------------------------------
531 double Group::getParam(int paramID) const
532 {
533  return params.getValue(paramID);
534 }
535 
536 //-----------------------------------------------------------------------------
537 // Function : Group::setParam
538 // Purpose :
539 // Special Notes :
540 // Scope : public
541 // Creator :
542 // Creation Date :
543 //-----------------------------------------------------------------------------
544 void Group::setParam(std::string paramID, double value)
545 {
547  params.setValue(paramID, value);
548  return;
549 }
550 
551 //-----------------------------------------------------------------------------
552 // Function : Group::getParam
553 // Purpose :
554 // Special Notes :
555 // Scope : public
556 // Creator :
557 // Creation Date :
558 //-----------------------------------------------------------------------------
559 double Group::getParam(std::string paramID) const
560 {
561  return params.getValue(paramID);
562 }
563 
564 //-----------------------------------------------------------------------------
565 // Function : Group::setScaleVec
566 // Purpose :
567 // Special Notes :
568 // Scope : public
569 // Creator :
570 // Creation Date :
571 //-----------------------------------------------------------------------------
572 void Group::setScaleVec(const NOX::Abstract::Vector& s)
573 {
574  scalingVecPtr = &s;
575 }
576 
577 //-----------------------------------------------------------------------------
578 // Function : Group::getScaleVec()
579 // Purpose :
580 // Special Notes :
581 // Scope : public
582 // Creator :
583 // Creation Date :
584 //-----------------------------------------------------------------------------
585 const NOX::Abstract::Vector& Group::getScaleVec() const
586 {
587  if (scalingVecPtr == 0) {
588  const std::string message = "Group::getScaleVec() - scaling vector not set!";
589  N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
590  }
591 
592  return (*scalingVecPtr);
593 }
594 
595 //-----------------------------------------------------------------------------
596 // Function : Group::augmentJacobianForHomotopy
597 // Purpose :
598 // Special Notes :
599 // Scope : public
600 // Creator :
601 // Creation Date :
602 //-----------------------------------------------------------------------------
603 NOX::Abstract::Group::ReturnType
605 {
606 
607  Linear::Matrix& jacobian =
608  const_cast<Linear::Matrix&>(sharedSystemPtr_->getJacobian());
609 
610  //jacobian.printPetraObject();
611  jacobian.scale(conParamValue);
612  jacobian.getDiagonal(*tmpVectorPtr);
613  (*tmpVectorPtr).addScalar(1.0 - conParamValue);
614  jacobian.replaceDiagonal(*tmpVectorPtr);
615  //jacobian.printPetraObject();
616 
617  return NOX::Abstract::Group::Ok;
618 }
619 
620 //-----------------------------------------------------------------------------
621 // Function : Group::printSolution
622 // Purpose :
623 // Special Notes :
624 // Scope : public
625 // Creator :
626 // Creation Date :
627 //-----------------------------------------------------------------------------
628 void Group::printSolution (const double conParam) const
629 {
630  // ERK: This is a KLUDGE! I put it here because the "printSolution"
631  // functions were the only place in this class that were called
632  // only after a continuation step was successful.
633  //
634  // Note: homotopy output is now called from the time integrator,
635  // so it is this function still results in the the solution being
636  // printed.
637  //
638  // Note: This will be replaced by "stepSuccess" (see below), once
639  // stepSuccess completely works.
640  anaInt.completeHomotopyStep(loader, params.getNamesVector(), params.getValuesVector(), xVec_.getNativeVectorPtr());
641 
642  return;
643 }
644 
645 //-----------------------------------------------------------------------------
646 // Function : Group::printSolution
647 // Purpose :
648 // Special Notes :
649 // Scope : public
650 // Creator :
651 // Creation Date :
652 //-----------------------------------------------------------------------------
653 void Group::printSolution (const NOX::Abstract::Vector &x,
654  const double conParam) const
655 {
656  // const N_NLS_NOX::Vector& noxVector =
657  // dynamic_cast<const N_NLS_NOX::Vector&>(x);
658 
659  // ERK: This is a KLUDGE! I put it here because the "printSolution"
660  // functions were the only place in this class that were called
661  // only after a continuation step was successful.
662  //
663  // Note: homotopy output is now called from the time integrator,
664  // so it is this function still results in the the solution being
665  // printed.
666  //
667  // Note: This will be replaced by "stepSuccess" (see below), once
668  // stepSuccess completely works.
669  anaInt.completeHomotopyStep(loader, params.getNamesVector(), params.getValuesVector(), xVec_.getNativeVectorPtr());
670 
671  return;
672 }
673 
674 //-----------------------------------------------------------------------------
675 // Function : Group::stepFailed
676 // Purpose :
677 // Special Notes :
678 // Scope : public
679 // Creator :
680 // Creation Date :
681 //-----------------------------------------------------------------------------
683 {
684  if (DEBUG_NONLINEAR)
685  dout() << "In Group::stepFailed" << std::endl;
686 
688 }
689 
690 //-----------------------------------------------------------------------------
691 // Function : Group::stepSucceeded
692 // Purpose :
693 // Special Notes :
694 // Scope : public
695 // Creator :
696 // Creation Date :
697 //-----------------------------------------------------------------------------
699 {
700  if (DEBUG_NONLINEAR)
701  dout() << "In Group::stepSucceeded" << std::endl;
702 
703 #ifdef Xyce_UPDATED_LOCA
704  // Do nothing. Unfortunately, this function doesn't get called
705  // on the initial solve. (for continuation param = initial value)
706  // So, for now, still have to use the printSolution function, which
707  // is called every time.
708  const std::string message = "Group::stepSucceeded is not fully supported yet! Recompile without Xyce_UPDATED_LOCA defined\n";
709  N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
710 #endif
711 }
712 
713 //-----------------------------------------------------------------------------
714 // Function : Group::setAugmentLinearSystem
715 // Purpose :
716 // Special Notes :
717 // Scope : public
718 // Creator :
719 // Creation Date :
720 //-----------------------------------------------------------------------------
721 void Group::setAugmentLinearSystem(bool enable_value,
722  const Teuchos::RCP<N_NLS_NOX::AugmentLinSys>& ls)
723 {
724  useAugmentLinSys_ = enable_value;
725  augmentLSStrategy_ = ls;
726 }
727 
728 //-----------------------------------------------------------------------------
729 // Function : Group::setNonContinuationFlag
730 // Purpose :
731 // Special Notes :
732 // Scope : public
733 // Creator :
734 // Creation Date :
735 //-----------------------------------------------------------------------------
737 {
739 }
740 
741 //-----------------------------------------------------------------------------
742 // Function : Group::getNonContinuationFlag
743 // Purpose :
744 // Special Notes :
745 // Scope : public
746 // Creator :
747 // Creation Date :
748 //-----------------------------------------------------------------------------
750 {
751  return nonContinuationSolve_;
752 }
753 
754 }}} // namespace N_NLS_LOCA
Definition: N_NLS_fwd.h:96
NOX::Abstract::Group::ReturnType augmentJacobianForHomotopy(double conParamValue)
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()
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 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.