<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 12 Apr 2020 at 01:50, Mark Adams <<a href="mailto:mfadams@lbl.gov">mfadams@lbl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>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:</div><div><br></div>ierr = ((PetscObject)JacP,"coloring",(PetscObject)iscoloring);CHKERRQ(ierr);<div><br></div><div>But it says my ISColoring is not valid. Any suggestions?</div><div><br></div></div></blockquote><div><br></div><div>ISColoring is not a PetscObject, you cannot compose it. </div><div><br></div><div>struct _n_ISColoring {<br> PetscInt refct;<br> PetscInt n; /* number of colors */<br> IS *is; /* for each color indicates columns */<br> MPI_Comm comm;<br> ISColoringValue *colors; /* for each column indicates color */<br> PetscInt N; /* number of columns */<br> ISColoringType ctype;<br> PetscBool allocated;<br>};<br></div><div><br></div><div>I guess your best option for now is to store it in a PetscContainer object with a destroy callback, and then compose the container.</div><div><br></div><div><br></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Lisandro Dalcin<br>============<br>Research Scientist<br>Extreme Computing Research Center (ECRC)<br>King Abdullah University of Science and Technology (KAUST)<br><a href="http://ecrc.kaust.edu.sa/" target="_blank">http://ecrc.kaust.edu.sa/</a><br></div></div></div></div>