VTK output from DA vectors
Matthew Knepley
knepley at gmail.com
Sun Jul 12 21:13:02 CDT 2009
On Sun, Jul 12, 2009 at 9:09 PM, Saswata Hier-Majumder <saswata at umd.edu>wrote:
> 1) I did. It returns correct values for the x nodes, but fails to do so for
> the y nodes. Here's a sample output generated from the driven cavity
> problem. ( I suppressed printing the solutions for brevity).
I did not realize you mean as fields (rather than as the mesh). Give me your
exact calling sequence. I can output
parallel fields fine, so something else must be going on. If you modified
the code, send that too.
Matt
>
> 2) Thanks, I'll try that.
>
> Matthew Knepley wrote:
>
>> 1) I believe the standard VTK viewer (ASCII Viewer with VTK format) gets
>> the
>> coordinates
>> right. Can you verify this?
>>
>> 2) You should be able to split the 4- component field into 4 fields using
>> the Split filter in VTK
>> or whatever viewer you use (I do this in Mayavi2, but Paraview also
>> works).
>>
>> Matt
>>
>> On Sun, Jul 12, 2009 at 10:34 AM, Saswata Hier-Majumder <saswata at umd.edu
>> >wrote:
>>
>>
>>
>>> Hi,
>>> I would like to generate a vtk output from a multicomponent problem. In
>>> the vtk file, I would like the DA coordinates as well as all 4 components
>>> stored separately as scalar point data.
>>>
>>> I have been using the VecView_VTK routine from
>>> /ksp/ksp/ksp/examples/tutorials/ex29.c. But the vtk output seems to
>>> contain
>>> only the local coordinates (may be because DAGetCoordinates is not
>>> collective?). Is there a way to fix this?
>>>
>>> Also, using the same routine, all components of the solution
>>> corresponding
>>> to a node are dumped together. Is there a way to extract each component
>>> separately and ouput them separately as scalar point data?
>>>
>>> Thanks
>>>
>>> --
>>> www.geol.umd.edu/~saswata <http://www.geol.umd.edu/%7Esaswata> <
>>> http://www.geol.umd.edu/%7Esaswata>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
> --
> www.geol.umd.edu/~saswata <http://www.geol.umd.edu/%7Esaswata>
>
>
> # vtk DataFile Version 2.0
> ASCII
> DATASET STRUCTURED_POINTS
> DIMENSIONS 49 49 1
> ORIGIN 0 0 0
> SPACING 1 1 1
>
> POINT_DATA 2401
> SCALARS scalars double 3
> LOOKUP_TABLE default
> X_COORDINATES 49 double
> 0 0.0208333 0.0416667 0.0625 0.0833333 0.104167 0.125 0.145833 0.166667
> 0.1875 0.208333 0.229167 0.25 0.270833 0.291667 0.3125 0.333333 0.354167
> 0.375 0.395833 0.416667 0.4375 0.458333 0.479167 0.5 0 0.0208333 0.0416667
> 0.0625 0.0833333 0.104167 0.125 0.145833 0.166667 0.1875 0.208333 0.229167
> 0.25 0.270833 0.291667 0.3125 0.333333 0.354167 0.375 0.395833 0.416667
> 0.4375 0.458333 0.479167
> Y_COORDINATES 49 double
> 0 0.0208333 0.0625 0.104167 0.145833 0.1875 0.229167 0.270833 0.3125
> 0.354167 0.395833 0.4375 0.479167 5.27367e-317 5.23119e-317 0 5.31253e-317 0
> 0 0 3.41641e-312 3.26575e-311 1.14376e-311 1.54269e-311 1.94163e-311
> 2.34056e-311 5.29014e-311 5.27095e-317 0 0 0 1.82492e-312 1.01431e-311
> 1.84614e-311 1.49455e-320 3.09811e-312 1.17559e-311 2.04136e-311 0 0 0
> 5.23119e-317 0 0 8.06358e-313 5.3312e-317 5.33093e-317 0 5.27392e-317
> Z_COORDINATES 1 double
> 0
>
>
--
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/20090712/fa15abf9/attachment-0001.htm>
More information about the petsc-users
mailing list