W dniu wtorek, 26 września 2017 20:37:59 UTC+2 użytkownik Daniel Arndt napisał: > > Michael, > > Adding to Wolfgang's response: > > Am Dienstag, 26. September 2017 17:42:41 UTC+2 schrieb Michał Wichrowski: >> >> Dear all, >> I'm dealing with Stokes problem that I want to solve using matrix-free >> methods. In tests I've alredy found implementation of Stokes operator that >> uses block vectors. I'm goning to use multigrid method for saddle point >> problems similar to the one presented in: >> An efficient smoother for the Stokes problem D Braess, R Sarazin - >> Applied Numerical Mathematics, 1997 - Elsevier >> >> Let the Stokes matrix be: >> (A B^T >> B 0) >> >> 1) The method requires several multiplication by blocks A and B at each >> level. Is there any recommended way to implement it? () >> > Have a look at tests/matrix_free/matrix_vector_stokes_base.cc for a > MatrixFree approach for a block system using BlockVectors. > If you want the individual blocks A and B it might be best to write them > to implement them individually as derived classes from > MatrixFreeOperators::Base<dim, BlockVectorType> in a similar way as this > is done in the test mentioned above. >
> > >> 2) I've found MGTransferBlockMatrixFree class in developer version of >> deal.ii, however it assumes that each block have the same dof_hander (and >> thats for me is obviously not true). Is there existing MGTrasfrer for my >> problem? >> BTW, why MGTrasfrer does work with several dof handres like MatrixFree? >> > No, this is currently not implemented but definitely on my TODO-list. This > would basically be combining MGTransferMatrixFree with the current > MGTransferBlockMatrixFree. > > I've started working on new version MGTransferBlockMatrixFree and I now see the problem. MGTransferBlockMatrixFree is easy to rewrite using vector of dof handres etc, but PreconditionMG requires MGTransfer that have copy_to_mg and copy_from_mg that work on single dof handre. I am thinking of 3 way to resolve it: 1) Rewrite MGTransferBlockMatrixFree using vector of dof handler, implement PreconditionBlockMG and probably Multigrid will also need block version 2) Use standard MGTransfer for individual blocks and implement PreconditionBlockMG and BlockMultigrid to work with several MGTransfer s. 3) Since MGTransferBlockMatrixFree requires dof handler in build (const DoFHandler< dim, dim > &mg_dof) method, the pointers to dof_handlers may be stored and used in copy_from_mg and copy_to_mg. I think 3) is simplest but also risky solution. 2) seems quite rational to me. > > Best, Michał -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
