Barry Smith <[email protected]> writes: > On Jan 29, 2014, at 7:55 PM, Jed Brown <[email protected]> wrote: > >> >> 3. src/xxx/interface/xxxdyn.c >> >> The functions are going in the common interface header, > > This is only true sometimes. For example > > petscdm*.h for different kinds of dms, > > petscviewerhdf5.h - this and the next one are because you need the > underlying package to access some of the APIs
In these cases, the external dependency leaks out into the interface so we can't define the functions with HDF5. The definitions of these functions should stay where they are. I would even make those headers install with the plugin instead of with base PETSc. > petscsnesfas.h - this should probably be put in petscsnes.h > ??? I don't care. I guess it's consistent with folding petscpcmg.h into petscpc.h. > petscpcasa.h - I vote we completely delete the ASA stuff, > it ain’t used and must be largely broken ??? I think so. It's a cool research algorithm, but I'm afraid it may be more work to clean up the current implementation than to reimplement. >> so why not >> put their definitions in the directory with all the other definitions >> from that header? > > It is kind of weird to have “plugin” code directly in the same > files as non-plugin code. You kind of think of plugin code as a > chunk of something that you just drop in some place and then > use. Having it just sitting in the same include file is strange. Functions that don't have external dependencies aren't actually part of the plugin. They are richer interfaces that don't require the plugins (though they may not do something _useful_ unless the plugin exists). In particular, PackageA could ship a binary that calls PCHYPRESetType(), which would have a hard dependency on libpetsc.so, but NOT on the Hypre plugin. Since it has more functionality when the petsc-hypre plugin is around, package managers would say that it has an optional or "recommended" dependency on the petsc-hypre plugin. Users could choose to install that later if they wanted.
pgplEGzAJ6B2Y.pgp
Description: PGP signature
