[petsc-users] PetscFEIntegrateBdResidual_Basic

Matthew Knepley knepley at gmail.com
Mon Nov 20 11:02:02 CST 2017


On Mon, Nov 20, 2017 at 11:46 AM, David Fuentes <fuentesdt at gmail.com> wrote:

> *Is there a way to pass the boundary set id to the function pointers for
> the residual evaluation on the boundary ?*
>
> *https://bitbucket.org/petsc/petsc/src/d89bd21cf2b5366df29efb6006298d2bc22fb509/src/dm/dt/interface/dtfe.c?at=master&fileviewer=file-view-default#dtfe.c-4245
> <https://bitbucket.org/petsc/petsc/src/d89bd21cf2b5366df29efb6006298d2bc22fb509/src/dm/dt/interface/dtfe.c?at=master&fileviewer=file-view-default#dtfe.c-4245>*
>
> *I want to pass the boundary condition/constraint ID (ids):
> PetscErrorCode PetscDSAddBoundary(PetscDS ds, DMBoundaryConditionType type,
> const char name[], const char labelname[], PetscInt field, PetscInt
> numcomps, const PetscInt *comps, void (*bcFunc)(void), PetscInt numids,
> const PetscInt *ids, void *ctx)*
>
> *to the functions for the residual evaluation on the boundary.*
>
>
> *For example, I have two side sets in an exodus file. I want to implement
> Neumann boundary conditions on side set = 2 and Mixed/Cauchy BC on side set
> = 3. Or similarly use different*
>
> *gmsh BC tags for Neumann/Mixed BC.*
>
I am not completely against this, but let me respond with my rationale
first. What I thought you would do, is call AddBoundary() twice. Once with
the
Neumann function and value 2, and once with the Cauchy function and value
3. Does that not work in your situation?

Also, I am refectoring this right now because a DS object can only take a
single boundary integral point function (which is a pain for inhomogeneous
Neumann),
so I welcome input.

  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

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/20171120/041aaf7a/attachment-0001.html>


More information about the petsc-users mailing list