[petsc-dev] getting data out of a PetscFE simulation
Geoffrey Irving
irving at naml.us
Tue Jan 28 19:03:38 CST 2014
On Tue, Jan 28, 2014 at 4:18 PM, Matthew Knepley <knepley at gmail.com> wrote:
> On Tue, Jan 28, 2014 at 6:04 PM, Geoffrey Irving <irving at naml.us> wrote:
>>
>> What's the cleanest way to save data from a petsc finite element
>> simulation including boundary conditions? First, is it correct that
>> the local sections contains dofs for boundary conditions, while the
>> global section does not? If so, is the following the right plan?
>>
>> 1. At start, save the DMPlex
>> 2. At start, save the local section
>> 3. Every frame, sync the global vector a local vector and write out in
>> petsc binary format.
>>
>> Are there standard binary formats for DMPlex and sections? All I see
>> is the following sad commented out call to DMPlexView_Binary.
>
> We are having a big discussion about this on petsc-dev. I will write a longer
> thing, but now the only thing that works all the way is VTK. You should just
> be able to create the Viewer, do VecView for your fields, and then destroy
> it.
Thanks, and apologies for missing that thread.
Is there a working example of that kind of viewer use?
DMPlexVTKWriteAll_ASCII seems to traverse a linked list of vectors
attached to the viewer and write them all out, which is a bit
confusing.
> I create a global section with all the boundary values in it.
Do you mean this is what I'll need to do, or is that taken care of
automatically in the VTK path? It seems like boundary condition
handling can't be automatic, but DMPlexVTKWriteAll_ASCII reads a bunch
of section information out of the DM so I'm sure how one would
substitute a global section + boundaries.
> I plan on having HDF5+Xdmf and Exodus.
Thanks,
Geoffrey
More information about the petsc-dev
mailing list