On Thu, Jan 2, 2014 at 9:56 AM, Matthew Knepley <[email protected]> wrote:
> On Thu, Jan 2, 2014 at 4:11 AM, Dharmendar Reddy > <[email protected]>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: > Replace DMPlex with PetscSection. I am tired. Thanks, Matt > 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 > -- 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
