[petsc-users] questions about DMDAGetNeighbors()
Roc Wang
pengxwang at hotmail.com
Tue Aug 13 10:31:21 CDT 2013
Hi,
I am confused about calling
PetscErrorCode DMDAGetNeighbors(DM da,const PetscMPIInt *ranks[]),
I am calling the function like this:
PetscMPIInt ** neighbors;
DMDAGetNeighbors(da, neighbors);
but the error shows
src/solver.cpp:152: error: invalid conversion from ‘PetscMPIInt**’ to ‘const PetscMPIInt**’
src/solver.cpp:152: error: initializing argument 2 of ‘PetscErrorCode DMDAGetNeighbors(_p_DM*, const PetscMPIInt**)’
How should I define the neighbors before calling the function? Sorry it's not a pure Petsc question, but I am new in c++. Thanks for any comments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130813/86c239a8/attachment.html>
More information about the petsc-users
mailing list