Hi, Wolfgang!

   Just to be more precise. For the solution method using deal.II's CG
   I've used the following lines:
SolverControl           solver_control (dof_handler.n_dofs(), 1e-12);
SolverCG<>              cg (solver_control);
cg.solve (system_matrix, solution, system_rhs, PreconditionIdentity());

   For the PETSC MPI version:
SolverControl           solver_control (dof_handler.n_dofs(), 1e-12);
PETScWrappers::SolverCG cg (solver_control, mpi_communicator);
PETScWrappers::PreconditionBlockJacobi preconditioner(system_matrix);
cg.solve (system_matrix, solution,  system_rhs, preconditioner);

  Now I try to use deal's CG with PETSC MPI vectors as you suggested,
  I do the same code as for the first case, but it produce the error:
/home/slawa/LinuxWork/Deal2Projects/HeatEq8-Explicit-Parallel/main.cpp|395|error:
no matching function for call to
‘dealii::SolverCG<dealii::Vector<double>
>::solve(dealii::PETScWrappers::MPI::SparseMatrix&,
>dealii::PETScWrappers::MPI::Vector&,
>dealii::PETScWrappers::MPI::Vector&)’|
  Question is - what should I change in this piece of code to make it
  run with deal's CG solver and PETSC MPI vectors and matrices?

Regards,
Slawa



Saturday, June 27, 2009, 2:36, you wrote:


WB> Slawa,

>>    Exactly! During first 5-10 steps its OK, but after that it starts
>>    to blow up and then after 2-3 more time steps its completely out of
>>    the game. And you are right - computed with deal's CG everything
>> works fine, but with PETSC one this situation takes place. To get a
>> working solution with PETSC I have to reduce time step 1 order of
>> magnitude.
>>
>>    One of the solutions - I've made a mistake somewhere in the code
>>    switching deal's vectors and solvers to the PETSC ones. But there
>>    are not that many places where one can make an error, furthermore
>>    with the smaller time step everything works fine.
>>
>>    Another thing - for deal's CG I was using PreconditionIdentity(),
>>    for PETSC one: PreconditionBlockJacobi.

WB> I am out of further suggestions on how to track down this problem :-( One
WB> other thing you may try is to use PETSc vectors and matrices, and use them
WB> with the deal.II SolverCG class. This way you can at least evaluate 
WB> whether it's the preconditioner or not. Other than that, I don't currently
WB> have any further ideas how to solve this riddle...

WB> Best
WB>  W.

WB> -------------------------------------------------------------------------
WB> Wolfgang Bangerth                email:            [email protected]
WB>                                  www:
WB> http://www.math.tamu.edu/~bangerth/




-- 
Best regards,                                       09.07.2009
Svyatoslav Gladkov, Kharkov, UKRAINE                13:11

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to