Lines Matching refs:next
45 PetscOptionsObject->next = NULL; in PetscOptionsBegin_Private()
90 (*amsopt)->next = NULL; in PetscOptionItemCreate_Private()
100 PetscOptionItem cur = PetscOptionsObject->next; in PetscOptionItemCreate_Private()
102 while (cur->next) cur = cur->next; in PetscOptionItemCreate_Private()
103 cur->next = *amsopt; in PetscOptionItemCreate_Private()
158 PetscOptionItem next = PetscOptionsObject->next; in PetscOptionsSAWsInput() local
179 while (next) { in PetscOptionsSAWsInput()
182 PetscCallSAWs(SAWs_Register, (dir, &next->man, 1, SAWs_READ, SAWs_STRING)); in PetscOptionsSAWsInput()
185 PetscCallSAWs(SAWs_Register, (dir, &next->text, 1, SAWs_READ, SAWs_STRING)); in PetscOptionsSAWsInput()
187 switch (next->type) { in PetscOptionsSAWsInput()
191 PetscCall(PetscSNPrintf(dir, 1024, "/PETSc/Options/%s", next->option)); in PetscOptionsSAWsInput()
192 PetscCallSAWs(SAWs_Register, (dir, next->data, next->arraylength, SAWs_WRITE, SAWs_INT)); in PetscOptionsSAWsInput()
195 PetscCall(PetscSNPrintf(dir, 1024, "/PETSc/Options/%s", next->option)); in PetscOptionsSAWsInput()
196 PetscCallSAWs(SAWs_Register, (dir, next->data, next->arraylength, SAWs_WRITE, SAWs_DOUBLE)); in PetscOptionsSAWsInput()
199 PetscCall(PetscSNPrintf(dir, 1024, "/PETSc/Options/%s", next->option)); in PetscOptionsSAWsInput()
200 PetscCallSAWs(SAWs_Register, (dir, next->data, 1, SAWs_WRITE, SAWs_INT)); in PetscOptionsSAWsInput()
203 PetscCall(PetscSNPrintf(dir, 1024, "/PETSc/Options/%s", next->option)); in PetscOptionsSAWsInput()
204 PetscCallSAWs(SAWs_Register, (dir, next->data, 1, SAWs_WRITE, SAWs_DOUBLE)); in PetscOptionsSAWsInput()
207 PetscCall(PetscSNPrintf(dir, 1024, "/PETSc/Options/%s", next->option)); in PetscOptionsSAWsInput()
208 PetscCallSAWs(SAWs_Register, (dir, next->data, 1, SAWs_WRITE, SAWs_BOOLEAN)); in PetscOptionsSAWsInput()
211 PetscCall(PetscSNPrintf(dir, 1024, "/PETSc/Options/%s", next->option)); in PetscOptionsSAWsInput()
212 PetscCallSAWs(SAWs_Register, (dir, next->data, next->arraylength, SAWs_WRITE, SAWs_BOOLEAN)); in PetscOptionsSAWsInput()
215 PetscCall(PetscSNPrintf(dir, 1024, "/PETSc/Options/%s", next->option)); in PetscOptionsSAWsInput()
216 PetscCallSAWs(SAWs_Register, (dir, &next->data, 1, SAWs_WRITE, SAWs_STRING)); in PetscOptionsSAWsInput()
219 PetscCall(PetscSNPrintf(dir, 1024, "/PETSc/Options/%s", next->option)); in PetscOptionsSAWsInput()
220 PetscCallSAWs(SAWs_Register, (dir, next->data, next->arraylength, SAWs_WRITE, SAWs_STRING)); in PetscOptionsSAWsInput()
224 PetscCall(PetscSNPrintf(dir, 1024, "/PETSc/Options/%s", next->option)); in PetscOptionsSAWsInput()
225 PetscCallSAWs(SAWs_Register, (dir, &next->data, 1, SAWs_WRITE, SAWs_STRING)); in PetscOptionsSAWsInput()
226 PetscCall(PetscFunctionListGet(next->flist, (const char ***)&next->edata, &ntext)); in PetscOptionsSAWsInput()
227 PetscCallSAWs(SAWs_Set_Legal_Variable_Values, (dir, ntext, next->edata)); in PetscOptionsSAWsInput()
230 PetscInt ntext = next->nlist; in PetscOptionsSAWsInput()
231 PetscCall(PetscSNPrintf(dir, 1024, "/PETSc/Options/%s", next->option)); in PetscOptionsSAWsInput()
232 PetscCallSAWs(SAWs_Register, (dir, &next->data, 1, SAWs_WRITE, SAWs_STRING)); in PetscOptionsSAWsInput()
233 PetscCall(PetscMalloc1(ntext + 1, (char ***)&next->edata)); in PetscOptionsSAWsInput()
234 PetscCall(PetscMemcpy(next->edata, next->list, ntext * sizeof(char *))); in PetscOptionsSAWsInput()
235 PetscCallSAWs(SAWs_Set_Legal_Variable_Values, (dir, ntext, next->edata)); in PetscOptionsSAWsInput()
240 next = next->next; in PetscOptionsSAWsInput()
251 next = PetscOptionsObject->next; in PetscOptionsSAWsInput()
252 while (next) { in PetscOptionsSAWsInput()
253 PetscCall(PetscSNPrintf(dir, 1024, "/PETSc/Options/%s", next->option)); in PetscOptionsSAWsInput()
254 PetscCallSAWs(SAWs_Selected, (dir, (int *)&next->set)); in PetscOptionsSAWsInput()
255 next = next->next; in PetscOptionsSAWsInput()
326 PetscOptionItem next = PetscOptionsObject->next; in PetscOptionsGetFromTextInput() local
334 while (next) { in PetscOptionsGetFromTextInput()
335 switch (next->type) { in PetscOptionsGetFromTextInput()
339 …ORLD, "-%s%s: <", PetscOptionsObject->prefix ? PetscOptionsObject->prefix : "", next->option + 1)); in PetscOptionsGetFromTextInput()
340 vald = (PetscInt *)next->data; in PetscOptionsGetFromTextInput()
341 for (PetscInt i = 0; i < next->arraylength; i++) { in PetscOptionsGetFromTextInput()
343 if (i < next->arraylength - 1) PetscCall(PetscPrintf(PETSC_COMM_WORLD, ",")); in PetscOptionsGetFromTextInput()
345 PetscCall(PetscPrintf(PETSC_COMM_WORLD, ">: %s (%s) ", next->text, next->man)); in PetscOptionsGetFromTextInput()
349 PetscInt n = 0, nmax = next->arraylength, *dvalue = (PetscInt *)next->data, start, end; in PetscOptionsGetFromTextInput()
354 next->set = PETSC_TRUE; in PetscOptionsGetFromTextInput()
399 …ORLD, "-%s%s: <", PetscOptionsObject->prefix ? PetscOptionsObject->prefix : "", next->option + 1)); in PetscOptionsGetFromTextInput()
400 valr = (PetscReal *)next->data; in PetscOptionsGetFromTextInput()
401 for (PetscInt i = 0; i < next->arraylength; i++) { in PetscOptionsGetFromTextInput()
403 if (i < next->arraylength - 1) PetscCall(PetscPrintf(PETSC_COMM_WORLD, ",")); in PetscOptionsGetFromTextInput()
405 PetscCall(PetscPrintf(PETSC_COMM_WORLD, ">: %s (%s) ", next->text, next->man)); in PetscOptionsGetFromTextInput()
409 PetscInt n = 0, nmax = next->arraylength; in PetscOptionsGetFromTextInput()
410 PetscReal *dvalue = (PetscReal *)next->data; in PetscOptionsGetFromTextInput()
413 next->set = PETSC_TRUE; in PetscOptionsGetFromTextInput()
428 …bject->prefix ? PetscOptionsObject->prefix : "", next->option + 1, *(int *)next->data, next->text,… in PetscOptionsGetFromTextInput()
434 … -%s%s %lld", PetscOptionsObject->prefix ? PetscOptionsObject->prefix : "", next->option + 1, lid); in PetscOptionsGetFromTextInput()
438 …: -%s%s %ld", PetscOptionsObject->prefix ? PetscOptionsObject->prefix : "", next->option + 1, lid); in PetscOptionsGetFromTextInput()
441 next->set = PETSC_TRUE; in PetscOptionsGetFromTextInput()
442 *((PetscInt *)next->data) = (PetscInt)lid; in PetscOptionsGetFromTextInput()
446 …ject->prefix ? PetscOptionsObject->prefix : "", next->option + 1, *(double *)next->data, next->tex… in PetscOptionsGetFromTextInput()
462 next->set = PETSC_TRUE; in PetscOptionsGetFromTextInput()
463 *((PetscReal *)next->data) = ir; in PetscOptionsGetFromTextInput()
467 …x ? PetscOptionsObject->prefix : "", next->option + 1, *(PetscBool *)next->data ? "true" : "false"… in PetscOptionsGetFromTextInput()
471 next->set = PETSC_TRUE; in PetscOptionsGetFromTextInput()
472 *((PetscBool *)next->data) = bid; in PetscOptionsGetFromTextInput()
476 …bject->prefix ? PetscOptionsObject->prefix : "", next->option + 1, (char *)next->data, next->text,… in PetscOptionsGetFromTextInput()
479 next->set = PETSC_TRUE; in PetscOptionsGetFromTextInput()
481 PetscCall(PetscStrdup(str, (char **)&next->data)); in PetscOptionsGetFromTextInput()
485 …tdout, PetscOptionsObject->prefix, next->option, next->text, next->man, next->flist, (char *)next-… in PetscOptionsGetFromTextInput()
489 next->set = PETSC_TRUE; in PetscOptionsGetFromTextInput()
491 PetscCall(PetscStrdup(str, (char **)&next->data)); in PetscOptionsGetFromTextInput()
497 next = next->next; in PetscOptionsGetFromTextInput()
505 PetscOptionItem next, last; in PetscOptionsEnd_Private() local
508 if (PetscOptionsObject->next) { in PetscOptionsEnd_Private()
527 while ((next = PetscOptionsObject->next)) { in PetscOptionsEnd_Private()
528 const PetscOptionType type = next->type; in PetscOptionsEnd_Private()
529 const size_t arraylength = next->arraylength; in PetscOptionsEnd_Private()
530 void *data = next->data; in PetscOptionsEnd_Private()
532 if (next->set) { in PetscOptionsEnd_Private()
538 PetscCall(PetscStrlcat(option, next->option + 1, sizeof(option))); in PetscOptionsEnd_Private()
540 PetscCall(PetscStrncpy(option, next->option, sizeof(option))); in PetscOptionsEnd_Private()
603 if (type == OPTION_ELIST) PetscCall(PetscStrNArrayDestroy(next->nlist, (char ***)&next->list)); in PetscOptionsEnd_Private()
604 PetscCall(PetscFree(next->text)); in PetscOptionsEnd_Private()
605 PetscCall(PetscFree(next->option)); in PetscOptionsEnd_Private()
606 PetscCall(PetscFree(next->man)); in PetscOptionsEnd_Private()
607 PetscCall(PetscFree(next->edata)); in PetscOptionsEnd_Private()
613 PetscCall(PetscFree(next->data)); in PetscOptionsEnd_Private()
616 last = next; in PetscOptionsEnd_Private()
617 PetscOptionsObject->next = next->next; in PetscOptionsEnd_Private()
621 PetscOptionsObject->next = NULL; in PetscOptionsEnd_Private()