[petsc-dev] DMDA_BOUNDARY_GHOSTED
Mark F. Adams
mfadams at lbl.gov
Thu Sep 26 21:33:23 CDT 2013
On Sep 26, 2013, at 9:17 PM, Matthew Knepley <knepley at gmail.com> wrote:
> On Thu, Sep 26, 2013 at 1:15 PM, Mark F. Adams <mfadams at lbl.gov> wrote:
> >
> > We have ghost cells in TS ex11, and I think we do them the correct way :) We have a function you register that fills them up, and we
> > loop over them explicitly.
> >
>
> Well damn Matt, this looks like the right way to do FV in PETSc, regardless of the nice BC abstraction, but am I going to get be seduced and crash into this island and turn into stone? i.e., can stupid people deal with your Sections and Plexes and crap (Barry?).
>
> So the important thing here is the organization of the boundary functions. You call
>
> ModelBoundaryRegister(bdFunc, bdMarker)
>
OK, I guess I see this as sugar. Don't get me wrong I like sugar. But I will at least keep the infrastructure for Neumann BCs.
> where the function is
>
> PhysicsBoundary_Advect_Inflow(Model mod, PetscReal time, const PetscReal *centroid, const PetscReal *normal, const PetscScalar *xInterior, PetscScalar *xGhost, void *ctx)
>
Yes, I'm comfortable to this point, I just wonder if I'm getting sucked into a morass of topology or something that I did not even think about taking in grad school.
> Then we loop over all the mesh pieces marked with each boundary marker, and call the function on those faces. You get the interior
> value, and make the ghost accordingly.
I think you are doing the same basic thing that I am used to, where you set the ghost values to satisfy the BCs for the current state, apply an operator of some sort, rinse and repeat ….
> I think you would do exactly the same thing in your simple example below. The only optimization
> would be in handling the topology, which you do not see anyway (unless you are a masochist).
>
Me a masochist? au contraire :)
This looks good. I will work on simplifying this example to make a well designed (a la ex11), albeit simple, FV test problem for my current favorite FMG test with an exact solution, and make a converge test out of it. I really need something simple for SR and this is a coarse grid solver. I will ask about SR support when I get there.
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130926/c238a1cc/attachment.html>
More information about the petsc-dev
mailing list