about accessing 'comm' and 'type_name' and others from PetscObject in new code
Lisandro Dalcin
dalcinl at gmail.com
Thu Aug 7 14:05:25 CDT 2008
I've noticed that recent commits are now accessing PetscObject
internals like this
obj->hdr.comm
obj->hdr.type_name
I would really prefer to not do that, and instead use the more verbose
((PetscObject)obj)->comm
((PetscObject)obj)->type_name
If this is really disgusting, perhaps we should define and use some
(private?) macros like below. By far, 'comm', 'type_name', and
'prefix' are the more commonly accessed members when implementeing
Vec, Mat, KSP, PC, etc.
PetscCOMM(obj)
PetscTYPE(obj)
PetscPREFIX(obj)
--
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
More information about the petsc-dev
mailing list