On Mon, Sep 24, 2012 at 12:32 AM, Subramanya G <span dir="ltr"><<a href="mailto:subramanya.g@gmail.com" target="_blank">subramanya.g@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Matt,<br>
I got what you were saying about the boundary conditions. But I am<br>
unable to figure out which routines to use for selecting only a<br>
section of the mesh while setting up a Petsc Section. The<br>
DMComplexCreateSection does not seem to offer anyway of restricting<br>
the mesh.<br></blockquote><div><br></div><div>Take a look at the source for DMComplexCreateMesh(): <a href="http://petsc.cs.iit.edu/petsc/petsc-dev/annotate/5b880935157f/src/dm/impls/complex/complex.c#l5069">http://petsc.cs.iit.edu/petsc/petsc-dev/annotate/5b880935157f/src/dm/impls/complex/complex.c#l5069</a></div>
<div>It just loops over ever point in the domain (DMComplexGetChart()) and sets a number of unknowns</div><div>on it using PetscSectionSetDof(). After that is finished, it calls PetscSectionSetUp(). Its a little more</div>
<div>complicated with boundary conditions, but you can check this function for the specifics.</div><div><br></div><div>If you want just part of the domain, only call PetscSectionSetDof() on part of the points.</div><div><br>
</div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks,<br>
<br>
<br>
Subramanya G Sadasiva,<br>
<br>
Graduate Research Assistant,<br>
Hierarchical Design and Characterization Laboratory,<br>
School of Mechanical Engineering,<br>
Purdue University.<br>
<br>
"The art of structure is where to put the holes"<br>
Robert Le Ricolais, 1894-1977<br>
<br>
<br>
On Fri, Sep 21, 2012 at 3:42 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br>
> On Fri, Sep 21, 2012 at 2:20 PM, Subramanya G <<a href="mailto:subramanya.g@gmail.com">subramanya.g@gmail.com</a>><br>
> wrote:<br>
>><br>
>> I have a small question about using DMComplex.<br>
>> How does one keep track of external boundaries. I found no methods to<br>
>> check if a particular node/face belonged to a particular external<br>
>> edge set.<br>
><br>
><br>
> First you want to distinguish between<br>
><br>
> a) Topological boundaries<br>
><br>
> For this you use Labels, so you can mark parts of the mesh using<br>
> DMCcomplexSetLabelValue()<br>
><br>
> b) Algebraic Boundary Conditions<br>
><br>
> These are specified in the PetscSection using PetscSectionSetConstraintDof()<br>
> and<br>
> PetscSectionSetConstraintIndices(). To construct these, you typically use<br>
> the information<br>
> in the mesh labels.<br>
><br>
>><br>
>> Also, Is it possible to set up a problem over a part of the mesh<br>
>> instead of the entire mesh?<br>
><br>
><br>
> This is very easy. Just create a PetscSection that only has unknowns over<br>
> part of the mesh.<br>
><br>
> Matt<br>
><br>
>><br>
>> Thanks<br>
>><br>
>><br>
>> Subramanya G Sadasiva,<br>
>><br>
>> Graduate Research Assistant,<br>
>> Hierarchical Design and Characterization Laboratory,<br>
>> School of Mechanical Engineering,<br>
>> Purdue University.<br>
>><br>
>> "The art of structure is where to put the holes"<br>
>> Robert Le Ricolais, 1894-1977<br>
><br>
><br>
><br>
<span class="HOEnZb"><font color="#888888">><br>
> --<br>
> What most experimenters take for granted before they begin their experiments<br>
> is infinitely more interesting than any results to which their experiments<br>
> lead.<br>
> -- Norbert Wiener<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>