[petsc-users] Using DMPlexProjectFunction on certain mesh points

Matthew Knepley knepley at gmail.com
Wed Oct 29 20:53:47 CDT 2014


On Wed, Oct 29, 2014 at 5:28 PM, Justin Chang <jychang48 at gmail.com> wrote:

> Hi all,
>
> Is there a way to have DMPlexProjectFunction() work only on select DMPlex
> mesh points? Kind of like the way DMPlexAddBoundary() works where it
> projects the boundary values on certain mesh points with certain label
> values and ID's.
>

I think what you want is DMPlexProjectFunctionLabelLocal()


> Also, I don't see anywhere in the online documentation regarding
> DMPlexAddBoundary. I think I saw an old post in the archives where it talks
> about what this function does, but can someone perhaps explain what each
> argument corresponds with? Thanks,
>
> Justin
>

I have not documented it yet since I am not sure its exactly what we want,
but I will add it now:

+ dm - The DM
. isEssential - Flag for essential boundary conditions, e.g. Dirichlet,
rather than natural, e.g. Neumann
. name - The boundary condition name
. lablename - Name of the label marking points with constraints
. field - DM field constrained by the condition
. bcFunc - Function giving boundary values
. numids - The number of label ids for constrained points
. ids - An array of label ids for constrained points
- ctx - A user context which is passed to bcFunc

PetscErrorCode DMPlexAddBoundary(DM dm, PetscBool isEssential, const
char name[], const char labelname[], PetscInt field, void (*bcFunc)(),
PetscInt numids, const PetscInt *ids, void *ctx)


  Thanks,

    Matt

-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141029/77cb086b/attachment.html>


More information about the petsc-users mailing list