[petsc-users] Boundary Nodes of DMPlex object

Matthew Knepley knepley at gmail.com
Thu Apr 25 20:37:22 CDT 2013


On Thu, Apr 25, 2013 at 7:03 PM, Dharmendar Reddy
<dharmareddy84 at gmail.com>wrote:

> Hello,
>          I need to mark the nodes on the boundary of a mesh to impose
> Dirichlet BC.  I am doing the following:
>
>      call DMPlexGetHeightStratum(subdm,1,facetIdStart,facetIdend,ierr)
>      do facetId=facetIdStart,facetIdEnd
>        ! check if a facet is internal, i.e., numSharedCell=2 because a
> facet is
>        ! shared by two cells
>        call DMPlexGetSupportSize(subdm,facetId,numSharedCell,ierr)
>        if(numSharedCell==1) then ! facet is a boundary face
>          ! mark the nodes of this face as boundary
>
>        end if
>      end do
>

In SNES ex12, I do this. You could start with

      ierr = DMPlexMarkBoundaryFaces(dm, label);CHKERRQ(ierr);

but what you have is fine. Then I use

      ierr  = DMPlexLabelComplete(dm, label);CHKERRQ(ierr);

which does what you want. Underneath it does exactly what you proposed,
namely
mark the closure of each point in the label.

  Thanks,

     Matt


> How do i get the 0-cells (ie nodes) forming given dim-cell ?
>
> Am i using the right approach ?
> Also, is there DMPlex functionality to mark boundary nodes ?
>
> Thanks
> Reddy
> --
> -----------------------------------------------------
> Dharmendar Reddy Palle
> Graduate Student
> Microelectronics Research center,
> University of Texas at Austin,
> 10100 Burnet Road, Bldg. 160
> MER 2.608F, TX 78758-4445
> e-mail: dharmareddy84 at gmail.com
> Phone: +1-512-350-9082
> United States of America.
> Homepage: https://webspace.utexas.edu/~dpr342
>



-- 
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/20130425/3197bc9f/attachment.html>


More information about the petsc-users mailing list