46 #include <Xyce_config.h>
57 #include "N_LAS_Vector.h"
58 #include "N_ERH_ErrorMgr.h"
61 #include "NOX_Abstract_Vector.H"
63 using namespace N_NLS_NOX;
75 xVecPtr_(Teuchos::rcp(dynamic_cast<N_NLS_NOX::
Vector*>(s.cloneSolutionVector()))),
77 fVecPtr_(Teuchos::rcp_dynamic_cast<N_NLS_NOX::
Vector>(xVec_.clone(NOX::ShapeCopy))),
80 haveSolverFactors_(false)
94 sharedSystemPtr_(source.sharedSystemPtr_),
95 xVecPtr_(Teuchos::rcp_dynamic_cast<N_NLS_NOX::
Vector>(source.getX().clone(type))),
97 fVecPtr_(Teuchos::rcp_dynamic_cast<N_NLS_NOX::
Vector>(xVec_.clone(NOX::ShapeCopy))),
100 haveSolverFactors_(false)
159 const std::string message =
"N_NLS::NOX::Group::Group() - Invalid ConstructorType for group copy constructor";
160 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
186 return operator=(dynamic_cast<const Group&>(source));
258 setX(dynamic_cast<const Vector&>(input));
285 const NOX::Abstract::Vector& d,
288 computeX(dynamic_cast<const Group&>(grp), dynamic_cast<const Vector&>(d),
316 if(
isF() )
return Ok;
326 return (
isF()?Ok:Failed);
361 throwError(
"computeGradient",
"F is not Valid!");
364 throwError(
"computeGradient",
"Jacobian is not Valid!");
370 NOX::Abstract::Group::ReturnType status =
395 throwError(
"computeNewton",
"F is not Valid!");
398 throwError(
"computeNewton",
"Jacobian is not Valid!");
421 NOX::Abstract::Group::ReturnType
Group::applyJacobian(
const NOX::Abstract::Vector& input, NOX::Abstract::Vector& result)
const
423 return applyJacobian(dynamic_cast<const Vector&>(input), dynamic_cast<Vector&>(result));
437 throwError(
"applyJacobian",
"Jacobian is not Valid!");
457 NOX::Abstract::Vector& result)
const
460 dynamic_cast<Vector&>(result));
474 throwError(
"applyJacobianTranspose",
"Jacobian is not Valid!");
487 NOX::Abstract::Group::ReturnType
489 const NOX::Abstract::Vector& input,
490 NOX::Abstract::Vector& result)
const
493 dynamic_cast<Vector&>(result));
504 NOX::Abstract::Group::ReturnType
509 throwError(
"applyJacobianInverse",
"Jacobian is not Valid!");
515 return (status ? Ok : Failed);
526 NOX::Abstract::Group::ReturnType
528 Teuchos::ParameterList& params,
529 const NOX::Abstract::Vector& input,
530 NOX::Abstract::Vector& result)
const
533 dynamic_cast<const Vector&>(input),
534 dynamic_cast<Vector&> (result));
545 NOX::Abstract::Group::ReturnType
547 Teuchos::ParameterList& params,
562 return NOX::Abstract::Group::Ok;
642 "F is not current with respect to the solution vector!");
679 throwError(
"getGradient",
"gradVecPtr_ is 0!");
696 throwError(
"getNewton",
"newtonVecPtr_ is 0!");
709 Teuchos::RefCountPtr<NOX::Abstract::Group>
712 Teuchos::RefCountPtr<Group> ptr = Teuchos::rcp(
new Group(*
this, type));
744 const std::string leader =
"N_NLS::NOX::Group::";
745 const std::string fcn =
"() - ";
747 std::string
error = leader + method + fcn + message;
749 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, error);