Commit b44ff0bd authored by Kirill Terekhov's avatar Kirill Terekhov

Fix nonzero initial solution in BiCGStab(L)

solver_test000 now provides nonzero initial solution
parent 3511b71c
......@@ -33,7 +33,7 @@ if(USE_SOLVER_PETSC)
add_test(NAME solver_test000_serial_petsc COMMAND $<TARGET_FILE:solver_test000> 0 2)
endif()
if(USE_SOLVER_TIRLINOS)
if(USE_SOLVER_TRILINOS)
add_test(NAME solver_test000_serial_trilinos_aztec COMMAND $<TARGET_FILE:solver_test000> 0 3)
add_test(NAME solver_test000_serial_trilinos_ifpack COMMAND $<TARGET_FILE:solver_test000> 0 4)
add_test(NAME solver_test000_serial_trilinos_ml COMMAND $<TARGET_FILE:solver_test000> 0 5)
......
......@@ -62,7 +62,7 @@ int main(int argc,char ** argv)
{
A[i][i] = 10.0;
b[i] = i;
x[i] = 0.0;
x[i] = 0.1;
}
if (rank==0) std::cout << "next call S.SetMatrix(A);" << std::endl;
S.SetMatrix(A); // Compute the preconditioner for the original matrix
......
......@@ -171,7 +171,7 @@ namespace INMOST
// r[0] = r[0] - A x
Alink->MatVec(-1,SOL,1,r[0]); //global multiplication, r probably needs an update
info->Update(r[0]); // r is good
std::copy(x0.Begin(),x0.End(),SOL.Begin()); //x0 = x
std::copy(SOL.Begin(),SOL.End(),x0.Begin()); //x0 = x
std::fill(SOL.Begin(),SOL.End(),0.0); //x = 0
}
std::copy(r[0].Begin(),r[0].End(),r_tilde.Begin()); // r_tilde = r[0]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment