Searched refs:S_prealloc_arr (Results 1 – 1 of 1) sorted by relevance
313 PetscInt *S_prealloc_arr; in SNESTSFormFunction_DiscGrad() local314 PetscCall(PetscMalloc1(n, &S_prealloc_arr)); in SNESTSFormFunction_DiscGrad()315 for (PetscInt i = 0; i < n; ++i) S_prealloc_arr[i] = 2; in SNESTSFormFunction_DiscGrad()316 PetscCall(MatXAIJSetPreallocation(S, 1, S_prealloc_arr, NULL, NULL, NULL)); in SNESTSFormFunction_DiscGrad()319 PetscCall(PetscFree(S_prealloc_arr)); in SNESTSFormFunction_DiscGrad()