[petsc-users] petsc_gen_xdmf.py errors

Justin Chang jychang48 at gmail.com
Wed Aug 12 14:39:35 CDT 2015


Sorry there was a typo. Here's the correct run:

./src/snes/examples/tutorials/ex12 -run_type test -refinement_limit 0.0
-bc_type dirichlet -interpolate 1 -petscspace_order 1 -dm_view hdf5:sol.h5
-vec_view hdf5:sol.h5::append

On Wed, Aug 12, 2015 at 2:22 PM, Justin Chang <jychang48 at gmail.com> wrote:

> Fande,
>
> Your sol.h5 is old and outdated. If you generate a more recent sol.h5 with
> the following SNES example inside your PETSC_DIR:
>
> ./src/snes/examples/tutorial/ex12 -run_type test -refinement_limit 0.0
> -bc_type dirichlet -interpolate 1 -petscspace_order 1 -dm_view hdf5:sol.h5
> -vec_view hdf5:sol.h5::append
> ./bin/petsc_gen_xdmf.py sol.h5
>
> the resulting sol.xmf is compatible with Paraview
>
> Thanks,
> Justin
>
>
> On Tue, Aug 11, 2015 at 8:53 PM, Fande Kong <fdkong.jd at gmail.com> wrote:
>
>> Hi all,
>>
>> I tried to use petsc_gen_xdmf.py to generate a xml file for visulaztion
>> using paraview. I got the following errors:
>>
>> ./petsc_gen_xdmf.py sol.h5
>> Traceback (most recent call last):
>>   File "./petsc_gen_xdmf.py", line 236, in <module>
>>     generateXdmf(sys.argv[1])
>>   File "./petsc_gen_xdmf.py", line 231, in generateXdmf
>>     Xdmf(xdmfFilename).write(hdfFilename, topoPath, numCells, numCorners,
>> cellDim, geomPath, numVertices, spaceDim, time, vfields, cfields)
>>   File "./petsc_gen_xdmf.py", line 190, in write
>>     for vf in vfields: self.writeField(fp, len(time), t, cellDim,
>> spaceDim, '/vertex_fields/'+vf[0], vf, 'Node')
>>   File "./petsc_gen_xdmf.py", line 164, in writeField
>>     self.writeFieldComponents(fp, numSteps, timestep, spaceDim, name, f,
>> domain)
>>   File "./petsc_gen_xdmf.py", line 120, in writeFieldComponents
>>     dims   = '1 %d 1' % (numSteps, dof, bs)
>> TypeError: not all arguments converted during string formatting
>>
>>
>> The hdf5 file is attached. Originally from Matthew. Configuration and
>> make log files are also attached.
>>
>> Fande Kong,
>>
>> Thanks,
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150812/9cf784f6/attachment.html>


More information about the petsc-users mailing list