Open inkstink opened 7 years ago
I have begun digging into the source of MGMatrixBlock vector and I have made a few changes that allow things to compile. I made changes like the following
inline MGLevelObject<MatrixBlock<MatrixType> > &
MGMatrixBlockVector<MatrixType>::block(size_type i)
{
return *matrices.entry<MGLevelObject<MatrixType> * >(i);
}
becomes
inline MGLevelObject<MatrixBlock<MatrixType> > &
MGMatrixBlockVector<MatrixType>::block(size_type i)
{
return *matrices.entry<MGLevelObject<MatrixBlock<MatrixType> > * >(i);
}
Not the addition of MatrixBlock
in the function body. This seems logical, but I honestly don't know if this is correct. Assuming this is correct, I am unstuck now and can continue.
Update: I, of course, spoke too soon, and was never really unstuck.
@inkstink That correction makes sense. Do I understand you correctly that you solved your problem? If so, would you be willing to submit a patch?
Yeah, I had to make a few more changes in a couple of different places, with some luck I might be able to figure this out completely today. A pull request will follow.
Sounds great! If you encounter more problems, don't hesitate to tell us.
I am interested in experimenting in adding multigrid preconditioners to existing codes I have written. I am attempting to do so using the MGMatrixBlockVector functionality in the MeshWorker framework.
In order to get started in this process I have modified step-16 as If I wanted to use multigrid to solve a heat-equation like problem. I have been unable to get this to work. The code that I attach below fails to compile: I have looked into the source code of "deal.II/lac/block_matrix.h" and confirm the error message that the compiler produces. My understanding is that some parts of the code expect the matrices stored in MGMatrixBlockVector to be wrapped inside of a block_matrix wrapper. I attempted to do things using a MGLevelObject object, but I couldn't get this to play nice with the meshworker stuff.
Anyway, I would appreciate any advice.
For some background, I am just experimenting with multi-grid, my solvers all use DG and mixed method like approach, (I solve Laplace/Poison, elasticity, by writing a 2x2 (block) system of equations, and I solve Stokes by writing a 3x3 (block) system of equations). I am looking to experiment with multigrid preconditioners for matrix products like the following (Stiff^T inverseMass Stiff)^{-1}, where inverseMass is explicitly precomputed.
Thank you for your help.
(I haven't submitted an issue to github before so please forgive me and correct me if I did this wrong, I have attached the code as a .txt file because it wouldn't let attach a .cc file. The CMakeLists is the same as the standard step-16. )
step-16.txt