boundary contribution in cocg_s_it

Miscellaneous discussion topics about Code_Saturne (development, ...)
Post Reply
C.FLAG.
Posts: 32
Joined: Fri Apr 08, 2016 2:19 pm

boundary contribution in cocg_s_it

Post by C.FLAG. »

Hello,

According to the theory guide, there is a boundary contribution for the iterative gradient lhs. I was expecting to find that contribution in the subroutine _compute_cell_cocg_s_it by analogy with the lsq gradient (in the subroutine _compute_cell_cocg_s_lsq, the boundary contribution to the lhs can be found). I have tried some grep but have not been able to find that boundary contribution for the iterative gradient lhs, so I am probably missing something.

Any help in locating that boundary contribution would be much appreciated.

Best regards,
Cedric
Yvan Fournier
Posts: 4079
Joined: Mon Feb 20, 2012 3:25 pm

Re: boundary contribution in cocg_s_it

Post by Yvan Fournier »

Hello Cedric,

I'm not sure (and am answering from my phone, not computer), but you may have a function in cs_mesh_quantities.c whic computes cocg (and not cocg_lsq). The name probably does not include "_it".

Regards,

Yvan
C.FLAG.
Posts: 32
Joined: Fri Apr 08, 2016 2:19 pm

Re: boundary contribution in cocg_s_it

Post by C.FLAG. »

Dear Yvan,

Thank you for your answer. I have found the computation of the lhs boundary contribution for the iterative gradient in "_iterative_scalar_gradient_old" (file cs_gradient.c). It is activated with the input flag recompute_cocg.

However, there are no such things in "_iterative_scalar_gradient". It seems to be related to rev. 5740:
"Dev: change the scalar gradient formulations to be consistent with the vectorial formulation.
- the computation of COCG matrices is not required anymore
- the previous version of scalar gradients is still available by adding 10 to imrgra."

I assume the theory guide corresponds to this previous version of the iterative scalar gradient? Looking at the description of the iterative vector gradient in the theory guide :
"Note that there is no simple possibility here to bring ... on the left hand side ... and thus will be explicit".

Please, can you give me confirmation that for the new scalar iterative gradient (ie after rev. 5740), the boundary contribution is purely explicit and thus does not appear on the lhs?

Thank you,
Best regards,
Cedric
Martin FERRAND
Posts: 47
Joined: Wed Mar 14, 2012 10:06 am

Re: boundary contribution in cocg_s_it

Post by Martin FERRAND »

Dear Cédric,

you are right, the new gradient does not need a specifi COCG matrix for cells touching a boundary (because this term is put as explicit, this was done for sake of simplicity for vectors and then extended to scalar to save some time of recomputing it).

Best Regards

Martin
C.FLAG.
Posts: 32
Joined: Fri Apr 08, 2016 2:19 pm

Re: boundary contribution in cocg_s_it

Post by C.FLAG. »

Dear Martin,

Thank you for your confirmation, it is clearer now.

Best regards,
Cedric
Post Reply