petsc-3.3-p7 2013-05-11


iterates through a hypercube lc, uc, idx all have to be valid arrays of size dim This function return PETSC_FALSE, if idx exceeds uc, PETSC_TRUE otherwise. There are no guarantees on what happens if idx is not in the hypercube spanned by lc, uc, this should be checked with ADDAHCiterStartup.


#include "petscdmadda.h" 
PetscBool  ADDAHCiter(const PetscInt dim, const PetscInt *const lc, const PetscInt *const uc, PetscInt *const idx)

Use this code as follows

if( ADDAHCiterStartup(dim, lc, uc, idx) ) { do { ... } while( ADDAHCiter(dim, lc, uc, idx) ); }

Input Parameters

dim - the number of dimension
lc - the "lower" corner
uc - the "upper" corner

Output Parameters

idx -the index that this function increases

Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages