Hi, Let's say I have a simple function where I assemble a global coefficient matrix by subsequent calls to another function that computes element coefficient matrix. I need some cell physical property like density that changes between grid cells, and which is stored as a Petsc Vec object. Now should I better call VecGetArray/VecRestoreArray only once in at the beginning/end of the function that assembles the global matrix or is it OK to call it each time in the function computing the element matrix? In other words, are there any overheads to better be avioded here?
Thanks for any hints, Dominik
