> Would that work together with the GMG-preconditioner?
You mean you want to use the linear operator as a smoother for the GMG? Or
where in the GMG do you want to use it?
> Will test it there as
> soon as my problem in my second question could be solved.
> There I have the following code:
> |
> SolverControl coarse_solver_control(1000,1e-10,false,false);
> SolverGMRES<vector_t> coarse_solver(coarse_solver_control);
> PreconditionIdentityid;
> MGCoarseGridIterativeSolver<vector_t,
> SolverGMRES<vector_t>,
> matrix_t,
> PreconditionIdentity>
> coarse_grid_solver(coarse_solver,coarse_matrix,id);
>
> usingSmoother=LA::MPI::PreconditionJacobi;
> MGSmootherPrecondition<matrix_t,Smoother,vector_t>mg_smoother;
> mg_smoother.initialize(mg_matrices,Smoother::AdditionalData(0.5));
> mg_smoother.set_steps(2);
>
> mg::Matrix<vector_t>mg_matrix(mg_matrices);
> mg::Matrix<vector_t>mg_interface_up(mg_interface_matrices);
> mg::Matrix<vector_t>mg_interface_down(mg_interface_matrices);
>
> Multigrid<vector_t>mg(mg_matrix,coarse_grid_solver,mg_transfer,mg_smoother,mg_smoother);
> mg.set_edge_matrices(mg_interface_down,mg_interface_up);
>
> PreconditionMG<dim,vector_t,MGTransferPrebuilt<vector_t>>preconditioner(dof_handler,
>
> mg,
>
> mg_transfer);
> |
>
> and here I intent to replace all occurences of matrix_t with my custom
> LinearOperator (if that makes sense).
I don't know the multigrid well enough, but I would expect that it really only
wants something that has a vmult.
My recommendation would be, if you don't know whether something would work, to
just try it out.