if ((i+2*j+1) % 3 == 0)
m.set (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)
++counter;
}
- m.compress ();
+ m.compress VectorOperation::add();
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::add);
// 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::add);
// compare against the exact value of the
// linfty-norm (max row-sum)
}
norm = std::sqrt(norm);
- m.compress ();
+ m.compress (VectorOperation::add);
// 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::add);
// 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::add);
// then divide everything by 4/3 and
// make sure we retrieve the values we
for (unsigned int i=0; i<v.size(); i+=1+i)
v(i) = i;
- v.compress ();
+ v.compress (VectorOperation::add);
Assert (v.size() == 100, ExcInternalError());
pattern[i] = true;
}
- v.compress ();
+ v.compress (VectorOperation::add);
// check that they are ok, and this time
// all of them
pattern[i] = true;
}
- v.compress ();
+ v.compress (VectorOperation::add);
// check that they are ok, and this time
// all of them
v(i) = i;
norm += std::fabs(1.*i);
}
- v.compress ();
+ v.compress (VectorOperation::add);
// then check the norm
Assert (v.l1_norm() == norm, ExcInternalError());
v(i) = i;
norm += std::fabs(1.*i)*std::fabs(1.*i);
}
- v.compress ();
+ v.compress (VectorOperation::add);
// then check the norm
const double eps=typeid(PetscScalar)==typeid(double) ? 1e-14 : 1e-5;
v(i) = i;
norm = std::max(norm,fabs(i));
}
- v.compress ();
+ v.compress (VectorOperation::add);
// then check the norm
Assert (v.linfty_norm() == norm, ExcInternalError());
v(i) = i;
pattern[i] = true;
}
- v.compress ();
+ v.compress (VectorOperation::add);
// multiply v with 5/4
v *= 5./4.;
v(i) = i;
pattern[i] = true;
}
- v.compress ();
+ v.compress (VectorOperation::add);
// multiply v with 3/4
v /= 4./3.;
v(i) = i;
else
w(i) = i;
- v.compress ();
- w.compress ();
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
// make sure the scalar product is zero
Assert (v*w == 0, ExcInternalError());
}
}
- v.compress ();
- w.compress ();
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
// make sure the scalar product is zero
Assert (v*w == product, ExcInternalError());
for (unsigned int i=0; i<v.size(); ++i)
if (i%3 == 0)
v(i) = i+1.;
- v.compress ();
+ v.compress (VectorOperation::add);
// then clear it again and make sure the
// vector is really empty
for (unsigned int i=0; i<v.size(); ++i)
if (i%3 == 0)
v(i) = i+1.;
- v.compress ();
+ v.compress (VectorOperation::add);
// then clear it again and make sure the
// vector is really empty
for (unsigned int i=0; i<v.size(); ++i)
if (i%3 == 0)
v(i) = i+1.;
- v.compress ();
+ v.compress (VectorOperation::add);
const unsigned int sz = v.size();
v = 2;
for (unsigned int i=0; i<v.size(); ++i)
if (i%3 == 0)
v(i) = i+1.;
- v.compress ();
+ v.compress (VectorOperation::add);
// then copy it
PETScWrappers::Vector w (v.size());
for (unsigned int i=0; i<v.size(); ++i)
if (i%3 == 0)
v(i) = i+1.;
- v.compress ();
+ v.compress (VectorOperation::add);
// then copy it to a vector of different
// size
for (unsigned int i=0; i<v.size(); ++i)
if (i%3 == 0)
v(i) = i+1.;
- v.compress ();
+ v.compress (VectorOperation::add);
// then resize with setting to zero
v.reinit (13, false);
v(i) = i;
norm += std::fabs(1.*i)*std::fabs(1.*i);
}
- v.compress ();
+ v.compress (VectorOperation::add);
// then check the norm
const double eps=typeid(PetscScalar)==typeid(double) ? 1e-14 : 1e-5;
v(i) = i;
sum += i;
}
- v.compress ();
+ v.compress (VectorOperation::add);
// then check the norm
const double eps=typeid(PetscScalar)==typeid(double) ? 1e-14 : 1e-5;
v(i) = i;
sum += i*i*i;
}
- v.compress ();
+ v.compress (VectorOperation::add);
// then check the norm
const double eps=typeid(PetscScalar)==typeid(double) ? 1e-14 : 1e-5;
v(i) = i;
sum += i*i*i;
}
- v.compress ();
+ v.compress (VectorOperation::add);
// set them to zero again
v = 0;
w(i) = i+1.;
}
- v.compress ();
- w.compress ();
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
v += w;
w(i) = i+1.;
}
- v.compress ();
- w.compress ();
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
v -= w;
for (unsigned int i=0; i<v.size(); ++i)
v(i) = i;
- v.compress ();
+ v.compress (VectorOperation::add);
v.add (1.);
w(i) = i+1.;
}
- v.compress ();
- w.compress ();
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
v.add (w);
w(i) = i+1.;
}
- v.compress ();
- w.compress ();
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
v.add (2, w);
x(i) = i+2.;
}
- v.compress ();
- w.compress ();
- x.compress ();
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
+ x.compress (VectorOperation::add);
v.add (2, w, 3, x);
w(i) = i+1.;
}
- v.compress ();
- w.compress ();
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
v.sadd (2, w);
w(i) = i+1.;
}
- v.compress ();
- w.compress ();
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
v.sadd (3, 2, w);
x(i) = i+2.;
}
- v.compress ();
- w.compress ();
- x.compress ();
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
+ x.compress (VectorOperation::add);
v.sadd (1.5, 2, w, 3, x);
y(i) = i+3.;
}
- v.compress ();
- w.compress ();
- x.compress ();
- y.compress ();
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
+ x.compress (VectorOperation::add);
+ y.compress (VectorOperation::add);
v.sadd (1.5, 2, w, 3, x, 4, y);
w(i) = i+1.;
}
- v.compress ();
- w.compress ();
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
v.scale (w);
w(i) = i+1.;
}
- v.compress ();
- w.compress ();
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
v.equ (2, w);
x(i) = i+2.;
}
- v.compress ();
- w.compress ();
- x.compress ();
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
+ x.compress (VectorOperation::add);
v.equ (2, w, 3, x);
x(i) = i+2.;
}
- v.compress ();
- w.compress ();
- x.compress ();
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
+ x.compress (VectorOperation::add);
v.ratio (w, x);
for (unsigned int i=0; i<v.size(); ++i)
if (i%3 == 0)
v(i) = i+1.;
- v.compress ();
+ v.compress (VectorOperation::add);
// then copy it
PETScWrappers::Vector w (v);
- w.compress ();
+ w.compress (VectorOperation::add);
// make sure they're equal
deallog << v *w << ' ' << v.l2_norm() * w.l2_norm()
if ((i+2*j+1) % 3 == 0)
m.set (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)
for (unsigned int i=0; i<v.size(); i+=1+i)
v(i) *= 2;
- v.compress ();
+ v.compress (VectorOperation::add);
// check that they are ok, and this time
// all of them
for (unsigned int i=0; i<v.size(); i+=1+i)
v(i) /= 2;
- v.compress ();
+ v.compress (VectorOperation::add);
// check that they are ok, and this time
// all of them
pattern[i] = true;
}
- v.compress ();
+ v.compress (VectorOperation::add);
// check that the vector is really
// non-negative
pattern[i] = true;
}
- v.compress ();
+ v.compress (VectorOperation::add);
Vector<double> w (v);
Vector<float> x (v);
pattern[i] = true;
}
- v.compress ();
+ v.compress (VectorOperation::add);
Vector<double> w (v);
Vector<float> x (v);
pattern[i] = true;
}
- v.compress ();
+ v.compress (VectorOperation::add);
Vector<double> w;
w=v;
pattern[i] = true;
}
- v.compress ();
+ v.compress (VectorOperation::add);
Vector<double> w;
w=v;
norm_sqr += s*s;
++nnz;
}
- m.compress ();
+ m.compress (VectorOperation::add);
deallog << m.frobenius_norm() << ' ' << std::sqrt (norm_sqr)
<< std::endl;
norm_sqr += s*s;
++nnz;
}
- m.compress ();
+ m.compress (VectorOperation::add);
deallog << m.frobenius_norm() << ' ' << std::sqrt (norm_sqr)
<< std::endl;
norm_sqr += s*s;
++nnz;
}
- m.compress ();
+ m.compress (VectorOperation::add);
deallog << m.frobenius_norm() << ' ' << std::sqrt (norm_sqr)
<< std::endl;
norm_sqr += s*s;
++nnz;
}
- m.compress ();
+ m.compress (VectorOperation::add);
deallog << m.frobenius_norm() << ' ' << std::sqrt (norm_sqr)
<< std::endl;
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
GrowingVectorMemory<PETScWrappers::Vector> mem;
SolverCG<PETScWrappers::Vector> solver(control,mem);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
GrowingVectorMemory<PETScWrappers::Vector> mem;
SolverBicgstab<PETScWrappers::Vector> solver(control,mem);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
GrowingVectorMemory<PETScWrappers::Vector> mem;
SolverGMRES<PETScWrappers::Vector> solver(control,mem);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
GrowingVectorMemory<PETScWrappers::Vector> mem;
SolverMinRes<PETScWrappers::Vector> solver(control,mem);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
GrowingVectorMemory<PETScWrappers::Vector> mem;
SolverQMRS<PETScWrappers::Vector> solver(control,mem);
if ((i+2*j+1) % 3 == 0)
m.set (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)
++counter;
}
- m.compress ();
+ m.compress (VectorOperation::add);
// check n_nonzero_elements then
// output a dummy number.
if ((i+2*j+1) % 3 == 0)
m.set (i,j, i*j*.5+.5);
- m.compress ();
+ m.compress (VectorOperation::add);
// 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::add);
// compare against the exact value of the
// linfty-norm (max row-sum)
}
norm = std::sqrt(norm);
- m.compress ();
+ m.compress (VectorOperation::add);
// 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::add);
// 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::add);
// then divide everything by 4/3 and
// make sure we retrieve the values we
m.set (0,0,1);
m.set (1,1,2);
m.set (1,2,3);
- m.compress ();
+ m.compress (VectorOperation::add);
PETScWrappers::FullMatrix::const_iterator i = m.begin();
deallog << i->row() << ' ' << i->column() << ' ' << i->value() << std::endl;
++i;
for (unsigned int i=0; i<v.size(); ++i)
v(i) = i;
- m.compress ();
- v.compress ();
- w.compress ();
+ m.compress (VectorOperation::add);
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
// w:=Mv
m.vmult (w,v);
for (unsigned int i=0; i<v.size(); ++i)
v(i) = i;
- m.compress ();
- v.compress ();
- w.compress ();
+ m.compress (VectorOperation::add);
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
// w:=Mv
m.Tvmult (w,v);
w(i) = i;
}
- m.compress ();
- v.compress ();
- w.compress ();
+ m.compress (VectorOperation::add);
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
// w:=Mv
m.vmult_add (w,v);
w(i) = i;
}
- m.compress ();
- v.compress ();
- w.compress ();
+ m.compress (VectorOperation::add);
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
// w:=Mv
m.Tvmult_add (w,v);
w(i) = i+1;
}
- m.compress ();
- v.compress ();
- w.compress ();
+ m.compress (VectorOperation::add);
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
// <w,Mv>
const PetscScalar s = m.matrix_scalar_product (w,v);
for (unsigned int i=0; i<v.size(); ++i)
v(i) = i;
- m.compress ();
- v.compress ();
+ m.compress (VectorOperation::add);
+ v.compress (VectorOperation::add);
// <w,Mv>
const PetscScalar s = m.matrix_norm_square (v);
w(i) = i+1;
}
- m.compress ();
- v.compress ();
- w.compress ();
+ m.compress (VectorOperation::add);
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
// x=w-Mv
const double s = m.residual (x, v, w);
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;
}
sparsity.add(global, global+N);
}
}
- sparsity.compress();
+ sparsity.compress (VectorOperation::add);
// next build the sparse matrix itself
matrix.add(global, global+N, -1);
}
}
- matrix.compress ();
+ matrix.compress (VectorOperation::add);
// then do a single matrix-vector
matrix.add(global, global+N, -1);
}
}
- matrix.compress ();
+ matrix.compress (VectorOperation::add);
// then do a single matrix-vector
// multiplication with subsequent formation
matrix.add(global, global+N, rand());
}
}
- matrix.compress ();
+ matrix.compress (VectorOperation::add);
// then do a single matrix-vector
// multiplication with subsequent formation
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverRichardson solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverChebychev solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionNone preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionBoomerAMG preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionBoomerAMG preconditioner(A, true);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionEisenstat preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionICC preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionILU preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionLU preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionParaSails preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionSOR preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionSSOR preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverBiCG solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverGMRES solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverBicgstab solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverCGS solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverTFQMR solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverTCQMR solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverCR solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverLSQR solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
PETScWrappers::Vector f(dim);
PETScWrappers::Vector u(dim);
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
PETScWrappers::SolverPreOnly solver(control);
PETScWrappers::Vector u(dim);
u = 0.;
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress VectorOperation::add();
+ f.compress VectorOperation::add();
+ u.compress VectorOperation::add();
PETScWrappers::Vector t=u;
PETScWrappers::SolverPreOnly solver(control);
PETScWrappers::Vector u(dim);
u = 0.;
f = 1.;
- A.compress ();
- f.compress ();
- u.compress ();
+ A.compress (VectorOperation::add);
+ f.compress (VectorOperation::add);
+ u.compress (VectorOperation::add);
SolverControl cn;
PETScWrappers::SparseDirectMUMPS solver(cn);
for (unsigned int j=0; j<=i; ++j)
m.set (i,j, i+2*j);
- m.compress ();
+ m.compress (VectorOperation::add);
PETScWrappers::SparseMatrix m2(s,s,s);
m2.set(0,1,5.0);
for (unsigned int i=0; i<m2.m(); ++i)
m2.set(i,i,1.0+ i);
- m2.compress();
+ m2.compress (VectorOperation::add);
// we now print the matrix m,
// print after adding m2, and then subtract m2 again
m.set (i,j, i+2*j);
- m.compress();
+ m.compress (VectorOperation::add);
{
m.set (0,0,1);
m.set (1,1,2);
m.set (1,2,3);
- m.compress ();
+ m.compress (VectorOperation::add);
PETScWrappers::SparseMatrix::const_iterator i = m.begin();
deallog << i->row() << ' ' << i->column() << ' ' << i->value() << std::endl;
++i;
for (unsigned int i=0; i<v.size(); ++i)
v(i) = i;
- m.compress ();
- v.compress ();
- w.compress ();
+ m.compress (VectorOperation::add);
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
// w:=Mv
m.vmult (w,v);
for (unsigned int i=0; i<v.size(); ++i)
v(i) = i;
- m.compress ();
- v.compress ();
- w.compress ();
+ m.compress (VectorOperation::add);
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
// w:=Mv
m.Tvmult (w,v);
w(i) = i;
}
- m.compress ();
- v.compress ();
- w.compress ();
+ m.compress (VectorOperation::add);
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
// w:=Mv
m.vmult_add (w,v);
w(i) = i;
}
- m.compress ();
- v.compress ();
- w.compress ();
+ m.compress (VectorOperation::add);
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
// w:=Mv
m.Tvmult_add (w,v);
w(i) = i+1;
}
- m.compress ();
- v.compress ();
- w.compress ();
+ m.compress (VectorOperation::add);
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
// <w,Mv>
const PetscScalar s = m.matrix_scalar_product (w,v);
for (unsigned int i=0; i<v.size(); ++i)
v(i) = i;
- m.compress ();
- v.compress ();
+ m.compress (VectorOperation::add);
+ v.compress (VectorOperation::add);
// <w,Mv>
const PetscScalar s = m.matrix_norm_square (v);
w(i) = i+1;
}
- m.compress ();
- v.compress ();
- w.compress ();
+ m.compress (VectorOperation::add);
+ v.compress (VectorOperation::add);
+ w.compress (VectorOperation::add);
// x=w-Mv
const double s = m.residual (x, v, w);