[petsc-users] DMPlex Fortran examples

Dharmendar Reddy dharmareddy84 at gmail.com
Tue Mar 5 09:20:31 CST 2013


Thanks, so numDof is basically number of dof per topological entity of a
cell.  Did i get this right ?

+!     Let u be defined on vertices

 +      numDof(0*(dim+1)+1)     = 1 (should not be number of nodes)

 +!     Let v be defined on cells

 +      numDof(1*(dim+1)+dim+1) = dim

 +!     Let v be defined on faces

 +      numDof(2*(dim+1)+dim)   = dim-1 (similarly, should not be
number of faces time (dim-1))




On Tue, Mar 5, 2013 at 9:06 AM, Matthew Knepley <knepley at gmail.com> wrote:

> On Tue, Mar 5, 2013 at 2: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.
>>
>
> I have now pushed your example, slightly changed, to the repository:
>
>   src/dm/impls/plex/examples/tutorials/ex1.c/ex1f90.F
>
> and you can run with -dim 2 or -dim 3.
>
>   Thanks,
>
>      Matt
>
>
>> 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
>>
>
>
>
> --
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130305/9a3bf96a/attachment.html>


More information about the petsc-users mailing list