[petsc-dev] vtk viewer
Jed Brown
jed at 59A2.org
Thu Sep 9 05:10:39 CDT 2010
On Thu, 9 Sep 2010 11:38:35 +0200, Matthew Knepley <knepley at gmail.com> wrote:
> This sounds good. The writers are in the Vec impls, which is probably
> not optimal since VecGetArray() is a nice interface. I think for
> modern viewers of Vec, I would put the whole thing in
> viewer/impls/vtk, since all the data you need from Vec and DA is
> public.
I agree that it only needs to use the public API, but it still needs to
go in the Vec or DM packages respectively, otherwise you pick up reverse
dependencies from petscsys to petscvec or petscdm. I would put it in
src/dm/da/src/ where the other DA viewers live.
> No need to stick stuff underneath. Then you just change VecView() to
> dispatch to the correct method, and that dispatch has an #ifdef from
> configure.
It would be in VecView_MPI_DA().
There was a thread on this a long time ago, but I think that Some Day
the viewer dispatch should be migrated to a proper multiple-dispatch
system so that it can be third-party extensible in both arguments (Vec
type and Viewer type/format).
Jed
More information about the petsc-dev
mailing list