Lines Matching refs:matfd

170 PetscErrorCode MatFDColoringSetParameters(MatFDColoring matfd, PetscReal error, PetscReal umin)  in MatFDColoringSetParameters()  argument
173 PetscValidHeaderSpecific(matfd, MAT_FDCOLORING_CLASSID, 1); in MatFDColoringSetParameters()
174 PetscValidLogicalCollectiveReal(matfd, error, 2); in MatFDColoringSetParameters()
175 PetscValidLogicalCollectiveReal(matfd, umin, 3); in MatFDColoringSetParameters()
176 if (error != (PetscReal)PETSC_DEFAULT) matfd->error_rel = error; in MatFDColoringSetParameters()
177 if (umin != (PetscReal)PETSC_DEFAULT) matfd->umin = umin; in MatFDColoringSetParameters()
195 PetscErrorCode MatFDColoringSetBlockSize(MatFDColoring matfd, PetscInt brows, PetscInt bcols) in MatFDColoringSetBlockSize() argument
198 PetscValidHeaderSpecific(matfd, MAT_FDCOLORING_CLASSID, 1); in MatFDColoringSetBlockSize()
199 PetscValidLogicalCollectiveInt(matfd, brows, 2); in MatFDColoringSetBlockSize()
200 PetscValidLogicalCollectiveInt(matfd, bcols, 3); in MatFDColoringSetBlockSize()
201 if (brows != PETSC_DEFAULT) matfd->brows = brows; in MatFDColoringSetBlockSize()
202 if (bcols != PETSC_DEFAULT) matfd->bcols = bcols; in MatFDColoringSetBlockSize()
258 PetscErrorCode MatFDColoringGetFunction(MatFDColoring matfd, MatFDColoringFn **f, void **fctx) in MatFDColoringGetFunction() argument
261 PetscValidHeaderSpecific(matfd, MAT_FDCOLORING_CLASSID, 1); in MatFDColoringGetFunction()
262 if (f) *f = matfd->f; in MatFDColoringGetFunction()
263 if (fctx) *fctx = matfd->fctx; in MatFDColoringGetFunction()
290 PetscErrorCode MatFDColoringSetFunction(MatFDColoring matfd, MatFDColoringFn *f, void *fctx) in MatFDColoringSetFunction() argument
293 PetscValidHeaderSpecific(matfd, MAT_FDCOLORING_CLASSID, 1); in MatFDColoringSetFunction()
294 matfd->f = f; in MatFDColoringSetFunction()
295 matfd->fctx = fctx; in MatFDColoringSetFunction()
328 PetscErrorCode MatFDColoringSetFromOptions(MatFDColoring matfd) in MatFDColoringSetFromOptions() argument
334 PetscValidHeaderSpecific(matfd, MAT_FDCOLORING_CLASSID, 1); in MatFDColoringSetFromOptions()
336 PetscObjectOptionsBegin((PetscObject)matfd); in MatFDColoringSetFromOptions()
337 …t of relative error in function", "MatFDColoringSetParameters", matfd->error_rel, &matfd->error_re… in MatFDColoringSetFromOptions()
338 …n", "Minimum allowable u magnitude", "MatFDColoringSetParameters", matfd->umin, &matfd->umin, NULL… in MatFDColoringSetFromOptions()
339 …-mat_fd_type", "Algorithm to compute h, wp or ds", "MatFDColoringCreate", matfd->htype, value, siz… in MatFDColoringSetFromOptions()
341 if (value[0] == 'w' && value[1] == 'p') matfd->htype = "wp"; in MatFDColoringSetFromOptions()
342 else if (value[0] == 'd' && value[1] == 's') matfd->htype = "ds"; in MatFDColoringSetFromOptions()
345 …ring_brows", "Number of block rows", "MatFDColoringSetBlockSize", matfd->brows, &matfd->brows, NUL… in MatFDColoringSetFromOptions()
346 …g_bcols", "Number of block columns", "MatFDColoringSetBlockSize", matfd->bcols, &matfd->bcols, &fl… in MatFDColoringSetFromOptions()
347 if (flg && matfd->bcols > matfd->ncolors) { in MatFDColoringSetFromOptions()
349 matfd->bcols = matfd->ncolors; in MatFDColoringSetFromOptions()
353 PetscCall(PetscObjectProcessOptionsHandlers((PetscObject)matfd, PetscOptionsObject)); in MatFDColoringSetFromOptions()
379 PetscErrorCode MatFDColoringSetType(MatFDColoring matfd, MatMFFDType type) in MatFDColoringSetType() argument
382 PetscValidHeaderSpecific(matfd, MAT_FDCOLORING_CLASSID, 1); in MatFDColoringSetType()
387 if (type[0] == 'w' && type[1] == 'p') matfd->htype = "wp"; in MatFDColoringSetType()
388 else if (type[0] == 'd' && type[1] == 's') matfd->htype = "ds"; in MatFDColoringSetType()
390 PetscCall(PetscObjectChangeTypeName((PetscObject)matfd, type)); in MatFDColoringSetType()