[petsc-users] MatSetValues vs MatSetValuesBlocked
Jed Brown
jed at jedbrown.org
Mon Aug 10 17:35:09 CDT 2020
Nidish <nb25 at rice.edu> writes:
> Ah I get it now, MatSetBlocked has to be set node-wise. I tried this and
> it works, thank you.
>
> The other question I had was why are the arguments for MatSetValues()
> and MatSetValuesBlocked() set to const PetscInt* and const PetscScalar*
> instead of just PetscInt* and PetscScalar* ? I have the typecast there
> so my flycheck doesn't keep throwing me warnings on emacs ;)
Your flycheck must be misconfigured. I use flycheck with clangd, but it doesn't have a problem with that (this more specific type qualifier can always be added without a cast).
To pick a more mundane example, nobody casts the second argument.
void *memcpy(void *dest, const void *src, size_t n);
More information about the petsc-users
mailing list