[petsc-users] 2 Dirichlet conditions for one Element in PetscFE

Matthew Knepley knepley at gmail.com
Tue Dec 5 15:53:36 CST 2017


On Tue, Dec 5, 2017 at 9:12 AM, Yann Jobic <yann.jobic at univ-amu.fr> wrote:

> Hello,
>
> I tried the master of the git directory, as you have merged the branch.
>
> It works ! Many thanks for the fix.
>
> Great! Feel free to mail any suggestion for improvements.

  Thanks,

     Matt

> Best regards,
>
> Yann
>
> Le 22/11/2017 à 18:51, Matthew Knepley a écrit :
>
> On Wed, Nov 22, 2017 at 12:39 PM, Yann Jobic <yann.jobic at univ-amu.fr>
> wrote:
>
>> Hello,
>>
>> I've found a strange behavior when looking into a bug for the pressure
>> convergence of a simple Navier-Stokes problem using PetscFE.
>>
>> I followed many examples for labeling boundary faces. I first use
>> DMPlexMarkBoundaryFaces, (label=1 to the faces).
>> I find those faces using DMGetStratumIS and searching 1 as it is the
>> value of the marked boundary faces.
>> Finally i use DMPlexLabelComplete over the new label.
>> I then use :
>>   ierr = PetscDSAddBoundary(prob, DM_BC_ESSENTIAL, "in", "Faces", 0,
>> Ncomp, components, (void (*)(void)) uIn, NWest, west, NULL);CHKERRQ(ierr);
>> in order to impose a dirichlet condition for the faces labeled by the
>> correct value (west=1, south=3,...).
>>
>> However, the function "uIn()" is called in all the Elements containing
>> the boundary faces, and thus impose the values at nodes that are not in the
>> labeled faces.
>> Is it a normal behavior ? I then have to test the position of the node
>> calling uIn, in order to impose the good value.
>> I have this problem for a Poiseuille flow, where at 2 corner Elements i
>> have a zero velocity dirichlet condition (wall) and a In flow velocity one.
>>
>
> I believe I have fixed this in knepley/fix-plex-bc-multiple which should
> be merged soon. Do you know how to merge that branch and try?
>
>   Thanks,
>
>      Matt
>
>
>> The pressure is then very high at the corner nodes of those 2 Elements.
>> Do you think my pressure problem comes from there ? (The velocity field
>> is correct)
>>
>> Many thanks,
>>
>> Regards,
>>
>> Yann
>>
>> PS : i'm using those runtime options :
>> -vel_petscspace_order 2 -pres_petscspace_order 1 \
>> -ksp_type fgmres -pc_type fieldsplit -pc_fieldsplit_type schur
>> -pc_fieldsplit_schur_fact_type full  \
>> -fieldsplit_velocity_pc_type lu -fieldsplit_pressure_ksp_rtol 1.0e-10
>> -fieldsplit_pressure_pc_type jacobi
>>
>>
>> ---
>> L'absence de virus dans ce courrier électronique a été vérifiée par le
>> logiciel antivirus Avast.
>> https://www.avast.com/antivirus
>>
>>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
> https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/%7Emk51/>
>
>
> --
> ___________________________
>
> Yann JOBIC
> HPC engineer
> IUSTI-CNRS UMR 7343 - Polytech Marseille
> Technopôle de Château Gombert5 rue Enrico Fermi <https://maps.google.com/?q=5+rue+Enrico+Fermi&entry=gmail&source=g>
> 13453 Marseille cedex 13
> Tel : (33) 4 91 10 69 43
> Fax : (33) 4 91 10 69 69
>
>
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> Garanti
> sans virus. www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
> <#m_135884221591823617_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171205/ba4f233e/attachment.html>


More information about the petsc-users mailing list