usage of MatPreallocInitialize/MatPreallocFinalize
Hi All How does one use MatPreallocInitialize/MatPreallocFinalize? Any code examples? The documentation is a bit sketchy Regards Yaron
"Yaron Kretchmer" <[email protected]> writes:
Hi All How does one use MatPreallocInitialize/MatPreallocFinalize? Any code examples? The documentation is a bit sketchy
These are internal routines. You would use Mat<type>SetPreallocation(), like MatSeqAIJSetPreallocation(). Matt -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness
Actually they are not really internal routines; though their documentation is a bit short. You can see uses of them in src/dm/da/utils/fdda.c General statement. Etags, (see http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/codemana... and search for etags) are an enormously powerful tool to get around the PETSc source code. In this case you could simply use etags to search for MatPreallocInitialize() and immediately locate all of its uses. There is also a TAGS for VI, check VI's docs. Barry On Mon, 30 Jan 2006, Matthew Knepley wrote:
"Yaron Kretchmer" <[email protected]> writes:
Hi All How does one use MatPreallocInitialize/MatPreallocFinalize? Any code examples? The documentation is a bit sketchy
These are internal routines. You would use Mat<type>SetPreallocation(), like MatSeqAIJSetPreallocation().
Matt -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness
MatPreallocInitialize appears to be a typo [for MatPreallocateInitialize] Will fix this in petsc-dev. Satish On Mon, 30 Jan 2006, Barry Smith wrote:
Actually they are not really internal routines; though their documentation is a bit short. You can see uses of them in src/dm/da/utils/fdda.c
General statement. Etags, (see http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/codemana... and search for etags) are an enormously powerful tool to get around the PETSc source code. In this case you could simply use etags to search for MatPreallocInitialize() and immediately locate all of its uses. There is also a TAGS for VI, check VI's docs.
Barry
On Mon, 30 Jan 2006, Matthew Knepley wrote:
"Yaron Kretchmer" <[email protected]> writes:
Hi All How does one use MatPreallocInitialize/MatPreallocFinalize? Any code examples? The documentation is a bit sketchy
These are internal routines. You would use Mat<type>SetPreallocation(), like MatSeqAIJSetPreallocation().
Matt -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness
participants (4)
-
Barry Smith -
Matthew Knepley -
Satish Balay -
Yaron Kretchmer