if ((i+2*j+1) % 3 == 0)
m.set (i,j, i*j*.5+.5);
- m.compress ();
+ m.compress (VectorOperation::insert);
// then make sure we retrieve the same ones
for (unsigned int i=0; i<m.m(); ++i)
if ((i+2*j+1) % 3 == 0)
m.add (i,j, i*j*.5+.5);
- m.compress ();
+ m.compress (VectorOperation::add);
// then make sure we retrieve the same ones
for (unsigned int i=0; i<m.m(); ++i)
if ((i+2*j+1) % 3 == 0)
m.add (i,j, i*j*.5+.5);
- m.compress ();
+ m.compress (VectorOperation::add);
// then make sure we retrieve the same ones
for (unsigned int i=0; i<m.m(); ++i)
if ((i+2*j+1) % 3 == 0)
m.add (i,j, i*j*.5+.5);
- m.compress();
+ m.compress(VectorOperation::add);
// and overwrite everything again
for (unsigned int i=0; i<m.m(); ++i)
if ((i+2*j+1) % 3 == 0)
m.set (i,j, i*j*.5+.5);
- m.compress ();
+ m.compress (VectorOperation::insert);
// then make sure we retrieve the same ones
for (unsigned int i=0; i<m.m(); ++i)
++counter;
}
- m.compress ();
+ m.compress (VectorOperation::insert);
deallog << m.n_nonzero_elements() << std::endl;
Assert (m.n_nonzero_elements() == counter,
if ((i+2*j+1) % 3 == 0)
m.set (i,j, i*j*.5+.5);
- m.compress ();
+ m.compress (VectorOperation::insert);
// compare against the exact value of the
// l1-norm (max col-sum)
if ((i+2*j+1) % 3 == 0)
m.set (i,j, i*j*.5+.5);
- m.compress ();
+ m.compress (VectorOperation::insert);
// compare against the exact value of the
// linfty-norm (max row-sum)
}
norm = std::sqrt(norm);
- m.compress ();
+ m.compress (VectorOperation::insert);
// compare against the exact value of the
// l2-norm (max row-sum)
if ((i+2*j+1) % 3 == 0)
m.set (i,j, i*j*.5+.5);
- m.compress ();
+ m.compress (VectorOperation::insert);
// then multiply everything by 1.25 and
// make sure we retrieve the values we
if ((i+2*j+1) % 3 == 0)
m.set (i,j, i*j*.5+.5);
- m.compress ();
+ m.compress (VectorOperation::insert);
// then divide everything by 4/3 and
// make sure we retrieve the values we
if ((i+2*j+1) % 3 == 0)
m.set (i,j, i*j*.5+.5);
- m.compress ();
+ m.compress (VectorOperation::insert);
// then make sure we retrieve the same ones
for (unsigned int i=0; i<m.m(); ++i)
void test (MatrixType &m)
{
m.set(0,0,1.);
- m.compress();
+ m.compress(VectorOperation::insert);
m = 0;
- m.compress();
+ m.compress(VectorOperation::insert);
Assert(fabs(m.frobenius_norm())<1e-15, ExcInternalError());
m3.set (i,j, -0.1);
}
- m.compress ();
- m2.compress();
- m3.compress();
+ m.compress (VectorOperation::insert);
+ m2.compress(VectorOperation::insert);
+ m3.compress(VectorOperation::insert);
deallog << "Matrix nonzeros: " << m.n_nonzero_elements() << " "
<< m2.n_nonzero_elements() << " "
m_small.set (i,j, value);
}
- m_small.compress();
+ m_small.compress(VectorOperation::insert);
// Then build two matrices consisting of
// several copies of the small
}
}
- m2.compress();
+ m2.compress(VectorOperation::add);
// subtract the matrix m from this one,
// we should get a zero matrix
m_small.set (i,j, value);
}
- m_small.compress();
+ m_small.compress(VectorOperation::insert);
// Then build two matrices consisting of
// several copies of the small
}
}
- m2.compress();
+ m2.compress(VectorOperation::insert);
// subtract the matrix m from this one,
// we should get a zero matrix
TrilinosWrappers::Vector f(dim);
TrilinosWrappers::Vector u(dim);
f = 1.;
- A.compress ();
+ A.compress (VectorOperation::insert);
f.compress (VectorOperation::insert);
u.compress (VectorOperation::insert);
TrilinosWrappers::Vector f(dim);
TrilinosWrappers::Vector u(dim);
f = 1.;
- A.compress ();
+ A.compress (VectorOperation::insert);
f.compress (VectorOperation::insert);
u.compress (VectorOperation::insert);
TrilinosWrappers::Vector f(dim);
TrilinosWrappers::Vector u(dim);
f = 1.;
- A.compress ();
+ A.compress (VectorOperation::insert);
f.compress (VectorOperation::insert);
u.compress (VectorOperation::insert);
TrilinosWrappers::Vector f(dim);
TrilinosWrappers::Vector u(dim);
f = 1.;
- A.compress ();
+ A.compress (VectorOperation::insert);
f.compress (VectorOperation::insert);
u.compress (VectorOperation::insert);
TrilinosWrappers::Vector f(dim);
TrilinosWrappers::Vector u(dim);
f = 1.;
- A.compress ();
+ A.compress (VectorOperation::insert);
f.compress (VectorOperation::insert);
u.compress (VectorOperation::insert);
TrilinosWrappers::Vector f(dim);
TrilinosWrappers::Vector u(dim);
f = 1.;
- A.compress ();
+ A.compress (VectorOperation::insert);
f.compress (VectorOperation::insert);
u.compress (VectorOperation::insert);
for (unsigned int j=0; j<csp.row_length(i); ++j)
m.add (i, csp.column_number(i,j), 1.);
- m.compress ();
+ m.compress (VectorOperation::add);
deallog << "OK" << std::endl;
}
matrix.set(global, global+N, -1);
}
}
- matrix.compress ();
+ matrix.compress (VectorOperation::insert);
// then do a single matrix-vector
matrix.set(global, global+N, -1);
}
}
- matrix.compress ();
+ matrix.compress (VectorOperation::insert);
// then do a single matrix-vector
// multiplication with subsequent formation
TrilinosWrappers::Vector f(dim);
TrilinosWrappers::Vector u(dim);
f = 1.;
- A.compress ();
+ A.compress (VectorOperation::insert);
f.compress (VectorOperation::insert);
u.compress (VectorOperation::insert);
TrilinosWrappers::Vector f(dim);
TrilinosWrappers::Vector u(dim);
f = 1.;
- A.compress ();
+ A.compress (VectorOperation::insert);
f.compress (VectorOperation::insert);
u.compress (VectorOperation::insert);
TrilinosWrappers::Vector f(dim);
TrilinosWrappers::Vector u(dim);
f = 1.;
- A.compress ();
+ A.compress (VectorOperation::insert);
f.compress (VectorOperation::insert);
u.compress (VectorOperation::insert);
TrilinosWrappers::SparseMatrix A (sp);
A.add (2, 3, 2.0);
- A.compress();
+ A.compress(VectorOperation::add);
// verify that entry (2,3) is
// indeed what we expect. verify
m2.set (i,j, 0.);
}
- m.compress ();
- m2.compress();
+ m.compress (VectorOperation::insert);
+ m2.compress(VectorOperation::insert);
// now add the same elements row-wise
{
}
}
- m2.compress();
+ m2.compress(VectorOperation::add);
// subtract the matrix m from this one,
// we should get a zero matrix
m2.set (i,j, 0.);
}
- m.compress ();
- m2.compress();
+ m.compress (VectorOperation::insert);
+ m2.compress(VectorOperation::insert);
// now add the same elements from a full
// matrix
}
}
- m2.compress();
+ m2.compress(VectorOperation::add);
// subtract the matrix m from this one,
// we should get a zero matrix
m.set (0,0,1);
m.set (1,1,2);
m.set (1,2,3);
- m.compress ();
+ m.compress (VectorOperation::insert);
TrilinosWrappers::SparseMatrix::const_iterator i = m.begin();
deallog << i->row() << ' ' << i->column() << ' ' << i->value() << std::endl;
++i;
if ((i+2*j+1) % 3 == 0)
m.set (i,j, i*j*.5+.5);
- m.compress ();
+ m.compress (VectorOperation::insert);
TrilinosWrappers::SparseMatrix m2(m.m(), m.n(), m.n()/3+1);
}
}
- m2.compress();
+ m2.compress(VectorOperation::insert);
// subtract the matrix m from this one,
// we should get a zero matrix.
m.set (i,j, value);
}
- m.compress ();
+ m.compress (VectorOperation::insert);
// now add the same elements from a full
// matrix (if the same element is set
// more than once, Trilinos adds them)
}
}
- m2.compress();
+ m2.compress(VectorOperation::insert);
// subtract the matrix m from this one,
// we should get a zero matrix