Lines Matching refs:adapt

118 PetscErrorCode TSGLLEAdaptSetType(TSGLLEAdapt adapt, TSGLLEAdaptType type)  in TSGLLEAdaptSetType()  argument
125 if (((PetscObject)adapt)->type_name) PetscUseTypeMethod(adapt, destroy); in TSGLLEAdaptSetType()
126 PetscCall((*r)(adapt)); in TSGLLEAdaptSetType()
127 PetscCall(PetscObjectChangeTypeName((PetscObject)adapt, type)); in TSGLLEAdaptSetType()
131 PetscErrorCode TSGLLEAdaptSetOptionsPrefix(TSGLLEAdapt adapt, const char prefix[]) in TSGLLEAdaptSetOptionsPrefix() argument
134 PetscCall(PetscObjectSetOptionsPrefix((PetscObject)adapt, prefix)); in TSGLLEAdaptSetOptionsPrefix()
138 PetscErrorCode TSGLLEAdaptView(TSGLLEAdapt adapt, PetscViewer viewer) in TSGLLEAdaptView() argument
145 PetscCall(PetscObjectPrintClassNamePrefixType((PetscObject)adapt, viewer)); in TSGLLEAdaptView()
146 if (adapt->ops->view) { in TSGLLEAdaptView()
148 PetscUseTypeMethod(adapt, view, viewer); in TSGLLEAdaptView()
155 PetscErrorCode TSGLLEAdaptDestroy(TSGLLEAdapt *adapt) in TSGLLEAdaptDestroy() argument
158 if (!*adapt) PetscFunctionReturn(PETSC_SUCCESS); in TSGLLEAdaptDestroy()
159 PetscValidHeaderSpecific(*adapt, TSGLLEADAPT_CLASSID, 1); in TSGLLEAdaptDestroy()
160 if (--((PetscObject)*adapt)->refct > 0) { in TSGLLEAdaptDestroy()
161 *adapt = NULL; in TSGLLEAdaptDestroy()
164 PetscTryTypeMethod(*adapt, destroy); in TSGLLEAdaptDestroy()
165 PetscCall(PetscHeaderDestroy(adapt)); in TSGLLEAdaptDestroy()
169 PetscErrorCode TSGLLEAdaptSetFromOptions(TSGLLEAdapt adapt, PetscOptionItems PetscOptionsObject) in TSGLLEAdaptSetFromOptions() argument
178 …y", "TSGLLEAdaptSetType", TSGLLEAdaptList, ((PetscObject)adapt)->type_name ? ((PetscObject)adapt)-… in TSGLLEAdaptSetFromOptions()
179 if (flg || !((PetscObject)adapt)->type_name) PetscCall(TSGLLEAdaptSetType(adapt, type)); in TSGLLEAdaptSetFromOptions()
180 PetscTryTypeMethod(adapt, setfromoptions, PetscOptionsObject); in TSGLLEAdaptSetFromOptions()
185 PetscErrorCode TSGLLEAdaptChoose(TSGLLEAdapt adapt, PetscInt n, const PetscInt orders[], const Pets… in TSGLLEAdaptChoose() argument
188 PetscValidHeaderSpecific(adapt, TSGLLEADAPT_CLASSID, 1); in TSGLLEAdaptChoose()
195 …PetscUseTypeMethod(adapt, choose, n, orders, errors, cost, cur, h, tleft, next_sc, next_h, finish); in TSGLLEAdaptChoose()
201 TSGLLEAdapt adapt; in TSGLLEAdaptCreate() local
205 …PetscCall(PetscHeaderCreate(adapt, TSGLLEADAPT_CLASSID, "TSGLLEAdapt", "General Linear adaptivity"… in TSGLLEAdaptCreate()
206 *inadapt = adapt; in TSGLLEAdaptCreate()
214 static PetscErrorCode TSGLLEAdaptDestroy_JustFree(TSGLLEAdapt adapt) in TSGLLEAdaptDestroy_JustFree() argument
217 PetscCall(PetscFree(adapt->data)); in TSGLLEAdaptDestroy_JustFree()
226 static PetscErrorCode TSGLLEAdaptChoose_None(TSGLLEAdapt adapt, PetscInt n, const PetscInt orders[]… in TSGLLEAdaptChoose_None() argument
238 PetscErrorCode TSGLLEAdaptCreate_None(TSGLLEAdapt adapt) in TSGLLEAdaptCreate_None() argument
244 adapt->data = (void *)a; in TSGLLEAdaptCreate_None()
245 adapt->ops->choose = TSGLLEAdaptChoose_None; in TSGLLEAdaptCreate_None()
246 adapt->ops->destroy = TSGLLEAdaptDestroy_JustFree; in TSGLLEAdaptCreate_None()
254 static PetscErrorCode TSGLLEAdaptChoose_Size(TSGLLEAdapt adapt, PetscInt n, const PetscInt orders[]… in TSGLLEAdaptChoose_Size() argument
256 TSGLLEAdapt_Size *sz = (TSGLLEAdapt_Size *)adapt->data; in TSGLLEAdaptChoose_Size()
278 PetscErrorCode TSGLLEAdaptCreate_Size(TSGLLEAdapt adapt) in TSGLLEAdaptCreate_Size() argument
284 adapt->data = (void *)a; in TSGLLEAdaptCreate_Size()
285 adapt->ops->choose = TSGLLEAdaptChoose_Size; in TSGLLEAdaptCreate_Size()
286 adapt->ops->destroy = TSGLLEAdaptDestroy_JustFree; in TSGLLEAdaptCreate_Size()
295 static PetscErrorCode TSGLLEAdaptChoose_Both(TSGLLEAdapt adapt, PetscInt n, const PetscInt orders[]… in TSGLLEAdaptChoose_Both() argument
297 TSGLLEAdapt_Both *both = (TSGLLEAdapt_Both *)adapt->data; in TSGLLEAdaptChoose_Both()
339 PetscErrorCode TSGLLEAdaptCreate_Both(TSGLLEAdapt adapt) in TSGLLEAdaptCreate_Both() argument
345 adapt->data = (void *)a; in TSGLLEAdaptCreate_Both()
346 adapt->ops->choose = TSGLLEAdaptChoose_Both; in TSGLLEAdaptCreate_Both()
347 adapt->ops->destroy = TSGLLEAdaptDestroy_JustFree; in TSGLLEAdaptCreate_Both()