Xyce  6.1
N_NLS_NOX_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_NOX_Group.C,v $
27 //
28 // Purpose : Interface to Xyce vectors for NOX.
29 //
30 // Special Notes :
31 //
32 // Creator : Tammy Kolda, NLS, 8950
33 //
34 // Creation Date : 01/31/02
35 //
36 // Revision Information:
37 // ---------------------
38 //
39 // Revision Number: $Revision: 1.35.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 
49 // ---------- Standard Includes ----------
50 
51 // ---------- Xyce Includes ----------
52 
53 #include <N_NLS_NOX_Group.h>
54 #include <N_NLS_NOX.h>
55 #include <N_NLS_NOX_Vector.h>
56 #include <N_NLS_NOX_SharedSystem.h>
57 #include <N_LAS_Vector.h>
58 #include <N_ERH_ErrorMgr.h>
59 
60 // ---------- NOX Includes ----------
61 #include <NOX_Abstract_Vector.H>
62 
63 namespace Xyce {
64 namespace Nonlinear {
65 namespace N_NLS_NOX {
66 
67 //-----------------------------------------------------------------------------
68 // Function : N_NLS_LOCA::Group::Group
69 // Purpose :
70 // Special Notes :
71 // Scope : public
72 // Creator :
73 // Creation Date :
74 //-----------------------------------------------------------------------------
76  sharedSystemPtr_(&s),
77  xVecPtr_(Teuchos::rcp(dynamic_cast<Vector*>(s.cloneSolutionVector()))),
78  xVec_(*xVecPtr_),
79  fVecPtr_(Teuchos::rcp_dynamic_cast<Vector>(xVec_.clone(NOX::ShapeCopy))),
80  fVec_(*fVecPtr_),
81  normF_(0.0),
82  haveSolverFactors_(false)
83 {
84  resetIsValid_();
85 }
86 
87 //-----------------------------------------------------------------------------
88 // Function : N_NLS_LOCA::Group::Group
89 // Purpose :
90 // Special Notes :
91 // Scope : public
92 // Creator :
93 // Creation Date :
94 //-----------------------------------------------------------------------------
95 Group::Group(const Group& source, NOX::CopyType type) :
96  sharedSystemPtr_(source.sharedSystemPtr_),
97  xVecPtr_(Teuchos::rcp_dynamic_cast<Vector>(source.getX().clone(type))),
98  xVec_(*xVecPtr_),
99  fVecPtr_(Teuchos::rcp_dynamic_cast<Vector>(xVec_.clone(NOX::ShapeCopy))),
100  fVec_(*fVecPtr_),
101  normF_(0.0),
102  haveSolverFactors_(false)
103 {
104  // Default the is valid flags to "false"
105  resetIsValid_();
106 
107  switch(type)
108  {
109  case NOX::DeepCopy:
110 
111  // Copy F
112  if (source.isF()) {
113  isValidF_ = true;
114  fVec_ = source.fVec_;
115  normF_ = source.normF_;
116  if (sharedSystemPtr_->areStateVectors(&source))
118  }
119 
120  // Take ownership of the Jacobian.
121  if (source.isJacobian()) {
122  //isValidJacobian_ = false;
123  isValidJacobian_ = true;
126  }
127 
128  // Copy Gradient Vector
129  if (source.isGradient()) {
130 
131  if (Teuchos::is_null(gradVecPtr_)) {
132  gradVecPtr_ = Teuchos::rcp_dynamic_cast<Vector>
133  (source.gradVecPtr_->clone(NOX::DeepCopy));
134  }
135  else
136  *gradVecPtr_ = *(source.gradVecPtr_);
137 
138  isValidGradient_ = true;
139  }
140 
141  // Copy Newton Vector
142  if (source.isNewton()) {
143 
144  if (Teuchos::is_null(newtonVecPtr_)) {
145  newtonVecPtr_ = Teuchos::rcp_dynamic_cast<Vector>
146  (source.newtonVecPtr_->clone(NOX::DeepCopy));
147  }
148  else
149  *newtonVecPtr_ = *(source.newtonVecPtr_);
150 
151  isValidNewton_ = true;
152  }
153 
154  break;
155 
156  case NOX::ShapeCopy:
157  resetIsValid_();
158  break;
159 
160  default:
161  const std::string message = "N_NLS::NOX::Group::Group() - Invalid ConstructorType for group copy constructor";
162  N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
163  }
164 }
165 
166 //-----------------------------------------------------------------------------
167 // Function : N_NLS_LOCA::Group::~Group
168 // Purpose :
169 // Special Notes :
170 // Scope : public
171 // Creator :
172 // Creation Date :
173 //-----------------------------------------------------------------------------
175 {
176 }
177 
178 //-----------------------------------------------------------------------------
179 // Function : N_NLS_LOCA::Group::operator=
180 // Purpose :
181 // Special Notes :
182 // Scope : public
183 // Creator :
184 // Creation Date :
185 //-----------------------------------------------------------------------------
186 NOX::Abstract::Group& Group::operator=(const NOX::Abstract::Group& source)
187 {
188  return operator=(dynamic_cast<const Group&>(source));
189 }
190 
191 //-----------------------------------------------------------------------------
192 // Function : N_NLS_LOCA::Group::operator=
193 // Purpose :
194 // Special Notes :
195 // Scope : public
196 // Creator :
197 // Creation Date :
198 //-----------------------------------------------------------------------------
199 NOX::Abstract::Group& Group::operator=(const Group& source)
200 {
201  resetIsValid_();
202 
203  // Copy solution vector
204  xVec_ = source.xVec_;
205 
206  // Copy residual vector and take ownership of state vectors
207  if (source.isF()) {
208  isValidF_ = true;
209  fVec_ = source.fVec_;
210  normF_ = source.normF_;
211  if (source.sharedSystemPtr_->areStateVectors(&source))
213  }
214 
215  // Copy the Jacobian by taking ownership of the shared system
216  if (source.isJacobian()) {
217  isValidJacobian_ = true;
220  }
221 
222  // Copy Gradient Vector
223  if ( source.isGradient() ) {
224 
225  if (Teuchos::is_null(gradVecPtr_)) {
226  gradVecPtr_ = Teuchos::rcp_dynamic_cast<Vector>
227  (source.gradVecPtr_->clone(NOX::DeepCopy));
228  }
229  else
230  *gradVecPtr_ = *(source.gradVecPtr_);
231 
232  isValidGradient_ = true;
233  }
234 
235  // Copy Newton Vector
236  if (source.isNewton()) {
237  if (Teuchos::is_null(newtonVecPtr_)) {
238  newtonVecPtr_ = Teuchos::rcp_dynamic_cast<Vector>
239  (source.newtonVecPtr_->clone(NOX::DeepCopy));
240  }
241  else
242  *newtonVecPtr_ = *(source.newtonVecPtr_);
243 
244  isValidNewton_ = true;
245  }
246 
247  return *this;
248 }
249 
250 //-----------------------------------------------------------------------------
251 // Function : N_NLS_LOCA::Group::setX
252 // Purpose :
253 // Special Notes :
254 // Scope : public
255 // Creator :
256 // Creation Date :
257 //-----------------------------------------------------------------------------
258 void Group::setX(const NOX::Abstract::Vector& input)
259 {
260  setX(dynamic_cast<const Vector&>(input));
261 }
262 
263 //-----------------------------------------------------------------------------
264 // Function : N_NLS_LOCA::Group::setX
265 // Purpose :
266 // Special Notes :
267 // Scope : public
268 // Creator :
269 // Creation Date :
270 //-----------------------------------------------------------------------------
271 void Group::setX(const Vector& input)
272 {
273  resetIsValid_();
274  xVec_ = input;
275 }
276 
277 
278 //-----------------------------------------------------------------------------
279 // Function : N_NLS_LOCA::Group::computeX
280 // Purpose :
281 // Special Notes :
282 // Scope : public
283 // Creator :
284 // Creation Date :
285 //-----------------------------------------------------------------------------
286 void Group::computeX(const NOX::Abstract::Group& grp,
287  const NOX::Abstract::Vector& d,
288  double step)
289 {
290  computeX(dynamic_cast<const Group&>(grp), dynamic_cast<const Vector&>(d),
291  step);
292 }
293 
294 //-----------------------------------------------------------------------------
295 // Function : N_NLS_LOCA::Group::computeX
296 // Purpose :
297 // Special Notes :
298 // Scope : public
299 // Creator :
300 // Creation Date :
301 //-----------------------------------------------------------------------------
302 void Group::computeX(const Group& grp, const Vector& d, double step)
303 {
304  resetIsValid_();
305  xVec_.update(step, d, 1.0, grp.getX(), 0.0);
306 }
307 
308 //-----------------------------------------------------------------------------
309 // Function : N_NLS_LOCA::Group::computeF
310 // Purpose :
311 // Special Notes :
312 // Scope : public
313 // Creator :
314 // Creation Date :
315 //-----------------------------------------------------------------------------
316 NOX::Abstract::Group::ReturnType Group::computeF()
317 {
318  if( isF() ) return Ok;
319 
321 
322  // Xyce computes "-f" for efficiency of Newton solve:
323  // "Js = f" instead of "Js = -f" We need the real F!
324  fVec_.scale(-1.0);
325 
326  normF_ = fVec_.norm();
327 
328  return (isF()?Ok:Failed);
329 }
330 
331 //-----------------------------------------------------------------------------
332 // Function : N_NLS_LOCA::Group::computeJacobian
333 // Purpose :
334 // Special Notes :
335 // Scope : public
336 // Creator :
337 // Creation Date :
338 //-----------------------------------------------------------------------------
339 NOX::Abstract::Group::ReturnType Group::computeJacobian()
340 {
341  if (isJacobian()) return Ok;
342 
344 
345  haveSolverFactors_ = false;
346 
347  return (isJacobian()?Ok:Failed);
348 }
349 
350 //-----------------------------------------------------------------------------
351 // Function : N_NLS_LOCA::Group::computeGradient
352 // Purpose :
353 // Special Notes :
354 // Scope : public
355 // Creator :
356 // Creation Date :
357 //-----------------------------------------------------------------------------
358 NOX::Abstract::Group::ReturnType Group::computeGradient()
359 {
360  if (isGradient()) return Ok;
361 
362  if (!isF())
363  throwError("computeGradient", "F is not Valid!");
364 
365  if (!isJacobian())
366  throwError("computeGradient", "Jacobian is not Valid!");
367 
368  if (Teuchos::is_null(gradVecPtr_))
369  gradVecPtr_ = Teuchos::rcp_dynamic_cast<Vector>
370  (fVec_.clone(NOX::ShapeCopy));
371 
372  NOX::Abstract::Group::ReturnType status =
374 
375  //isValidGradient_ = sharedSystemPtr_->computeGradient(fVec_, *gradVecPtr_);
376  if (status == Ok)
377  isValidGradient_ = true;
378  else
379  isValidGradient_ = false;
380 
381  return (isGradient()?Ok:Failed);
382 }
383 
384 //-----------------------------------------------------------------------------
385 // Function : N_NLS_LOCA::Group::computeNewton
386 // Purpose :
387 // Special Notes :
388 // Scope : public
389 // Creator :
390 // Creation Date :
391 //-----------------------------------------------------------------------------
392 NOX::Abstract::Group::ReturnType Group::computeNewton(Teuchos::ParameterList& params)
393 {
394  if (isNewton()) return Ok;
395 
396  if (!isF())
397  throwError("computeNewton", "F is not Valid!");
398 
399  if (!isJacobian())
400  throwError("computeNewton", "Jacobian is not Valid!");
401 
402  if (Teuchos::is_null(newtonVecPtr_))
403  newtonVecPtr_ = Teuchos::rcp_dynamic_cast<Vector>
404  (fVec_.clone(NOX::ShapeCopy));
405 
407 
408  haveSolverFactors_ = true;
409 
410  newtonVecPtr_->scale(-1.0);
411 
412  return (isNewton()?Ok:Failed);
413 }
414 
415 //-----------------------------------------------------------------------------
416 // Function : N_NLS_LOCA::Group::applyJacobian
417 // Purpose :
418 // Special Notes :
419 // Scope : public
420 // Creator :
421 // Creation Date :
422 //-----------------------------------------------------------------------------
423 NOX::Abstract::Group::ReturnType Group::applyJacobian(const NOX::Abstract::Vector& input, NOX::Abstract::Vector& result) const
424 {
425  return applyJacobian(dynamic_cast<const Vector&>(input), dynamic_cast<Vector&>(result));
426 }
427 
428 //-----------------------------------------------------------------------------
429 // Function : N_NLS_LOCA::Group::applyJacobian
430 // Purpose :
431 // Special Notes :
432 // Scope : public
433 // Creator :
434 // Creation Date :
435 //-----------------------------------------------------------------------------
436 NOX::Abstract::Group::ReturnType Group::applyJacobian(const Vector& input, Vector& result) const
437 {
438  if (!isJacobian()) {
439  throwError("applyJacobian", "Jacobian is not Valid!");
440 
441  //RPP Hack to get Homotopy working!!
442  //cout << "RPP: Inefficient Jacobian computation!!" << endl;
443  //(const_cast<Group*>(this))->computeF();
444  //(const_cast<Group*>(this))->computeJacobian();
445  }
446 
447  return (sharedSystemPtr_->applyJacobian(input, result)?Ok:Failed);
448 }
449 
450 //-----------------------------------------------------------------------------
451 // Function : N_NLS_LOCA::Group::applyJacobianTranspose
452 // Purpose :
453 // Special Notes :
454 // Scope : public
455 // Creator :
456 // Creation Date :
457 //-----------------------------------------------------------------------------
458 NOX::Abstract::Group::ReturnType Group::applyJacobianTranspose(const NOX::Abstract::Vector& input,
459  NOX::Abstract::Vector& result) const
460 {
461  return applyJacobianTranspose(dynamic_cast<const Vector&>(input),
462  dynamic_cast<Vector&>(result));
463 }
464 
465 //-----------------------------------------------------------------------------
466 // Function : N_NLS_LOCA::Group::applyJacobianTranspose
467 // Purpose :
468 // Special Notes :
469 // Scope : public
470 // Creator :
471 // Creation Date :
472 //-----------------------------------------------------------------------------
473 NOX::Abstract::Group::ReturnType Group::applyJacobianTranspose(const Vector& input, Vector& result) const
474 {
475  if (!isJacobian())
476  throwError("applyJacobianTranspose", "Jacobian is not Valid!");
477 
478  return (sharedSystemPtr_->applyJacobianTranspose(input, result)?Ok:Failed);
479 }
480 
481 //-----------------------------------------------------------------------------
482 // Function : N_NLS_LOCA::Group::applyJacobianInverse
483 // Purpose :
484 // Special Notes :
485 // Scope : public
486 // Creator :
487 // Creation Date :
488 //-----------------------------------------------------------------------------
489 NOX::Abstract::Group::ReturnType
490 Group::applyJacobianInverse(Teuchos::ParameterList& params,
491  const NOX::Abstract::Vector& input,
492  NOX::Abstract::Vector& result) const
493 {
494  return applyJacobianInverse(params, dynamic_cast<const Vector&>(input),
495  dynamic_cast<Vector&>(result));
496 }
497 
498 //-----------------------------------------------------------------------------
499 // Function : N_NLS_LOCA::Group::applyJacobianInverse
500 // Purpose :
501 // Special Notes :
502 // Scope : public
503 // Creator :
504 // Creation Date :
505 //-----------------------------------------------------------------------------
506 NOX::Abstract::Group::ReturnType
507 Group::applyJacobianInverse(Teuchos::ParameterList& params,
508  const Vector& input, Vector& result) const
509 {
510  if (!isJacobian())
511  throwError("applyJacobianInverse", "Jacobian is not Valid!");
512 
513  bool status = sharedSystemPtr_->computeNewton(input, result, params);
514 
515  haveSolverFactors_ = true;
516 
517  return (status ? Ok : Failed);
518 }
519 
520 //-----------------------------------------------------------------------------
521 // Function : N_NLS_LOCA::Group::applyRightPreconditioning
522 // Purpose :
523 // Special Notes :
524 // Scope : public
525 // Creator :
526 // Creation Date :
527 //-----------------------------------------------------------------------------
528 NOX::Abstract::Group::ReturnType
530  Teuchos::ParameterList& params,
531  const NOX::Abstract::Vector& input,
532  NOX::Abstract::Vector& result) const
533 {
534  return applyRightPreconditioning(useTranspose, params,
535  dynamic_cast<const Vector&>(input),
536  dynamic_cast<Vector&> (result));
537 }
538 
539 //-----------------------------------------------------------------------------
540 // Function : N_NLS_LOCA::Group::applyRightPreconditioning
541 // Purpose :
542 // Special Notes :
543 // Scope : public
544 // Creator :
545 // Creation Date :
546 //-----------------------------------------------------------------------------
547 NOX::Abstract::Group::ReturnType
549  Teuchos::ParameterList& params,
550  const Vector& input,
551  Vector& result) const
552 {
553  if (!isJacobian()) {
554  // throw error - Jacobian is not owned by this group
555  }
556 
557  if (!isValidPreconditioner_) {
559  isValidPreconditioner_ = true;
560  }
561  sharedSystemPtr_->applyRightPreconditioning(useTranspose, params,
562  input, result);
563 
564  return NOX::Abstract::Group::Ok;
565 }
566 
567 //-----------------------------------------------------------------------------
568 // Function : N_NLS_LOCA::Group::isF
569 // Purpose :
570 // Special Notes :
571 // Scope : public
572 // Creator :
573 // Creation Date :
574 //-----------------------------------------------------------------------------
575 bool Group::isF() const
576 {
577  return isValidF_;
578 }
579 
580 //-----------------------------------------------------------------------------
581 // Function : N_NLS_LOCA::Group::isJacobian
582 // Purpose :
583 // Special Notes :
584 // Scope : public
585 // Creator :
586 // Creation Date :
587 //-----------------------------------------------------------------------------
588 bool Group::isJacobian() const
589 {
591 }
592 
593 //-----------------------------------------------------------------------------
594 // Function : N_NLS_LOCA::Group::isGradient
595 // Purpose :
596 // Special Notes :
597 // Scope : public
598 // Creator :
599 // Creation Date :
600 //-----------------------------------------------------------------------------
601 bool Group::isGradient() const
602 {
603  return isValidGradient_;
604 }
605 
606 //-----------------------------------------------------------------------------
607 // Function : N_NLS_LOCA::Group::isNewton
608 // Purpose :
609 // Special Notes :
610 // Scope : public
611 // Creator :
612 // Creation Date :
613 //-----------------------------------------------------------------------------
614 bool Group::isNewton() const
615 {
616  return isValidNewton_;
617 }
618 
619 //-----------------------------------------------------------------------------
620 // Function : N_NLS_LOCA::Group::getX
621 // Purpose :
622 // Special Notes :
623 // Scope : public
624 // Creator :
625 // Creation Date :
626 //-----------------------------------------------------------------------------
627 const NOX::Abstract::Vector& Group::getX() const
628 {
629  return xVec_;
630 }
631 
632 //-----------------------------------------------------------------------------
633 // Function : N_NLS_LOCA::Group::getF
634 // Purpose :
635 // Special Notes :
636 // Scope : public
637 // Creator :
638 // Creation Date :
639 //-----------------------------------------------------------------------------
640 const NOX::Abstract::Vector& Group::getF() const
641 {
642  if (!isF()) {
643  throwError("getF",
644  "F is not current with respect to the solution vector!");
645  }
646 
647  return fVec_;
648 }
649 
650 //-----------------------------------------------------------------------------
651 // Function : N_NLS_LOCA::Group::getNormF
652 // Purpose :
653 // Special Notes :
654 // Scope : public
655 // Creator :
656 // Creation Date :
657 //-----------------------------------------------------------------------------
658 double Group::getNormF() const
659 {
660  if (!isF()) {
661  //cout << "Group::getNormF() - F is not current "
662  // << "with respect to the solution vector!" << endl;
663  //throw "NOX Error";
664  (const_cast<Group*>(this))->computeF();
665  }
666 
667  return normF_;
668 }
669 
670 //-----------------------------------------------------------------------------
671 // Function : N_NLS_LOCA::Group::getGradient
672 // Purpose :
673 // Special Notes :
674 // Scope : public
675 // Creator :
676 // Creation Date :
677 //-----------------------------------------------------------------------------
678 const NOX::Abstract::Vector& Group::getGradient() const
679 {
680  if (Teuchos::is_null(gradVecPtr_))
681  throwError("getGradient", "gradVecPtr_ is 0!");
682 
683  return *gradVecPtr_;
684 }
685 
686 //-----------------------------------------------------------------------------
687 // Function : N_NLS_LOCA::Group::getNewton
688 // Purpose :
689 // Special Notes :
690 // Scope : public
691 // Creator :
692 // Creation Date :
693 //-----------------------------------------------------------------------------
694 const NOX::Abstract::Vector& Group::getNewton() const
695 {
696  if (Teuchos::is_null(newtonVecPtr_))
697  {
698  throwError("getNewton", "newtonVecPtr_ is 0!");
699  }
700  return *newtonVecPtr_;
701 }
702 
703 //-----------------------------------------------------------------------------
704 // Function : N_NLS_LOCA::Group::clone
705 // Purpose :
706 // Special Notes :
707 // Scope : public
708 // Creator :
709 // Creation Date :
710 //-----------------------------------------------------------------------------
711 Teuchos::RCP<NOX::Abstract::Group>
712 Group::clone(NOX::CopyType type) const
713 {
714  Teuchos::RCP<Group> ptr = Teuchos::rcp(new Group(*this, type));
715  return ptr;
716 }
717 
718 //-----------------------------------------------------------------------------
719 // Function : N_NLS_LOCA::Group::resetIsValid
720 // Purpose :
721 // Special Notes :
722 // Scope : public
723 // Creator :
724 // Creation Date :
725 //-----------------------------------------------------------------------------
726 // resets the isValid flags to false
728 {
729  isValidF_ = false;
730  isValidGradient_ = false;
731  isValidJacobian_ = false;
732  isValidNewton_ = false;
733  isValidPreconditioner_ = false;
734 }
735 
736 //-----------------------------------------------------------------------------
737 // Function : N_NLS_LOCA::Group::throwError
738 // Purpose :
739 // Special Notes :
740 // Scope : public
741 // Creator :
742 // Creation Date :
743 //-----------------------------------------------------------------------------
744 void Group::throwError(std::string method, std::string message) const
745 {
746  const std::string leader = "N_NLS::NOX::Group::";
747  const std::string fcn = "() - ";
748 
749  std::string error = leader + method + fcn + message;
750 
751  N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, error);
752 }
753 
754 }}} // namespace N_NLS_NOX
const NOX::Abstract::Vector & getGradient() const
Teuchos::RCP< NOX::Abstract::Vector > clone(NOX::CopyType type=NOX::DeepCopy) const
bool areStateVectors(const Group *grp) const
void setX(const Vector &input)
bool applyJacobian(const Vector &input, Vector &result) const
const NOX::Abstract::Vector & getX() const
bool computeNewton(const Vector &F, Vector &Newton, Teuchos::ParameterList &params)
Pure virtual class to augment a linear system.
bool applyJacobianTranspose(const Vector &input, Vector &result) const
Teuchos::RCP< Vector > newtonVecPtr_
NOX::Abstract::Group::ReturnType computeF()
void computeX(const Group &grp, const Vector &d, double step)
NOX::Abstract::Group::ReturnType applyJacobianInverse(Teuchos::ParameterList &params, const Vector &input, Vector &result) const
NOX::Abstract::Vector & scale(double gamma)
NOX::Abstract::Group::ReturnType computeGradient()
bool applyRightPreconditioning(bool useTranspose, Teuchos::ParameterList &params, const Vector &input, Vector &result)
const NOX::Abstract::Vector & getF() const
NOX::Abstract::Group::ReturnType computeJacobian()
NOX::Abstract::Group::ReturnType computeNewton(Teuchos::ParameterList &params)
NOX::Abstract::Group::ReturnType applyRightPreconditioning(bool useTranspose, Teuchos::ParameterList &params, const Vector &input, Vector &result) const
NOX::Abstract::Group & operator=(const Group &source)
NOX::Abstract::Vector & update(double alpha, const Vector &a, double gamma=0.0)
Teuchos::RCP< Vector > gradVecPtr_
const Xyce::Linear::Matrix & getJacobian() const
double norm(NOX::Abstract::Vector::NormType type=NOX::Abstract::Vector::TwoNorm) const
NOX::Abstract::Group::ReturnType applyJacobian(const Vector &input, Vector &result) const
void error(const std::string &msg)
Definition: N_NLS_NOX.C:61
void throwError(std::string method, std::string message) const
bool isJacobianOwner(const Group *grp) const
bool computeF(const Vector &solution, Vector &F, const Group *grp)
Teuchos::RCP< NOX::Abstract::Group > clone(NOX::CopyType type=NOX::DeepCopy) const
const NOX::Abstract::Vector & getNewton() const
NOX::Abstract::Group::ReturnType applyJacobianTranspose(const Vector &input, Vector &result) const
Definition: N_NLS_fwd.h:107