[petsc-users] A Question about Boundary Condition

Zhenglun (Alan) Wei zhenglun.wei at gmail.com
Thu Nov 8 14:49:05 CST 2012


Dear all,
I hope you're having a nice day.
I'm working on the /src/ksp/ksp/example/tutorial/ex45.c right now and
came across a problem with the boundary condition.
It calls 'DMDACreate3d' in order to generate a structured mesh. However,
it adopts 'DMDA_BOUNARY_NONE' for the ghost point along x, y, z
direction. I wonder how does this work for the Neumann BC? What does the
solver do when it calculate those points adjacent to the boundary point.
I support it should have one layer ghost point in order to implement the
Newmann BC.
BTW, if I want to use the periodic BC in this case, should I just change
'DMDA_BOUNDARY_NONE' to 'DMDA_BONDARY_PERIODIC' in the direction that
the periodic BC is applied?

thanks,
Alan


More information about the petsc-users mailing list