diff --git a/arcane/src/arcane/core/matvec/Matrix.cc b/arcane/src/arcane/core/matvec/Matrix.cc index 3d8bbe281..5b3e6863b 100644 --- a/arcane/src/arcane/core/matvec/Matrix.cc +++ b/arcane/src/arcane/core/matvec/Matrix.cc @@ -480,7 +480,7 @@ _applySolver(const Matrix& a, const Vector& b, Vector& x, Real epsilon, IPrecond r.dump(cout); cout << '\n';*/ - Vector d(r.size()); + Vector d(r.size(), 0.0); if (p) p->apply(d, r); else @@ -488,7 +488,7 @@ _applySolver(const Matrix& a, const Vector& b, Vector& x, Real epsilon, IPrecond Vector q(r.size()); Vector t(r.size()); - Vector s(r.size()); + Vector s(r.size(), 0.0); Real delta_new = 0.0; //Real r0=mat_op.dot(r); if (p) { @@ -505,7 +505,9 @@ _applySolver(const Matrix& a, const Vector& b, Vector& x, Real epsilon, IPrecond cout << "\n"; #endif //Real norm0 = r.normInf(); - Real delta0 = delta_new; + const Real delta0 = delta_new; + + //cout << " TOL=" << epsilon << " delta0=" << delta0 << '\n'; //cout << " deltanew=" << delta_new << '\n'; Integer nb_iter = 0; diff --git a/arcane/src/arcane/core/matvec/Vector.cc b/arcane/src/arcane/core/matvec/Vector.cc index a077048fe..4d1598e71 100644 --- a/arcane/src/arcane/core/matvec/Vector.cc +++ b/arcane/src/arcane/core/matvec/Vector.cc @@ -125,6 +125,16 @@ Vector(Integer size) /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/ +Vector:: +Vector(Integer size,Real init_value) +: m_impl(new VectorImpl(size, init_value)) +{ + m_impl->addReference(); +} + +/*---------------------------------------------------------------------------*/ +/*---------------------------------------------------------------------------*/ + Vector:: Vector(const Vector& v) : m_impl(v.m_impl)