[petsc-users] query DMPlexCreateSection
Matthew Knepley
knepley at gmail.com
Thu Jan 2 09:56:53 CST 2014
On Thu, Jan 2, 2014 at 4:11 AM, Dharmendar Reddy <dharmareddy84 at gmail.com>wrote:
> Hello,
> I am trying to use DMPlexCreateSection from fortran. I was
> able to solve a Poisson equation earlier using DMPlex for handling
> mesh data.
>
> Now i need to solve a system of equations: (poisson + continuity equations)
>
> - div (grad phi) = (C + n) --- (1)
> div (J ) = 0 --------------- (2)
> J = n grad(phi)
> ( C is constant)
> Simulation domain is defined as, rectangular regions 1 and 2 shown below.
>
> -------------
> | 1 |
> -------------
> | |
> | 2 |
> | |
> --------------
>
> Now, equation 1 is defined in region 1 and 2
> and equation 2 is defined only for region 2.
>
> How do i setup the section ? DMPlexCreateSection applies the given
> DOF layout per cell to all cells in the mesh.
>
> I am not sure if all the function calls inside
> DMPlexCreateSectionIntial and DMPlexCreateSectionBCDof are accessible
> from Fotran.
>
You don't want them anyway since they apply to the whole domain. The
control flow could be:
DMPlexSetChart()
<loop over region 1>
DMPlexSetDof() and DMPlexSetFieldDof()
<loop over region 2>
DMPlexSetDof() and DMPlexSetFieldDof()
<loop over BC>
DMPlexSetConstraintDof() and DMPlexSetFieldConstraintDof()
DMPlexSetUp()
<loop over BC>
DMPlexSetConstraintIndices() and DMPlexSetFieldConstraintIndices()
We could try and package some of this up if it looks generic.
Thanks,
Matt
> Thanks
> Reddy
>
> --
> -----------------------------------------------------
> Dharmendar Reddy Palle
>
--
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/20140102/928ce46b/attachment.html>
More information about the petsc-users
mailing list