[petsc-users] [Fortran] VTK viewer error

Dharmendar Reddy dharmareddy84 at gmail.com
Fri Apr 19 02:00:56 CDT 2013


On Fri, Apr 19, 2013 at 1:48 AM, Dharmendar Reddy
<dharmareddy84 at gmail.com>wrote:

>
> On Fri, Apr 19, 2013 at 12:54 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
>> Dharmendar Reddy <dharmareddy84 at gmail.com> writes:
>>
>> > Now the data in vtu file is calle
>> >
>> > myfieldPoint0    So the pattern is ..<fieldName><Point| Cell><field Id>
>> ?
>> > where the field Name is the one set using PetscObjectSetName ?
>> >
>> > But why is it not using the name set using PetscSectionSetFieldName ?
>>
>> The DMDA code (that I wrote before the DMPlex stuff) used field
>> information, but for whatever reason, I didn't have it available when
>> writing the DMPlex VTU code.  Maybe it was just that the "field"
>> interface is more complicated in DMPlex.
>>
>> > If i have a few fields per point then i can manage with the field Ids
>>  but
>> > usually the aux data i look at has about 10 to 12 fields. It would make
>> > things easier if i can refer to them using Names in the paraview.   As
>> the
>> > viewer is accessing the DM object, why not get the user set field names
>> in
>> > the default section ?
>>
>> This is now in 'next'.  I've only tested it for a cell-centered problem.
>> Let me know if it works for you.
>>
>> commit 1cfafdd3620b0d8e55f5b21e1f3de1941197d333
>> Author: Jed Brown <jed at 59A2.org>
>> Date:   Fri Apr 19 00:40:19 2013 -0500
>>
>>     DMPlex: teach VTU output about field names and components
>>
>>     Schema is "${ObjectName}${FieldName}.${Component}".  For example
>>
>
>   I like the above schema, lets call it schmea1. In the earlier
> ${ObjectName}.<Cell|Point>${FielId}, i find the Cell | Point  part of name
> not useful assuming the data is visualized in say preview as it the data is
> shown as cell or point data once the data is loaded.
> What do u think about the schema
> ${ObjectName}${FieldName}${FielId}.${Component} . Kind of redundant, but
> ObjectName and FieldName are optional variables whereas FieldId and
> Component always exist.
>  If the user did provide the Names one can use them. Otherwise, i am
> assuming that ObjectName is a default name generated by petsc and FieldName
> seems to be set to Unnamed? If the FieldId is not used and user sets just
> the ObjectName and not FieldName then the names will clash for multiple
> fields if one were to use schmea1.
>
>
>  I guess you can ignore what i said above. Looks like you are doing that
in plex vtu

225: ierr = PetscSNPrintf(buf,sizeof(buf),"CellField%D",field);CHKERRQ(ierr);
259: ierr = PetscSNPrintf(buf,sizeof(buf),"PointField%D",field);CHKERRQ(ierr);

for undefined filenames, fielname = buf.

I will try this with my code. Thanks



>
>>       SolutionDensity.0
>>       SolutionMomentum.0
>>       SolutionMomentum.1
>>       SolutionMomentum.2
>>       SolutionEnergy.0
>>
>>  src/dm/impls/plex/plexvtu.c | 43 ++++++++++++++++++++++++-----------
>>  1 file changed, 30 insertions(+), 13 deletions(-)
>>
>
>
>
> --
> -----------------------------------------------------
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130419/5e169226/attachment-0001.html>


More information about the petsc-users mailing list