[petsc-users] Petsc ObjectStateIncrease without proivate header
Pichler, Franz
franz.pichler at v2c2.at
Mon May 8 01:56:09 CDT 2023
Hello,
i am using petsc in a single cpu setup where I have preassembled crs matrices that I wrap via PetSC's
MatCreateSeqAIJWithArrays Functionality.
Now I manipulate the values of these matrices (wohtout changing the sparsity) without using petsc,
When I now want to solve again I have to call
PetscObjectStateIncrease((PetscObject)petsc_A);
So that oetsc actually solves again (otherwise thinking nothing hs changed ,
This means I have to include the private header
#include <petsc/private/petscimpl.h>
Which makes a seamingless implementation of petsc into a cmake process more complicate (This guy has to be stated explicitly in the cmake process at the moment)
I would like to resolve that by "going" around the private header,
My first intuition was to increase the state by hand
((PetscObject)petsc_A_aux[the_sys])->state++;
This is the definition of petscstateincrease in the header. This throws me an
error: invalid use of incomplete type 'struct _p_PetscObject'
compilation error.
Is there any elegeant way around this?
This is the first time I use the petsc mailing list so apologies for any beginners mistake I did in formatting or anything else.
Best regards
Franz Pichler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230508/bf107697/attachment-0001.html>
More information about the petsc-users
mailing list