[petsc-users] cached values

Barry Smith bsmith at mcs.anl.gov
Sun Apr 26 20:58:27 CDT 2015

  The word cache here is not directly related to computer hardware caches. It comes from the meaning "store away in hiding or for future use." We also use the term stash "store (something) safely and secretly in a specified place". It is used to mean store temporarily (out of sight or knowledge) until we build the final matrix/vector  data structure.  For example if one sets a value into a matrix on one process that actually belongs on a different process we "stash it away" until the MatAssemblyBegin/End() when we move the data to the correct process and put it into its final resting place". As Patrick notes sometimes you may even want to stash values that that will eventually be stored locally.


  The reason we use stash or cache with the "secret or hiding" status is that once the values are stashed the user doesn't have direct access to them at that time, it is only after the MatAssemblyBegin/End that you get that direct access again.

> On Apr 26, 2015, at 6:49 PM, Justin Chang <jychang48 at gmail.com> wrote:
> Hello everyone,
> Pardon me if this might be a PETSc 101 question, but what exactly is meant when routines like MatSetValues() "caches the values"? Specifically, what happens say, after I iterate through each element within the ComputeJacobian() routine, when I call MatAssemblyBegin/End(). If there's documentation or a paper somewhere that explains this that would be very helpful, because I can't seem to find anything in the PETSc manual describing this process in detail.
> Thanks,
> Justin

More information about the petsc-users mailing list