[petsc-dev] (no subject)
Barry Smith
bsmith at mcs.anl.gov
Fri Feb 15 21:02:45 CST 2013
On Feb 15, 2013, at 8:56 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> On Fri, Feb 15, 2013 at 8:33 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> We should probably have a petscconf.h and a petsc-private/petscconfimpl.h
>
> What would that do?
Now everything that is figured out is visible in user code. Yes it is name spaced but 80+% of it is likely never relevant for user code and if the rule is don't expose stuff that is not relevant it does violate that :-)
>
> I think splitting petscsys.h (plus transitive includes) may be the best value. petscsys.h itself has a lot of comments (man pages for each numbered PetscMallocN, ...), but so many of its functions are needed by every caller that it may not provide much value to split it. Of course variadic macros would drastically consolidate that (and the error handling).
>
> Splitting petscconf.h by package or something would be cool because when reconfigure runs, any changes to petscconf.h usually don't affect anything, but I think trying to do that would be a maintenance disaster.
Might not be too bad actually. If the Package class itself just handled it as a matter of course, declaring Info with a package (and when called from within a package) would automatically to into its own list and then its own file.
Barry
>
>
> wc -l include/*.h include/petsc-private/*.h arch-gnu/include/petscconf.h | sort
> 102 include/petsccharacteristic.h
> 113 include/petscbt.h
> 114 include/petsc-private/petscaxpy.h
> 122 include/petscblaslapack.h
> 124 include/petsc-private/logimpl.h
> 131 include/petsc-private/petscfptimpl.h
> 140 include/petscctable.h
> 176 include/petsctime.h
> 181 include/petsc-private/threadcommimpl.h
> 182 include/petscblaslapack_c.h
> 182 include/petscblaslapack_caps.h
> 185 include/petscdmplex.h
> 193 include/petscsf.h
> 218 include/petsc-private/dmimpl.h
> 219 include/petsc-private/tsimpl.h
> 223 include/petsc-private/fortranimpl.h
> 242 include/petsc-private/snesimpl.h
> 250 include/petscoptions.h
> 256 include/petscdm.h
> 262 include/petscblaslapack_uscore.h
> 266 include/petscdmda.h
> 276 include/petsc-private/kspimpl.h
> 282 include/petscblaslapack_stdcall.h
> 304 include/petscdmmesh.h
> 314 include/petscdraw.h
> 334 include/petsc-private/vecimpl.h
> 451 include/petscmath.h
> 455 include/petscviewer.h
> 461 include/petscis.h
> 533 include/petsclog.h
> 564 include/petscvec.h
> 596 include/petscpc.h
> 649 include/petscksp.h
> 741 include/petscsnes.h
> 754 include/petscerror.h
> 845 include/petscts.h
> 858 include/petsc-private/petscimpl.h
> 1036 arch-gnu/include/petscconf.h
> 1504 include/petsc-private/matimpl.h
> 1930 include/petscmat.h
> 2399 include/petscsys.h
> 20713 total
>
>
>
More information about the petsc-dev
mailing list