[petsc-users] DMPlex Fortran examples

Matthew Knepley knepley at gmail.com
Tue Mar 5 04:55:47 CST 2013


On Tue, Mar 5, 2013 at 2:30 AM, Dharmendar Reddy <dharmareddy84 at gmail.com>wrote:

> On a related note, How does one handle auxilary data on the mesh ? Say in
> a Poisson problem, I want to assign dielectric constant to each cell. Of
> course i can create a indexset or vec tor but, I want the aux data to be
> distributed along with the mesh.


1) I have created an F90 version of DMPlexCreateSection()

2) My plan was to have them assigned on the distributed mesh, since this is
scalable. However,
    assigning them on the serial mesh will be straightforward. You will use
DMPlexDistributeField().
    The only thing you will need is the PetscSF created during
distribution, which I will preserve, since
    right now it is destroyed at the end.

  Thanks,

     Matt


> On Tue, Mar 5, 2013 at 1:18 AM, Dharmendar Reddy <dharmareddy84 at gmail.com>wrote:
>
>> Hello,
>>          Trying to understand the DMPlexCreateSection first. I have
>> created a test case, can you please have a look at it? Actually the code
>> has a link error on my system with petsc-dev.  I used DMPlexeCreateBoxMesh
>> to create the mesh. Looks like there is no Fortran interface to that
>> function. If i comment out the dmplexcreateboxmesh. It does create and
>> executable.
>>
>> petscDMTest_v2.o: In function `MAIN__':
>> petscDMTest_v2.F90:(.text+0x9b): undefined reference to
>> `dmplexcreateboxmesh_'
>> make: [testDMMeshv2] Error 1 (ignored)
>>
>> Also, If include finclude/petsc.h90 instead of finclude/petsch.h i get
>> compile error :
>>
>> petscDMTest_v2.F90(73): error #6691: A pointer dummy argument may only be
>> argument a
>> ssociated with a pointer.   [NUMCOMP]
>>   call DMPlexCreateSection(dmMesh, topologyDim, numField, numComp,
>> numDof, &
>> ----------------------------------------------------------^
>> petscDMTest_v2.F90(73): error #6691: A pointer dummy argument may only be
>> argument a
>> ssociated with a pointer.   [NUMDOF]
>>   call DMPlexCreateSection(dmMesh, topologyDim, numField, numComp,
>> numDof, &
>> -------------------------------------------------------------------^
>> petscDMTest_v2.F90(74): error #6691: A pointer dummy argument may only be
>> argument a
>> ssociated with a pointer.   [BCFIELD]
>>                            numBC, bcField, bcPointIS,section,ierr)
>> ----------------------------------^
>> petscDMTest_v2.F90(74): error #6691: A pointer dummy argument may only be
>> argument a
>> ssociated with a pointer.   [BCPOINTIS]
>>                            numBC, bcField, bcPointIS,section,ierr)
>> -------------------------------------------^
>>
>> Please have a look at the attached test case and Makefile
>>
>>
>> On Mon, Mar 4, 2013 at 7:39 PM, Matthew Knepley <knepley at gmail.com>wrote:
>>
>>> On Mon, Mar 4, 2013 at 7:50 PM, Dharmendar Reddy <
>>> dharmareddy84 at gmail.com> wrote:
>>>
>>>> Hello,
>>>>          Is there a DMPlex based fortran example for solving a pde such
>>>> as laplace ? Even a c example will do. I am not able to understand the
>>>> terminology of chart, cone etc. Is there a paper or user guide to learn
>>>> more about the definitions of terms such as chart cone stratum ? I remember
>>>> reading a presentation file by mathew about sieve. Is there a newer
>>>> tutorial with terminology mapped to the new DMPlex/DMMesh functions.
>>>>
>>>
>>> There is a fully worked out Stokes example (SNES ex62) and a Finite
>>> Volume example (TS ex11),
>>> and there are a few tests. You should not need much of that stuff for
>>> defining a problem. I am
>>> writing up a paper about ex11 right now. There is a short manual section
>>> on unstructured grids as well.
>>>
>>> I think the key thing to understand is how to define a data layout over
>>> the mesh using a PetscSection.
>>> Once that is done, all the DM functions work as normal, and the last
>>> hard part is coding your residual
>>> loop. I have support for FEM schemes, but its undocumented and slightly
>>> complex in order to allow
>>> GPU assembly, so you may be more comfortable with your own element loop
>>> to start.
>>>
>>>   Thanks,
>>>
>>>      Matt
>>>
>>>
>>>> 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
>>>
>>
>>
>>
>> --
>> -----------------------------------------------------
>> 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
>>
>
>
>
> --
> -----------------------------------------------------
> 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/20130305/b736935b/attachment.html>


More information about the petsc-users mailing list