<div dir="ltr">On Wed, Mar 13, 2013 at 7:07 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="im">On Wed, Mar 6, 2013 at 5:30 PM, Dharmendar Reddy <span dir="ltr"><<a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello Mathew,<br>                     I created an example (tutorial like) for creating DM using cell list of a box mesh with quad cells (anti clockwise orientation for cell nodes). The Box mesh is created locally. I also included in comments explanations of cells, dimension, co-dimension based on my understanding. <br>


<br>May be you can add some explanation for understanding the idea of stratum. <br><br><br>I find that DMPlexComputeCellGeometry gives incorrect results for J, detJ and InvJ where as the same code that you used in DMPlexComputeRectangleGeometry_private gives correct answers when i evaluated those steps locally in the example code.      <br>

</blockquote><div><br></div></div><div>This was my bug. I forgot to declare an F90 interface for that function. I am including my changed version that worked for me.</div></div></div></div></blockquote><div><br></div><div style>
I forgot to attach it.</div><div style><br></div><div style>  Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">
<div class="gmail_quote"><div> </div></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div class="im"><div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Can you tell me how i should go about this: I create mesh in gmsh for my problem. The output of node coordinates, and connectivity which i use via DMcreateFromcelllist to create a DM. In gmsh i also assign physical ids to blokcs for region which i need to use for assigning material properties, boundary conditions. How do i include this information into DMPlex ? <br>

</blockquote><div><br></div></div><div>You use DMLabels. You can look at the implementation I use to read ExodusII files in plexexodusii.c</div><div><br></div><div>We have recently converted the repository to Git. If you clone the new repository, and checkout the 'next'</div>

<div>branch, you will get my fix. If you want to see the latest DMPlex development, I use the branch knepley/branch.</div><div>If you have any problems, feel free to mail because we are trying to make it easy. There are directions online at</div>

<div><a href="https://bitbucket.org/petsc/petsc/wiki/Home" target="_blank">https://bitbucket.org/petsc/petsc/wiki/Home</a>.<br></div><div class="im"><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

I understood how to create a Petscsection for Feild data layout. Now i need to be able to access some auxilary data which is usually mesh positon dependent but given information. <br></blockquote><div><br></div></div><div>

You can just create another one for this. I would make another DM using DMPlexClone() and set the</div><div>PetscSection for the aux data as the default on that one.</div><div><br></div><div>  Thanks,</div>
<div><br></div><div>     Matt</div><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

I have design my code interface such that the user needs to write the linear and blinear form with the DM, cell and basis functions as input. All the data dof and aux data is to be access via DM <br>
<br>Please give me some pointers, i will digg to learn more.<br><br>Thanks<br>Reddy  <br><br><div class="gmail_quote">On Wed, Mar 6, 2013 at 4:51 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>On Wed, Mar 6, 2013 at 2:43 AM, Dharmendar Reddy <span dir="ltr"><<a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a>></span> wrote:<br>


</div><div class="gmail_extra"><div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I think i caught the issues, please see the reply inline below. It is not clear to me for which DMPlex i should include petsc.h90 or petsc.h <br>



<br>Still need to fix the DMPlexComputeCellGeometry  though<br><br><br><div class="gmail_quote"><div>
On Tue, Mar 5, 2013 at 9:52 PM, Dharmendar Reddy <span dir="ltr"><<a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a>></span> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">




Hello,<div><br>         I am having trouble with a couple of DMPlex routines. <br> I was doing tests on various function calls that i may need to write a test Poisson problem.<br><br>First issue is with DMPlexComputeCellGeometry. For a rectangle cell geometry, I get , v0, J, invJ, and detJ as zero.<br>



</div></blockquote></div></blockquote><div><br></div></div><div>Geometric primitives of course depend on the way you specify a cell. Simplicies are nice in</div><div>that you can only change the orientation, but hexes are harder. I specify quads so that the</div>



<div>vertices go counter-clockwise around the boundary. Do you do this? If so, can you send</div><div>a small example test that I can add to PETSc.</div><div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>DMPlexGetConeSize gives run time error<br>

<br></div></blockquote><div><font color="#3333ff">  I had to include petsc.h90 to fix this. </font></div>

</div></blockquote><div><br></div></div><div>I have fixed the manpage documentation to reflect this.</div><div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div class="gmail_quote">
<div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
DMPlexVecGetClosure gives runtime error, Should not this call be DMPlexVecGetClosureF90 ? is there such interface ? I remember doing a procedure like VecGetArrayF90 and VecRestoreArrayF90 when i had to pass pointer which need to be restored. <br>





<br></blockquote></div><div> <font color="#3366ff"> Looks like there is an inconsistency in interface defined on petsc-dev manual page. and the interface defined in  finclude/ftn-custom/petscdmplex.h90</font> <br><span style="color:rgb(51,102,255)">Fortran interface does not have the csize parameter defined below</span><br>




<pre>PetscErrorCode DMPlexVecGetClosure(DM dm, PetscSection section, Vec v, PetscInt point, PetscInt *csize, const PetscScalar *values[])</pre></div></div></blockquote></div><div>I have noted this on the manpage.</div><div>



<br></div><div>Did you look at src/dm/impls/plex/examples/tests/ex2f90.F? It tests many of these operations.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div><div><div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="gmail_quote"><div> <br><br></div><div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



I have attached test case with the make file and error.log. Please have a look at it.<br>you need to run:<br>
make all debug=0<br>./testDMView<br><br>Also, I have trouble compiling the code with debug=1 which uses petsc configured in debug mode everything else being same (you can see the configure options in the error.log). <br>




I get this error message:<br>login1$ make all debug=1<br>make: *** /home1/00924/Reddy135/LocalApps/petsc-dev/mpi_rScalar: Is a directory.  Stop<br>.<div><div><br><br><br><div class="gmail_quote">
On Tue, Mar 5, 2013 at 9:22 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>On Tue, Mar 5, 2013 at 10:20 AM, Dharmendar Reddy <span dir="ltr"><<a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a>></span> wrote:<br>





</div><div class="gmail_extra"><div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Thanks, so numDof is basically number of dof per topological entity of a cell.  Did i get this right ?<br>






</blockquote><div><br></div></div><div>Yes, dof per field per topological entity (sieve point depth).</div><div><br></div><div>   Matt</div><div><div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">






<pre>+!     Let u be defined on vertices</pre>
      
    

    
      


    

  
    
      <div>
        
          
        
        
        <pre>+      numDof(0*(dim+1)+1)     = 1 (should not be number of nodes)</pre>
      </div>
    

    
      


    

  
    
      <div>
        
          
        
        
        <pre>+!     Let v be defined on cells</pre>
      </div>
    

    
      


    

  
    
      <div>
        
          
        
        
        <pre>+      numDof(1*(dim+1)+dim+1) = dim</pre>
      </div>
    

    
      


    

  
    
      <div>
        
          
        
        
        <pre>+!     Let v be defined on faces</pre>
      </div>
    

    
      


    

  
    
      <div>
        
          
        
        
        <pre>+      numDof(2*(dim+1)+dim)   = dim-1 (similarly, should not be number of faces time (dim-1))</pre>
      </div><br><br><br><div class="gmail_quote">On Tue, Mar 5, 2013 at 9:06 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">







<div dir="ltr"><div>On Tue, Mar 5, 2013 at 2:18 AM, Dharmendar Reddy <span dir="ltr"><<a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a>></span> wrote:<br></div><div class="gmail_extra">







<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<div><br>         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.<br>








</div></blockquote><div><br></div><div>I have now pushed your example, slightly changed, to the repository:</div><div><br></div><div>  src/dm/impls/plex/examples/tutorials/ex1.c/ex1f90.F</div><div><br></div>
<div>and you can run with -dim 2 or -dim 3.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div><div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">








<span style="color:rgb(51,102,255)">petscDMTest_v2.o: In function `MAIN__':<br>petscDMTest_v2.F90:(.text+0x9b): undefined reference to `dmplexcreateboxmesh_'<br>make: [testDMMeshv2] Error 1 (ignored)</span><br>
<br>Also, If include finclude/petsc.h90 instead of finclude/petsch.h i get compile error :<br><br><span style="color:rgb(51,51,255)"><span>petscDMTest_v2.F90(73): error #6691: A pointer dummy argument may only be argument a<br>









ssociated with a pointer.   [NUMCOMP]<br>  call DMPlexCreateSection(dmMesh, topologyDim, numField, numComp, numDof, &<br>----------------------------------------------------------^<br>petscDMTest_v2.F90(73): error #6691: A pointer dummy argument may only be argument a<br>









ssociated with a pointer.   [NUMDOF]<br>  call DMPlexCreateSection(dmMesh, topologyDim, numField, numComp, numDof, &<br>-------------------------------------------------------------------^<br>petscDMTest_v2.F90(74): error #6691: A pointer dummy argument may only be argument a<br>









ssociated with a pointer.   [BCFIELD]<br>                           numBC, bcField, bcPointIS,section,ierr)<br>----------------------------------^<br>petscDMTest_v2.F90(74): error #6691: A pointer dummy argument may only be argument a<br>









ssociated with a pointer.   [BCPOINTIS]<br>                           numBC, bcField, bcPointIS,section,ierr)</span></span><br>-------------------------------------------^<br><br>Please have a look at the attached test case and Makefile<div>








<div><br>
<br><div class="gmail_quote">On Mon, Mar 4, 2013 at 7:39 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">









<div dir="ltr"><div>On Mon, Mar 4, 2013 at 7:50 PM, Dharmendar Reddy <span dir="ltr"><<a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a>></span> wrote:<br></div><div class="gmail_extra">









<div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<br>         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. <br>










</blockquote><div><br></div></div><div>There is a fully worked out Stokes example (SNES ex62) and a Finite Volume example (TS ex11),</div><div>and there are a few tests. You should not need much of that stuff for defining a problem. I am</div>










<div>writing up a paper about ex11 right now. There is a short manual section on unstructured grids as well.</div><div><br></div><div>I think the key thing to understand is how to define a data layout over the mesh using a PetscSection.</div>










<div>Once that is done, all the DM functions work as normal, and the last hard part is coding your residual</div><div>loop. I have support for FEM schemes, but its undocumented and slightly complex in order to allow</div>










<div>GPU assembly, so you may be more comfortable with your own element loop to start.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">










Thanks<span><font color="#888888"><br>Reddy <br><br clear="all"><br>-- <br>-----------------------------------------------------<br>Dharmendar Reddy Palle<br>Graduate Student<br>Microelectronics Research center,<br>
University of Texas at Austin,<br>
10100 Burnet Road, Bldg. 160<br>MER 2.608F, TX 78758-4445<br>e-mail: <a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a><br>Phone: <a href="tel:%2B1-512-350-9082" value="+15123509082" target="_blank">+1-512-350-9082</a><br>










United States of America.<br>Homepage: <a href="https://webspace.utexas.edu/~dpr342" target="_blank">https://webspace.utexas.edu/~dpr342</a><br>

</font></span></blockquote></div></div><span><font color="#888888"><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
</font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>-----------------------------------------------------<br>Dharmendar Reddy Palle<br>Graduate Student<br>Microelectronics Research center,<br>University of Texas at Austin,<br>









10100 Burnet Road, Bldg. 160<br>MER 2.608F, TX 78758-4445<br>e-mail: <a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a><br>Phone: <a href="tel:%2B1-512-350-9082" value="+15123509082" target="_blank">+1-512-350-9082</a><br>








United States of America.<br>Homepage: <a href="https://webspace.utexas.edu/~dpr342" target="_blank">https://webspace.utexas.edu/~dpr342</a><br>

</div></div></blockquote></div></div></div><div><div><br><br clear="all"><span><font color="#888888"><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
</font></span></div></div></div></div><span><font color="#888888">
</font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><br>-- <br>-----------------------------------------------------<br>Dharmendar Reddy Palle<br>Graduate Student<br>Microelectronics Research center,<br>






University of Texas at Austin,<br>
10100 Burnet Road, Bldg. 160<br>MER 2.608F, TX 78758-4445<br>e-mail: <a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a><br>Phone: <a href="tel:%2B1-512-350-9082" value="+15123509082" target="_blank">+1-512-350-9082</a><br>






United States of America.<br>Homepage: <a href="https://webspace.utexas.edu/~dpr342" target="_blank">https://webspace.utexas.edu/~dpr342</a><br>

</font></span></blockquote></div></div></div><div><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
</div></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>-----------------------------------------------------<br>Dharmendar Reddy Palle<br>Graduate Student<br>Microelectronics Research center,<br>University of Texas at Austin,<br>





10100 Burnet Road, Bldg. 160<br>MER 2.608F, TX 78758-4445<br>e-mail: <a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a><br>Phone: <a href="tel:%2B1-512-350-9082" value="+15123509082" target="_blank">+1-512-350-9082</a><br>




United States of America.<br>Homepage: <a href="https://webspace.utexas.edu/~dpr342" target="_blank">https://webspace.utexas.edu/~dpr342</a><br>

</div></div></blockquote></div></div></div><div><div><br><br clear="all"><br>-- <br>-----------------------------------------------------<br>Dharmendar Reddy Palle<br>Graduate Student<br>Microelectronics Research center,<br>



University of Texas at Austin,<br>
10100 Burnet Road, Bldg. 160<br>MER 2.608F, TX 78758-4445<br>e-mail: <a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a><br>Phone: <a href="tel:%2B1-512-350-9082" value="+15123509082" target="_blank">+1-512-350-9082</a><br>



United States of America.<br>Homepage: <a href="https://webspace.utexas.edu/~dpr342" target="_blank">https://webspace.utexas.edu/~dpr342</a><br>

</div></div></blockquote></div></div></div><div><div><br><br clear="all"><span><font color="#888888"><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
</font></span></div></div></div></div><span><font color="#888888">
</font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><br>-- <br>-----------------------------------------------------<br>Dharmendar Reddy Palle<br>Graduate Student<br>Microelectronics Research center,<br>

University of Texas at Austin,<br>
10100 Burnet Road, Bldg. 160<br>MER 2.608F, TX 78758-4445<br>e-mail: <a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a><br>Phone: <a href="tel:%2B1-512-350-9082" value="+15123509082" target="_blank">+1-512-350-9082</a><br>

United States of America.<br>Homepage: <a href="https://webspace.utexas.edu/~dpr342" target="_blank">https://webspace.utexas.edu/~dpr342</a><br>

</font></span></blockquote></div></div></div><div><div class="h5"><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
</div></div></div></div>
</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
</div></div>