NOX::Abstract::Group::ReturnType NOX::LAPACK::Group::computeNewton(Teuchos::ParameterList& p) { if (isNewton()) return NOX::Abstract::Group::Ok; if (!isF()) { std::cerr << "ERROR: NOX::Example::Group::computeNewton() - invalid F" << std::endl; throw "NOX Error"; } if (!isJacobian()) { std::cerr << "ERROR: NOX::Example::Group::computeNewton() - invalid Jacobian" << std::endl; throw "NOX Error"; } NOX::Abstract::Group::ReturnType status = applyJacobianInverse(p, fVector, newtonVector); isValidNewton = (status == NOX::Abstract::Group::Ok); // Scale soln by -1 newtonVector.scale(-1.0); // Return solution return status; }
NOX::Abstract::Group::ReturnType LOCA::PhaseTransition::ExtendedGroup::computeNewton(Teuchos::ParameterList& p) { if (isNewton()) return NOX::Abstract::Group::Ok; if (!isF()) { cerr << "ERROR: NOX::Example::Group::computeNewton() - invalid F" << endl; throw "NOX Error"; } if (!isJacobian()) { cerr << "ERROR: NOX::Example::Group::computeNewton() - invalid Jacobian" << endl; throw "NOX Error"; } NOX::Abstract::Group::ReturnType status = applyJacobianInverse(p, *fVector, *newtonVector); isValidNewton = (status == NOX::Abstract::Group::Ok); // Scale soln by -1 newtonVector->scale(-1.0); // Return solution return status; }