Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions arcane/src/arcane/core/matvec/Matrix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -480,15 +480,15 @@ _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
d.copy(r);

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) {
Expand All @@ -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;
Expand Down
10 changes: 10 additions & 0 deletions arcane/src/arcane/core/matvec/Vector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

Vector::
Vector(Integer size,Real init_value)
: m_impl(new VectorImpl(size, init_value))

Check failure on line 130 in arcane/src/arcane/core/matvec/Vector.cc

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace the use of "new" with an operation that automatically manages the memory.

See more on https://sonarcloud.io/project/issues?id=arcaneframework_framework&issues=AZ3fJgcgxk7WXiWXJsLu&open=AZ3fJgcgxk7WXiWXJsLu&pullRequest=2593
{
m_impl->addReference();
}

/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

Vector::
Vector(const Vector& v)
: m_impl(v.m_impl)
Expand Down
Loading