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.

  Barry

  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 <[email protected]> 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

Reply via email to