Dear Wolfgang Bangerth,

Thank you for your clarification.

it is still not very clear to me why I am not getting the same mass matrix 
when doing this two different approaches when, as far as I understand 
should be the same. In order to get a 2x2 block matrix containing the mass 
matrix for the top left and bottom right I do the following:
*Mass_matrix_tmp(i,j)+=((fe_values[real_component].value(i, q_point) * 
fe_values[real_component].value(j, q_point)) * fe_values.JxW(q_point));*
*Mass_matrix_tmp(i,j)+=((fe_values[imag_component].value(i, q_point) * 
fe_values[imag_component].value(j, q_point)) * fe_values.JxW(q_point));*

which gives different results compared to:
* if (fe.system_to_component_index(i).first == 
fe.system_to_component_index(j).first)*
* Mass_matrix_tmp(i,j)+= ((fe_values.shape_value(i, q_point) * 
fe_values.shape_value(j, q_point)) * fe_values.JxW(q_point));*

Could you please clarify why this two approaches do not give the same 
results?


Thank you again
Regards, 

El martes, 9 de noviembre de 2021 a las 17:21:49 UTC+1, Wolfgang Bangerth 
escribió:

> On 11/9/21 8:24 AM, Joss G. wrote:
> > *Is it correct the following approach to get the global mass matrix of 
> > one component? *I get a big 2x2 block matrix with non-zero values on the 
> > left top block. Is this corresponding to the global mass matrix of one 
> > of the components?
> > /Mass_matrix_tmp(i,j)+=((fe_values[real_component].value(i, q_point) * 
> > fe_values[real_component].value(j, q_point)) * fe_values.JxW(q_point));/
>
> Yes, this will work.
>
> Best
> W.
>
> -- 
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: [email protected]
> www: http://www.math.colostate.edu/~bangerth/
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/2eb79ad3-2d03-4863-a437-b371ee3d41ean%40googlegroups.com.

Reply via email to