<div dir="ltr">Sorry Again. I always use to use reply and the mail went to petsc-users. Only since last few days it is not going to petsc-users. I will make sure i reply-all from now on. <br><div class="gmail_extra"><br><div class="gmail_quote">
On Thu, Apr 18, 2013 at 7:43 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Please always use "reply-all" so that your messages go to the list.<br>
This is standard mailing list etiquette.  It is important to preserve<br>
threading for people who find this discussion later and so that we do<br>
not waste our time re-answering the same questions that have already<br>
been answered in private side-conversations.  You'll likely get an<br>
answer faster that way too.<br>
<div class="im"><br>
Dharmendar Reddy <<a href="mailto:dharmareddy84@gmail.com">dharmareddy84@gmail.com</a>> writes:<br>
<br>
> Thanks. It works now. And i like the binary-appended XML. Few questions<br>
> though.<br>
><br>
> I see that the data in vtu has Field Names liek this :<br>
> Vec_0xyyyyyyyy_0Point0<br>
><br>
> It would be nice to have the data with Field Names set in then default<br>
> section of DMPlex.<br>
<br>
</div>call PetscObjectSetName(U, 'myfield', ierr)<br>
<div class="im"><br></div></blockquote><div>   This procedure may not work if U has multiple fields per mesh node right ? The field names are already set into Default section of the dm.  <br> <br>  I set the field layout and boundary points using DMPlexCreateSection and DMSetDefualtSection<br>
</div><div>  Now, my test problem has 567 nodes. Node 1 and 567 have Dirichlet BC. When i do DMGetGlobalVector it has size 565, the solution vector of the snes  also has size 565.  The solution vector written vtu file has 567 values with zero value at the boundary nodes. Am i missing a step here? <br>
<br>Usgin Vecsetvaluessection i apply bc  inside the subroutines passed to dmsnessetfunction/jacobain. The bc values are propagated to the solver.  <br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im">
> Also, I do not see the Boundary values, How do I get that data in to the<br>
> vector before viewing?<br>
<br>
</div>Did you remove the boundary nodes when setting DMPlex's section?<br>
<div class="im"><br>
> I need to added to the viewer some auxiliary data which depends on the<br>
> solution of the snes problem, If do the following will that do ?<br>
<br>
</div>If the 'auxdm' is different from the original DM, you currently have to<br>
write it to a different file or have a single big "visualization DM"<br>
that contains all the fields you ever want to look at (including<br>
boundary values as appropriate).  This may be the simplest solution for<br>
you and for us.<br>
<div class=""><div class="h5"><br></div></div></blockquote><div>    auxdm is the clone of actual dm. I think i got how to handle this.  <br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class=""><div class="h5">
> DMGetGlobalVector(dm,u,ierr)<br>
><br>
> DMGetGlobalVector(auxdm,v,ierr)<br>
><br>
>  <Some how update boundary data in u><br>
><br>
> v = f(u)  ! compute the aux data...<br>
><br>
> PetscViewerCreate(PETSC_COMM_WORLD, viewer, ierr); CHKERRQ(ierr)<br>
>  PetscViewerSetType(viewer, PETSCVIEWERVTK, ierr); CHKERRQ(ierr)<br>
> PetscViewerFileSetName(viewer, 'sol.vtu', ierr)<br>
><br>
> VecView(u,viewer,ierr)<br>
> VecView(v,viewer,ierr)<br>
><br>
><br>
><br>
><br>
> On Thu, Apr 18, 2013 at 11:37 AM, Jed Brown <<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>> wrote:<br>
><br>
>> Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> writes:<br>
>><br>
>> > On Thu, Apr 18, 2013 at 9:25 AM, Jed Brown <<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>> wrote:<br>
>> ><br>
>> >> Dharmendar Reddy <<a href="mailto:dharmareddy84@gmail.com">dharmareddy84@gmail.com</a>> writes:<br>
>> >><br>
>> >> > ! This line gives a compile error, as PETSCVIEWERVTK is not defined<br>
>> for<br>
>> >> > FORTRAN<br>
>> >> > !  !call PetscViewerSetType(viewer, PETSCVIEWERVTK)<br>
>> >><br>
>> ><br>
>> > I have pushed a Fortran example of this now:<br>
>> ><br>
>> >   src/dm/impls/plex/example/tutorials/ex1f90<br>
>><br>
>> Relative to Matt's example, you can use the following for<br>
>> binary-appended XML, which is fast and works in parallel.<br>
>><br>
>> diff --git i/src/dm/impls/plex/examples/tutorials/ex1f90.F<br>
>> w/src/dm/impls/plex/examples/tutorials/ex1f90.F<br>
>> index d6954e6..570ad9f 100644<br>
>> --- i/src/dm/impls/plex/examples/tutorials/ex1f90.F<br>
>> +++ w/src/dm/impls/plex/examples/tutorials/ex1f90.F<br>
>> @@ -82,9 +82,7 @@<br>
>>        CHKERRQ(ierr)<br>
>>        call PetscViewerSetType(viewer, PETSCVIEWERVTK, ierr)<br>
>>        CHKERRQ(ierr)<br>
>> -      call PetscViewerSetFormat(viewer, PETSC_VIEWER_ASCII_VTK, ierr)<br>
>> -      CHKERRQ(ierr)<br>
>> -      call PetscViewerFileSetName(viewer, 'sol.vtk', ierr)<br>
>> +      call PetscViewerFileSetName(viewer, 'sol.vtu', ierr)<br>
>>        CHKERRQ(ierr)<br>
>>        call VecView(u, viewer, ierr)<br>
>>        CHKERRQ(ierr)<br>
>><br>
>><br>
>> The example also leaks memory.  (Matt is fixing that.)<br>
>><br>
><br>
><br>
><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">dharmareddy84@gmail.com</a><br>
> Phone: <a href="tel:%2B1-512-350-9082" value="+15123509082">+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><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: +1-512-350-9082<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>