[petsc-dev] PetscCheckSameType

Lisandro Dalcin dalcinl at gmail.com
Fri Apr 24 10:12:37 CDT 2015


On 24 April 2015 at 16:37, Jose E. Roman <jroman at dsic.upv.es> wrote:
>
> Shouldn't PetscCheckSameType compare type_name instead of type?
>
> #define PetscCheckSameType(a,arga,b,argb) \
>   if (((PetscObject)a)->type != ((PetscObject)b)->type) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_NOTSAMETYPE,"Objects not of same type: Argument # %d and %d",arga,argb);
>

If you ever change it to do the right thing, please review all the
places where this macro is used. I've seen instances of it that seemed
too much restrictive about requiring same types.


-- 
Lisandro Dalcin
============
Research Scientist
Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
Numerical Porous Media Center (NumPor)
King Abdullah University of Science and Technology (KAUST)
http://numpor.kaust.edu.sa/

4700 King Abdullah University of Science and Technology
al-Khawarizmi Bldg (Bldg 1), Office # 4332
Thuwal 23955-6900, Kingdom of Saudi Arabia
http://www.kaust.edu.sa

Office Phone: +966 12 808-0459



More information about the petsc-dev mailing list