[petsc-dev] VTK viewer design question
Jed Brown
jed at jedbrown.org
Fri Jun 29 12:07:22 CDT 2018
"Smith, Barry F." <bsmith at mcs.anl.gov> writes:
>> On Jun 29, 2018, at 10:15 AM, Jed Brown <jed at jedbrown.org> wrote:
>>
>> Stefano Zampini <stefano.zampini at gmail.com> writes:
>>
>>> Vec and DM classes should not be visible from Sys. This is why they are
>>> PetscObject.
>>> If they were visible, builds with --with-single-library=0 will be broken.
>>>
>>> 2018-06-29 17:06 GMT+03:00 Patrick Sanan <patrick.sanan at gmail.com>:
>>>
>>>> I'm looking at the VTK viewer implementation and I notice that
>>>> PetscViewerVTKAddField() [1]
>>>> accepts a parameter which, despite being called "dm", is of type
>>>> PetscObject.
>>
>> I would not object to moving vtkv.c into src/dm -- it isn't actually
>> usable without DM.
>
> Yeah, move it. It is based on DM and Vec
>
> But wait. If it is moved to DM and takes a vec argument, which will know about the DM, should it have a DM argument or should it be:
>
> PetscViewerVTKAddVec(PetscViewer viewer,Vec vec,PetscErrorCode (*PetscViewerVTKWriteFunction)(Vec,PetscViewer),PetscViewerVTKFieldType fieldtype)
I think that's fine. In the current interface, I think I just wanted
the interface to emphasize to the caller that the DM was significant.
More information about the petsc-dev
mailing list