Hi

The block version of MGTransferGlobalCoarsening is 
MGTransferBlockGlobalCoarsening (see  
https://www.dealii.org/developer/doxygen/deal.II/classMGTransferBlockGlobalCoarsening.html).

I don't know the details of step-29. But what I would recommend you to do 
is to take a look 
at 
https://github.com/peterrum/dealii-spirk/blob/bb52df5d1023f9c41ca51a082be769bc0171bf75/include/operator.h#L616-L660.
 
Here, I am solving a complex-valued Helmholtz operator (in my case a sum of 
mass and Laplace matrix, which arises from complex implicit Runge-Kutta 
formulation; see https://arxiv.org/abs/2209.06700). This complex code was 
the motivation for writing MGTransferBlockGlobalCoarsening in the fist 
place^^

I think the code should answer most of your questions.

Regarding
> FEEvaluation<...,1> real(matrix_free_data, 0) and FEEvaluation<...,1> 
real(matrix_free_data, 1)

I guess you have to replace the "1" by a "0" in the second FEEval.

Hope this helps,
Peter

On Wednesday, 2 November 2022 at 17:55:44 UTC+1 yy.wayne wrote:

> Well a sad thing I notice is a function used for p-multigrid in step-75: 
> reinit() in MGTwoLevelTransfer, is imlpemented only for 
> LinearAlgebra::distributed::Vector, not  
> LinearAlgebra::distributed::BlockVector.
> [image: 202211-3.png]
>
> I'm fine with writing some unimplemented functions myself, but a guidence 
> is really helpful. While going through this problem I found different 
> choices and not sure what's the best way having this done. (For example, 
> LinearAlgebraTrilinos::MPI::BlockVector or 
> LinearAlgebra::distributed::BlockVector? Whether we need 
> locally_relevant_dofs when reinit solution vector?(It's not used here 
> stokes_computation 
> <https://github.com/dealii/dealii/blob/2376c62a4b89953b74801852983eb8556930d54d/tests/matrix_free/stokes_computation.cc>)
>  
> Or is the non-specialized MGTransferLevel Class works as well for p 
> coarsening?)
>
> In short, I'm solving step-29(2 components) with matrix-free and 
> p-multigrid technique. Is current dealii capable of solving it? If not 
> what's the fastest way to implement it? Thanks!
> 在2022年11月2日星期三 UTC+8 21:40:36<yy.wayne> 写道:
>
>> I tried to modify my code that FEEvaluation is constructed without 
>> matrix_free_data as in the above .cc in dealii/test, but get following 
>> error information:
>>         "FEEvaluation was initialized without a matrix-free object. 
>> Integer indexing is not possible".
>>
>> Guess the only method to do MatrixFree problem with multi-components now 
>> is through BlockVector in matrix_vector_Stokes test 
>> <https://github.com/dealii/dealii/blob/master/tests/matrix_free/matrix_vector_stokes_noflux.cc>?
>>  
>> Since I never write dealii prokect with blocked dofs before I'm affraid 
>> codes besides MatrixFree parts should be changed as well... Should I try 
>> rearrange step-29 like problem with block vector? 
>>
>> 在2022年11月2日星期三 UTC+8 17:24:23<yy.wayne> 写道:
>>
>>> In test/matrix-free/assemble_matrix_02.cc 
>>> <https://github.com/dealii/dealii/blob/d2d20fe3ca3a1390420c51420307a3ef680c503c/tests/matrix_free/assemble_matrix_02.cc>
>>>  a 
>>> Stokes matrix is assembled in MatrixFree form, and DoFs correspond to 
>>> velocity and pressure are called by FEEvaluation<...,dim> velocity(..., 0) 
>>> and  FEEvaluation<...,1> velocity(..., dim), respectively.
>>>
>>> I have a multi-comp system two as in step-29 with real and imaginary 
>>> parts. But initializing the 2 FEEvaluations by FEEvaluation<...,1> 
>>> real(matrix_free_data, 0) and FEEvaluation<...,1> real(matrix_free_data, 1) 
>>> gives error, because matrix_free_data.n_components() is 1 not 2. Maybe it's 
>>> because I'm using fe_collection, not just FESystem in the 
>>> assemble_matrix_02 test.
>>>
>>> If I have a FEEvaluation<...,dim=2> integrator including real and 
>>> imaginary parts, is there a way to decouple them like in FEValues (for 
>>> example, fe.system_to_component_index, or fe_values_real = 
>>> fe_values[FEValuesExtractors])?
>>>
>>> Best,
>>> Wayne
>>>
>>

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/0def21bf-6523-42f2-bec4-f25c9e3b0279n%40googlegroups.com.

Reply via email to