[petsc-dev] why does this inanity exist?

Barry Smith bsmith at mcs.anl.gov
Sat Apr 29 21:53:42 CDT 2017


  TS already had mechanisms to turn on or off adaptivity (presumably) so why would an individual type need to reproduce this functionality except to drive users insane?

/*@
  TSAlphaUseAdapt - Use time-step adaptivity with the Alpha method

  Logically Collective on TS

  Input Parameter:
+  ts - timestepping context
-  use - flag to use adaptivity

  Options Database:
.  -ts_alpha_adapt

  Level: intermediate

.seealso: TSAdapt, TSADAPTBASIC
@*/
PetscErrorCode TSAlphaUseAdapt(TS ts,PetscBool use)
{
  PetscErrorCode ierr;

  PetscFunctionBegin;
  PetscValidHeaderSpecific(ts,TS_CLASSID,1);
  PetscValidLogicalCollectiveBool(ts,use,2);
  ierr = PetscTryMethod(ts,"TSAlphaUseAdapt_C",(TS,PetscBool),(ts,use));CHKERRQ(ierr);
  PetscFunctionReturn(0);
}





More information about the petsc-dev mailing list