Commit be0d1f6f authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

rmv comments

parent 1aa931fa
......@@ -12,18 +12,17 @@ Newton::Newton (Solver& s)
void Newton::operator () (const Assemble& A, Vector& u) {
Start = Date();
// double E, E_0;
A.Dirichlet (u);
vout (9) << " Newton: u(0)= " << endl << u << endl;
Vector r (u);
Matrix J (u);
d = d_0 = A.Residual (u, r);
// E = E_0 = A.Energy (u);
double eps = Eps + Red * d;
double d_previous = d;
int LS_cnt = 0;
int JU_cnt = 0; // counts iteration steps without Jacobian update
// counts iteration steps without Jacobian update
int JU_cnt = 0;
Vector c (r);
for (iter = 0; iter < max_iter; ++iter) {
......@@ -43,7 +42,6 @@ void Newton::operator () (const Assemble& A, Vector& u) {
u -= c;
vout (5) << " Newton: u-c " << u << endl;
d = A.Residual (u, r);
// E = A.Energy (u);
if (d > d_previous) {
for (int l = 1; l <= LS_iter; ++l) {
if (iter == 0)
......@@ -56,7 +54,6 @@ void Newton::operator () (const Assemble& A, Vector& u) {
c *= 0.5;
u += c;
d = A.Residual (u, r);
// E = A.Energy (u);
if (d < d_previous) break;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment