46 #include <Xyce_config.h>
55 #include "N_LAS_Vector.h"
57 #include "NOX_Solver_LineSearchBased.H"
61 using namespace N_NLS_NOX;
66 double epsilon_a,
double epsilon_r,
67 double tol,
bool isTransient) :
68 epsilon_a_(epsilon_a),
69 epsilon_r_(epsilon_r),
71 isTransient_(isTransient)
74 status_ = NOX::StatusTest::Unconverged;
94 status_ = NOX::StatusTest::Unconverged;
96 int niters = problem.getNumIterations();
102 (problem.getSolutionGroup().getX()).getNativeVectorRef();
104 (problem.getPreviousSolutionGroup().getX()).getNativeVectorRef();
122 int length = x.localLength();
123 for (
int i = 0; i < length; ++i ) {
126 epsilon_r_ * Xycemax(fabs(x[i]), fabs(oldTimeStepX[i])) +
138 update.update(1.0, x, -1.0, oldX, 0.0);
141 #ifdef Xyce_SPICE_NORMS
142 update.wMaxNorm(weights,tmp,&
result_);
144 update.wRMSNorm(weights,&
result_);
153 const NOX::Solver::LineSearchBased* test = 0;
154 test =
dynamic_cast<const NOX::Solver::LineSearchBased*
>(&problem);
160 status_ = NOX::StatusTest::Converged;
167 for (
int j = 0; j < indent; ++j )
170 stream <<
"Weighted Update = " << NOX::Utils::sciformat(
result_, 3) <<
" < " << NOX::Utils::sciformat(
tol_, 3) <<
"\n";
172 for (
int j = 0; j < indent; ++j )
174 stream << std::setw(13) <<
" ";
175 stream <<
"(with e_r = " << NOX::Utils::sciformat(
epsilon_r_, 3);
176 stream <<
" and e_a = " << NOX::Utils::sciformat(
epsilon_a_, 3) <<
")"; ;