Home
last modified time | relevance | path

Searched refs:nalloc (Results 1 – 5 of 5) sorted by relevance

/petsc/src/ksp/ksp/impls/gmres/fgmres/
H A Dfgmres.c373 PetscInt nalloc; /* number to allocate */ in KSPFGMRESGetNewVectors() local
377 nalloc = fgmres->delta_allocate; /* number of vectors to allocate in KSPFGMRESGetNewVectors()
382 …if (it + VEC_OFFSET + nalloc >= fgmres->vecs_allocated) nalloc = fgmres->vecs_allocated - it - VEC… in KSPFGMRESGetNewVectors()
383 if (!nalloc) PetscFunctionReturn(PETSC_SUCCESS); in KSPFGMRESGetNewVectors()
385 fgmres->vv_allocated += nalloc; /* vv_allocated is the number of vectors allocated */ in KSPFGMRESGetNewVectors()
388 PetscCall(KSPCreateVecs(ksp, nalloc, &fgmres->user_work[nwork], 0, NULL)); in KSPFGMRESGetNewVectors()
389 for (k = 0; k < nalloc; k++) fgmres->vecs[it + VEC_OFFSET + k] = fgmres->user_work[nwork][k]; in KSPFGMRESGetNewVectors()
391 fgmres->mwork_alloc[nwork] = nalloc; in KSPFGMRESGetNewVectors()
394 PetscCall(KSPCreateVecs(ksp, nalloc, &fgmres->prevecs_user_work[nwork], 0, NULL)); in KSPFGMRESGetNewVectors()
395 for (k = 0; k < nalloc; k++) fgmres->prevecs[it + k] = fgmres->prevecs_user_work[nwork][k]; in KSPFGMRESGetNewVectors()
/petsc/src/ksp/ksp/impls/gmres/pipefgmres/
H A Dpipefgmres.c608 PetscInt nalloc; /* number to allocate */ in KSPPIPEFGMRESGetNewVectors() local
612 nalloc = pipefgmres->delta_allocate; /* number of vectors to allocate in KSPPIPEFGMRESGetNewVectors()
617 …if (it + VEC_OFFSET + nalloc >= pipefgmres->vecs_allocated) nalloc = pipefgmres->vecs_allocated - … in KSPPIPEFGMRESGetNewVectors()
618 if (!nalloc) PetscFunctionReturn(PETSC_SUCCESS); in KSPPIPEFGMRESGetNewVectors()
620 pipefgmres->vv_allocated += nalloc; /* vv_allocated is the number of vectors allocated */ in KSPPIPEFGMRESGetNewVectors()
623 PetscCall(KSPCreateVecs(ksp, nalloc, &pipefgmres->user_work[nwork], 0, NULL)); in KSPPIPEFGMRESGetNewVectors()
624 …for (k = 0; k < nalloc; k++) pipefgmres->vecs[it + VEC_OFFSET + k] = pipefgmres->user_work[nwork][… in KSPPIPEFGMRESGetNewVectors()
626 pipefgmres->mwork_alloc[nwork] = nalloc; in KSPPIPEFGMRESGetNewVectors()
629 PetscCall(KSPCreateVecs(ksp, nalloc, &pipefgmres->prevecs_user_work[nwork], 0, NULL)); in KSPPIPEFGMRESGetNewVectors()
630 …for (k = 0; k < nalloc; k++) pipefgmres->prevecs[it + k] = pipefgmres->prevecs_user_work[nwork][k]; in KSPPIPEFGMRESGetNewVectors()
[all …]
/petsc/src/ksp/ksp/impls/gmres/lgmres/
H A Dlgmres.c511 PetscInt nalloc; /* number to allocate */ in KSPLGMRESGetNewVectors() local
515 nalloc = lgmres->delta_allocate; /* number of vectors to allocate in a single chunk */ in KSPLGMRESGetNewVectors()
519 …if (it + VEC_OFFSET + nalloc >= lgmres->vecs_allocated) nalloc = lgmres->vecs_allocated - it - VEC… in KSPLGMRESGetNewVectors()
520 if (!nalloc) PetscFunctionReturn(PETSC_SUCCESS); in KSPLGMRESGetNewVectors()
522 lgmres->vv_allocated += nalloc; /* vv_allocated is the number of vectors allocated */ in KSPLGMRESGetNewVectors()
525 PetscCall(KSPCreateVecs(ksp, nalloc, &lgmres->user_work[nwork], 0, NULL)); in KSPLGMRESGetNewVectors()
527 lgmres->mwork_alloc[nwork] = nalloc; in KSPLGMRESGetNewVectors()
529 for (k = 0; k < nalloc; k++) lgmres->vecs[it + VEC_OFFSET + k] = lgmres->user_work[nwork][k]; in KSPLGMRESGetNewVectors()
/petsc/src/ksp/ksp/impls/gmres/
H A Dgmres.c404 PetscInt nwork = gmres->nwork_alloc, k, nalloc; in KSPGMRESGetNewVectors() local
407 nalloc = PetscMin(ksp->max_it, gmres->delta_allocate); in KSPGMRESGetNewVectors()
410 …if (it + VEC_OFFSET + nalloc >= gmres->vecs_allocated) nalloc = gmres->vecs_allocated - it - VEC_O… in KSPGMRESGetNewVectors()
411 if (!nalloc) PetscFunctionReturn(PETSC_SUCCESS); in KSPGMRESGetNewVectors()
413 gmres->vv_allocated += nalloc; in KSPGMRESGetNewVectors()
415 PetscCall(KSPCreateVecs(ksp, nalloc, &gmres->user_work[nwork], 0, NULL)); in KSPGMRESGetNewVectors()
417 gmres->mwork_alloc[nwork] = nalloc; in KSPGMRESGetNewVectors()
418 for (k = 0; k < nalloc; k++) gmres->vecs[it + VEC_OFFSET + k] = gmres->user_work[nwork][k]; in KSPGMRESGetNewVectors()
/petsc/src/ksp/ksp/impls/gmres/dgmres/
H A Ddgmres.c420 PetscInt nwork = dgmres->nwork_alloc, k, nalloc; in KSPDGMRESGetNewVectors() local
423 nalloc = PetscMin(ksp->max_it, dgmres->delta_allocate); in KSPDGMRESGetNewVectors()
426 …if (it + VEC_OFFSET + nalloc >= dgmres->vecs_allocated) nalloc = dgmres->vecs_allocated - it - VEC… in KSPDGMRESGetNewVectors()
427 if (!nalloc) PetscFunctionReturn(PETSC_SUCCESS); in KSPDGMRESGetNewVectors()
429 dgmres->vv_allocated += nalloc; in KSPDGMRESGetNewVectors()
431 PetscCall(KSPCreateVecs(ksp, nalloc, &dgmres->user_work[nwork], 0, NULL)); in KSPDGMRESGetNewVectors()
433 dgmres->mwork_alloc[nwork] = nalloc; in KSPDGMRESGetNewVectors()
434 for (k = 0; k < nalloc; k++) dgmres->vecs[it + VEC_OFFSET + k] = dgmres->user_work[nwork][k]; in KSPDGMRESGetNewVectors()