Step adaptation.
More...
#include <petsc/private/tsimpl.h>
Go to the source code of this file.
|
static PetscErrorCode | TSAdaptChoose_EP (TSAdapt adapt, TS ts, PetscReal h, PetscInt *next_sc, PetscReal *next_h, PetscBool *accept, PetscReal *wlte, PetscReal *wltea, PetscReal *wlter) |
|
static PetscErrorCode | TSAdaptReset_EP (TSAdapt adapt) |
|
static PetscErrorCode | TSAdaptDestroy_EP (TSAdapt adapt) |
|
PetscErrorCode | TSAdaptCreate_EP (TSAdapt adapt) |
|
Step adaptation.
Problem implementation for mix element for large-strain elasticity
- Todo:
- Implementation of plasticity
Definition in file TSEPAdapt.hpp.
◆ TSADAPTEP
◆ TSAdaptChoose_EP()
static PetscErrorCode TSAdaptChoose_EP |
( |
TSAdapt |
adapt, |
|
|
TS |
ts, |
|
|
PetscReal |
h, |
|
|
PetscInt * |
next_sc, |
|
|
PetscReal * |
next_h, |
|
|
PetscBool * |
accept, |
|
|
PetscReal * |
wlte, |
|
|
PetscReal * |
wltea, |
|
|
PetscReal * |
wlter |
|
) |
| |
|
static |
Definition at line 19 of file TSEPAdapt.hpp.
36 ierr = TSGetSNES(ts, &snes);
39 SNESConvergedReason reason;
40 ierr = SNESGetConvergedReason(snes, &reason);
44 ierr = SNESGetIterationNumber(snes, &it);
52 "\tDiverged set step length: it = %d, h = %3.4g set h = %3.4g \n", it,
54 }
else if (reason > 0) {
62 *next_h = PetscClipInterval(
h, adapt->dt_min, adapt->dt_max);
65 "\tConverged set step length: it = %d, h = %3.4g set h = %3.4g \n", it,
69 PetscFunctionReturn(0);
◆ TSAdaptCreate_EP()
PetscErrorCode TSAdaptCreate_EP |
( |
TSAdapt |
adapt | ) |
|
- Examples
- ep.cpp.
Definition at line 87 of file TSEPAdapt.hpp.
90 ierr = PetscNewLog(adapt, &ep);
92 adapt->data = (
void *)ep;
96 PetscFunctionReturn(0);
◆ TSAdaptDestroy_EP()
static PetscErrorCode TSAdaptDestroy_EP |
( |
TSAdapt |
adapt | ) |
|
|
static |
Definition at line 78 of file TSEPAdapt.hpp.
82 ierr = PetscFree(adapt->data);
84 PetscFunctionReturn(0);
◆ TSAdaptReset_EP()
static PetscErrorCode TSAdaptReset_EP |
( |
TSAdapt |
adapt | ) |
|
|
static |
static PetscErrorCode TSAdaptChoose_EP(TSAdapt adapt, TS ts, PetscReal h, PetscInt *next_sc, PetscReal *next_h, PetscBool *accept, PetscReal *wlte, PetscReal *wltea, PetscReal *wlter)