Mark Lohry <[email protected]> writes:

> The TSAdaptSetType is being called. Looking at TSStep_Theta, is it 
> possible that here:
>
> /* Register only the current method as a candidate because we're not 
> supporting multiple candidates yet. */
>      ierr = TSGetAdapt(ts,&adapt);CHKERRQ(ierr);
>      ierr = TSAdaptCandidatesClear(adapt);CHKERRQ(ierr);
>      ierr = 
> TSAdaptCandidateAdd(adapt,NULL,th->order,1,th->ccfl,1.0,PETSC_TRUE);CHKERRQ(ierr);
>      ierr = 
> TSAdaptChoose(adapt,ts,ts->time_step,&next_scheme,&next_time_step,&accept);CHKERRQ(ierr);
>
> TSAdaptCandidatesClear is unsetting whatever method I'm setting?

No.  It does not affect the implementation, it just clears the candidate
list that the implementation may choose from.

PetscErrorCode TSAdaptCandidatesClear(TSAdapt adapt)
{
  PetscErrorCode ierr;

  PetscFunctionBegin;
  PetscValidHeaderSpecific(adapt,TSADAPT_CLASSID,1);
  ierr = 
PetscMemzero(&adapt->candidates,sizeof(adapt->candidates));CHKERRQ(ierr);
  PetscFunctionReturn(0);
}


When you set -ts_adapt_type none, the function below should be called.
Verify that in a debugger.  Also, always run with -ts_adapt_monitor when
trying to debug something like this.

static PetscErrorCode TSAdaptChoose_None(TSAdapt adapt,TS ts,PetscReal 
h,PetscInt *next_sc,PetscReal *next_h,PetscBool *accept,PetscReal *wlte)
{

  PetscFunctionBegin;
  *accept  = PETSC_TRUE;
  *next_sc = 0;                 /* Reuse the same order scheme */
  *next_h  = h;                 /* Reuse the old step */
  *wlte    = -1;                /* Weighted local truncation error was not 
evaluated */
  PetscFunctionReturn(0);
}

Attachment: signature.asc
Description: PGP signature

Reply via email to