Lines Matching refs:coarser
87 PetscErrorCode MatCoarsenApply(MatCoarsen coarser) in MatCoarsenApply() argument
90 PetscValidHeaderSpecific(coarser, MAT_COARSEN_CLASSID, 1); in MatCoarsenApply()
91 PetscAssertPointer(coarser, 1); in MatCoarsenApply()
92 …PetscCheck(coarser->graph->assembled, PetscObjectComm((PetscObject)coarser), PETSC_ERR_ARG_WRONGST… in MatCoarsenApply()
93 …PetscCheck(!coarser->graph->factortype, PetscObjectComm((PetscObject)coarser), PETSC_ERR_ARG_WRONG… in MatCoarsenApply()
94 PetscCall(PetscLogEventBegin(MAT_Coarsen, coarser, 0, 0, 0)); in MatCoarsenApply()
95 PetscUseTypeMethod(coarser, apply); in MatCoarsenApply()
96 PetscCall(PetscLogEventEnd(MAT_Coarsen, coarser, 0, 0, 0)); in MatCoarsenApply()
264 PetscErrorCode MatCoarsenSetType(MatCoarsen coarser, MatCoarsenType type) in MatCoarsenSetType() argument
270 PetscValidHeaderSpecific(coarser, MAT_COARSEN_CLASSID, 1); in MatCoarsenSetType()
273 PetscCall(PetscObjectTypeCompare((PetscObject)coarser, type, &match)); in MatCoarsenSetType()
276 PetscTryTypeMethod(coarser, destroy); in MatCoarsenSetType()
277 coarser->ops->destroy = NULL; in MatCoarsenSetType()
278 PetscCall(PetscMemzero(coarser->ops, sizeof(struct _MatCoarsenOps))); in MatCoarsenSetType()
281 …PetscCheck(r, PetscObjectComm((PetscObject)coarser), PETSC_ERR_ARG_UNKNOWN_TYPE, "Unknown coarsen … in MatCoarsenSetType()
282 PetscCall((*r)(coarser)); in MatCoarsenSetType()
284 PetscCall(PetscFree(((PetscObject)coarser)->type_name)); in MatCoarsenSetType()
285 PetscCall(PetscStrallocpy(type, &((PetscObject)coarser)->type_name)); in MatCoarsenSetType()
305 PetscErrorCode MatCoarsenSetGreedyOrdering(MatCoarsen coarser, const IS perm) in MatCoarsenSetGreedyOrdering() argument
308 PetscValidHeaderSpecific(coarser, MAT_COARSEN_CLASSID, 1); in MatCoarsenSetGreedyOrdering()
309 coarser->perm = perm; in MatCoarsenSetGreedyOrdering()
331 PetscErrorCode MatCoarsenGetData(MatCoarsen coarser, PetscCoarsenData **llist) in MatCoarsenGetData() argument
334 PetscValidHeaderSpecific(coarser, MAT_COARSEN_CLASSID, 1); in MatCoarsenGetData()
335 …PetscCheck(coarser->agg_lists, PetscObjectComm((PetscObject)coarser), PETSC_ERR_ARG_WRONGSTATE, "N… in MatCoarsenGetData()
336 *llist = coarser->agg_lists; in MatCoarsenGetData()
337 coarser->agg_lists = NULL; /* giving up ownership */ in MatCoarsenGetData()
363 PetscErrorCode MatCoarsenSetFromOptions(MatCoarsen coarser) in MatCoarsenSetFromOptions() argument
370 PetscObjectOptionsBegin((PetscObject)coarser); in MatCoarsenSetFromOptions()
371 if (!((PetscObject)coarser)->type_name) { in MatCoarsenSetFromOptions()
374 def = ((PetscObject)coarser)->type_name; in MatCoarsenSetFromOptions()
377 if (flag) PetscCall(MatCoarsenSetType(coarser, type)); in MatCoarsenSetFromOptions()
379 …ber of iterations (for HEM)", "MatCoarsenSetMaximumIterations", coarser->max_it, &coarser->max_it,… in MatCoarsenSetFromOptions()
380 …en_threshold", "Threshold (for HEM)", "MatCoarsenSetThreshold", coarser->max_it, &coarser->max_it,… in MatCoarsenSetFromOptions()
381 coarser->strength_index_size = MAT_COARSEN_STRENGTH_INDEX_SIZE; in MatCoarsenSetFromOptions()
382 …re (default is all indices)", "MatCoarsenSetStrengthIndex", coarser->strength_index, &coarser->str… in MatCoarsenSetFromOptions()
386 if (!((PetscObject)coarser)->type_name) PetscCall(MatCoarsenSetType(coarser, def)); in MatCoarsenSetFromOptions()
388 PetscTryTypeMethod(coarser, setfromoptions, PetscOptionsObject); in MatCoarsenSetFromOptions()