On Thu, Oct 14, 2010 at 21:36, Roy Stogner <[email protected]> wrote:
>
> I committed the first patch without changes; thank you very much!
>
> Would you mind if I futzed with the names on this one? E.g.
>
> # if PETSC_VERSION_LESS_THAN(2,2,1) // Cannot avoid a copy
> # define LibMeshISCreate(comm,n,idx,is)
> ISCreateGeneral((comm),(n),(idx),(is))
> # else
> # define LibMeshISCreate(comm,n,idx,is)
> ISCreateGeneralWithArray((comm),(n),(idx),(is))
> # endif
If you do that, you also have to wrap the ISCreateGeneral usage for
petsc-dev, the prototype is now
PetscErrorCode ISCreateGeneral(MPI_Comm comm,PetscInt n,const PetscInt
idx[],PetscCopyMode mode,IS *is)
> "Overloading" a C function with a macro of the same name is confusing
> to me;
Understood, though of course macros are never double-expanded.
> likewise for a PETSC_USE_POINTER name that turns out not to
> correspond to any symbol or macro in PETSc.
It was added to petsc-dev recently (to unify all the places where
these alternatives were separate functions).
typedef enum { PETSC_COPY_VALUES, PETSC_OWN_POINTER,
PETSC_USE_POINTER} PetscCopyMode;
My intent was to make the source look like what will be in the next
release of PETSc (because chances are that next time people look at
those calls, in a year or two, that they will be using 3.2 or later),
with the macro to make it work with older versions.
Jed
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel