petsc-3.4.5 2014-06-29
ADDAHCiter
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.
Synopsis
#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
Level:developer
Location:src/dm/impls/adda/adda.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages