~ubuntu-branches/ubuntu/natty/dolfin/natty

« back to all changes in this revision

Viewing changes to dolfin/nls/NewtonSolver.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Johannes Ring
  • Date: 2011-02-24 10:34:44 UTC
  • mfrom: (1.1.7 upstream) (14.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110224103444-n3fwnmh32lfoske0
Tags: 0.9.10-1
* New upstream release. This release fixes bug "FTBFS: error:
  'SCOTCH_Dgraph' was not declared in this scope" (closes: #612602).
* debian/control:
  - Add libslepc3.1-dev and libboost-thread-dev to Build-Depends and
    Depends field in binary package libdolfin0-dev.
  - Bump build dependency on python-ufc to >= 2.0.0.
  - Remove Build-Depends-Indep field as upstream no longer ships the
    user manual.
  - Remove old fields Conflicts, Provides, and Replaces from
    libdolfin0-dev, libdolfin0, libdolfin0-dbg, and python-dolfin.
* Remove all patches as they are now incorporated upstream.
* Add dolfin-plot and dolfin-version to debian/dolfin-bin.install.
* Remove .doc-base file since the user manual is removed by upstream.
* Remove targets clean and install/dolfin-doc from debian/rules since
  they are no longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
// Modified by Johan Hake, 2010.
7
7
//
8
8
// First added:  2005-10-23
9
 
// Last changed: 2010-04-22
 
9
// Last changed: 2010-09-20
10
10
 
11
11
#include <iostream>
12
12
#include <dolfin/common/constants.h>
16
16
#include <dolfin/la/Matrix.h>
17
17
#include <dolfin/la/Vector.h>
18
18
#include <dolfin/log/log.h>
19
 
#include <dolfin/main/MPI.h>
 
19
#include <dolfin/log/dolfin_log.h>
 
20
#include <dolfin/common/MPI.h>
20
21
#include "NonlinearProblem.h"
21
22
#include "NewtonSolver.h"
22
23
 
49
50
{
50
51
  // Set default parameters
51
52
  parameters = default_parameters();
52
 
  parameters.add(solver->parameters);
53
53
}
54
54
//-----------------------------------------------------------------------------
55
55
NewtonSolver::NewtonSolver(GenericLinearSolver& solver,
98
98
    // Compute Jacobian
99
99
    nonlinear_problem.J(*A, x);
100
100
 
 
101
    // FIXME: This reset is a hack to handle a deficiency in the Trilinos wrappers
 
102
    solver->set_operator(*A);
 
103
 
101
104
    // Perform linear solve and update total number of Krylov iterations
102
105
    if (dx->size() > 0)
103
106
      dx->zero();