[petsc-users] PetscObjectCompose error

Lisandro Dalcin dalcinl at gmail.com
Sat Apr 11 19:23:01 CDT 2020


On Sun, 12 Apr 2020 at 01:50, Mark Adams <mfadams at lbl.gov> wrote:

> I am trying to compose a ISColoring to a Mat. THe code works, I know JacP
> and iscoloring are valid Mat and ISColoring. I have this:
>
> ierr =
> ((PetscObject)JacP,"coloring",(PetscObject)iscoloring);CHKERRQ(ierr);
>
> But it says my ISColoring is not valid. Any suggestions?
>
>
ISColoring is not a PetscObject, you cannot compose it.

struct _n_ISColoring {
  PetscInt        refct;
  PetscInt        n;                /* number of colors */
  IS              *is;              /* for each color indicates columns */
  MPI_Comm        comm;
  ISColoringValue *colors;          /* for each column indicates color */
  PetscInt        N;                /* number of columns */
  ISColoringType  ctype;
  PetscBool       allocated;
};

I guess your best option for now is to store it in a
PetscContainer object with a destroy callback, and then compose the
container.



-- 
Lisandro Dalcin
============
Research Scientist
Extreme Computing Research Center (ECRC)
King Abdullah University of Science and Technology (KAUST)
http://ecrc.kaust.edu.sa/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200412/630f3d01/attachment.html>


More information about the petsc-users mailing list