victordion / cusp-library

Automatically exported from code.google.com/p/cusp-library
Apache License 2.0
0 stars 0 forks source link

bicgstab_m fails if b is zero, delta_1 = 0. #89

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

// set up the initial conditions for the iteration
  cusp::blas::copy(b,r_0);
  cusp::blas::copy(b,w_1);
  cusp::blas::copy(w_1,w_0);

  // set up the intitial guess
  cusp::blas::fill(x,ValueType(0));

  // set up initial value of p_0 and p_0^\sigma
  cusp::krylov::trans_m::vectorize_copy(b,s_0_s);
  cusp::blas::copy(b,s_0);
  cusp::multiply(A,s_0,As);

  delta_1 = cusp::blas::dotc(w_0,r_0);
  phi_0 = cusp::blas::dotc(w_0,As)/delta_1;

Original issue reported on code.google.com by monra...@gmail.com on 30 Mar 2012 at 9:37