ug4
Timestep Utility

Functions

function __util_LimexLuaCallbackPost (step, t, currdt)
 
function attachObservers (attachFct, element, donttraverse)
 
function util CreateTimeDisc (domainDisc, timeScheme, orderOrTheta)
 
function util PrintUsageOfSolveTimeProblem ()
 
function util SolveLinearTimeProblem (u, domainDisc, linSolver, out, filename, timeScheme, orderOrTheta, startTime, endTime, maxStepSize, minStepSize, reductionFactor, useCheckpointing, postProcess, startTSNo, endTSNo)
 
function util SolveNonlinearProblemAdaptiveLimex (u, domainDisc, newtonSolver, out, filename, startTime, endTime, dt, minStepSize, maxStepSize, limexDesc, bFinishTimeStep, postProcess, startTSNo, endTSNo)
 
function util SolveNonlinearProblemAdaptiveTimestep (u, domainDisc, newtonSolver, out, filename, startTime, endTime, dt, minStepSize, maxStepSize, adaptiveStepInfo, bFinishTimeStep, postProcess, startTSNo, endTSNo)
 
function util SolveNonlinearTimeProblem (u, domainDisc, newtonSolver, out, filename, timeScheme, orderOrTheta, startTime, endTime, maxStepSize, minStepSize, reductionFactor, bFinishTimeStep, useCheckpointing, postProcess, startTSNo, endTSNo, newtonLineSearchFallbacks, additionalFinishedConditions)
 

Variables

parameterBool restartWithCheckpoint
 

Detailed Description

Function Documentation

◆ __util_LimexLuaCallbackPost()

function __util_LimexLuaCallbackPost ( step  ,
,
currdt   
)

/** location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / time_step_util.lua :1625-1682

◆ attachObservers()

function attachObservers ( attachFct  ,
element  ,
donttraverse   
)

Parses a callback object and attachs the corresponding callbacks to a TimeIntegratorObserver object.

Parameters
timeIntegratorSubjecta TimeIntegratorObserver object to attach callbacks to @luaobject the object by the user, to be parsed. a) If this is a function then it is called after solving the non-linear problem in EVERY STAGE of the time-stepping scheme; b) if this is a table, it can contain 4 optional functions: prepareTimeStep to call before the time step, preProcess to call before the non-linear solver in EVERY STAGE, postProcess as in a), finalizeTimeStep to call after the time step, rewindTimeStep to call if some of the computations of the time step failed, Arguments of the functions are: (u, step, time, dt) u, time: old before the solver, new after it c) This can also be a list of C++ objects which inherit ITimeIntegratorObserver or Lua Callbacks created by util.LuaCallbackHelper:create()

/** location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / time_step_util.lua :57-104

◆ CreateTimeDisc()

function util CreateTimeDisc ( domainDisc  ,
timeScheme  ,
orderOrTheta   
)
Parameters
domainDisc
timeSchemetheta, impleuler, expleuer, crank-nicolson, alexander, fracstep, or bdf
orderOrThetatheat is timeScheme=theta

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / time_step_util.lua :110-150

◆ PrintUsageOfSolveTimeProblem()

function util PrintUsageOfSolveTimeProblem ( )

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / time_step_util.lua :153-185

◆ SolveLinearTimeProblem()

function util SolveLinearTimeProblem ( ,
domainDisc  ,
linSolver  ,
out  ,
filename  ,
timeScheme  ,
orderOrTheta  ,
startTime  ,
endTime  ,
maxStepSize  ,
minStepSize  ,
reductionFactor  ,
useCheckpointing  ,
postProcess  ,
startTSNo  ,
endTSNo   
)
Parameters
u[in] GridFunction with Startvalues, [out] Solution"
domainDiscDomain Discretization
solverLinear or Nonlinear Solver
outa VTKOutput (pass nil for no output)
filenamefilename for output
timeSchemeName of time step scheme: Theta, ImplEuler, ExplEuler, Crank-Nicolson Alexander, FracStep, BDF
orderOrThetatheta param if 'Theta', order if 'BDF'
startTimestart time point
endTimeend time point")
maxStepSizemaximal step sized used
minStepSize(optinal) minimal step sized used
reductionFactor(optinal) factor by which the step size is reduced, if the problem was not solved. Iterated until minStepSize is reached.
useCheckpointing(optional) if true, use checkpointing.
postProcess(optional) if passed, this can be either a function or a table: a) If this is a function then it is called after solving the linear problem in every time step of the time-stepping scheme; b) if this is a table, it can contain 2 optional functions: preProcess to call before the time step, postProcess as in a), Arguments of the functions are: (u, step, time, dt) u, time: old before the solver, new after it; there may be also values for the return codes: retValAtOK to return if the process ends normally retValAtMinStepSize to return if the min. dt is overcome retValAtSolver to return if the lin. solver failed
startTSNo(optional) time step number of the initial condition (normally 0).
endTSNo(optional) if passed, stop after the time step with this number.

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / time_step_util.lua :658

function util.SolveLinearTimeProblem(

◆ SolveNonlinearProblemAdaptiveLimex()

function util SolveNonlinearProblemAdaptiveLimex ( ,
domainDisc  ,
newtonSolver  ,
out  ,
filename  ,
startTime  ,
endTime  ,
dt  ,
minStepSize  ,
maxStepSize  ,
limexDesc  ,
bFinishTimeStep  ,
postProcess  ,
startTSNo  ,
endTSNo   
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / time_step_util.lua :1249

function util.SolveNonlinearProblemAdaptiveLimex(

◆ SolveNonlinearProblemAdaptiveTimestep()

function util SolveNonlinearProblemAdaptiveTimestep ( ,
domainDisc  ,
newtonSolver  ,
out  ,
filename  ,
startTime  ,
endTime  ,
dt  ,
minStepSize  ,
maxStepSize  ,
adaptiveStepInfo  ,
bFinishTimeStep  ,
postProcess  ,
startTSNo  ,
endTSNo   
)

Time stepping with the adaptive step size. Returns number of time steps done and the last time.

Parameters
u[in] GridFunction with Startvalues, [out] Solution"
domainDiscDomain Discretization
newtonSolverNonlinear Solver
outa VTKOutput (pass nil for no output)
filenamefilename for output
startTimestart time point
endTimeend time point
dttime step
maxStepSizemaximal step sized used
minStepSize(optional) minimal step sized used
adaptiveStepInfoadaptive stepping controls
bFinishTimeStep(optional) boolean if finish_timestep should be called or not.
postProcess(optional) if passed, will be called after every time step.
startTSNo(optional) time step number of the initial condition (normally 0).
endTSNo(optional) if passed, stop after the time step with this number.

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / time_step_util.lua :930

function util.SolveNonlinearProblemAdaptiveTimestep(

◆ SolveNonlinearTimeProblem()

function util SolveNonlinearTimeProblem ( ,
domainDisc  ,
newtonSolver  ,
out  ,
filename  ,
timeScheme  ,
orderOrTheta  ,
startTime  ,
endTime  ,
maxStepSize  ,
minStepSize  ,
reductionFactor  ,
bFinishTimeStep  ,
useCheckpointing  ,
postProcess  ,
startTSNo  ,
endTSNo  ,
newtonLineSearchFallbacks  ,
additionalFinishedConditions   
)

Time stepping with a fixed step size. Returns number of time steps done and the last time.

Parameters
u[in] GridFunction with Startvalues, [out] Solution"
domainDiscDomain Discretization
newtonSolverNonlinear Solver
outa VTKOutput (pass nil for no output)
filenamefilename for output
timeSchemeName of time step scheme: Theta, ImplEuler, ExplEuler, Crank-Nicolson Alexander, FracStep, BDF
orderOrThetatheta param if 'Theta', order if 'BDF'
startTimestart time point
endTimeend time point")
maxStepSizemaximal step sized used
minStepSize(optional) minimal step sized used
reductionFactor(optional) factor by which the step size is reduced, if the problem was not solved. Iterated until minStepSize is reached.
bFinishTimeStep(optional) boolean if finish_timestep should be called or not.
useCheckpointing(optional) if true, use checkpointing.
postProcess(optional) if passed, this can be either a function or a table: a) If this is a function then it is called after solving the non-linear problem in EVERY STAGE of the time-stepping scheme; b) if this is a table, it can contain 4 optional functions: prepareTimeStep to call before the time step, preProcess to call before the non-linear solver in EVERY STAGE, postProcess as in a), finalizeTimeStep to call after the time step, rewindTimeStep to call if some of the computations of the time step failed, Arguments of the functions are: (u, step, time, dt) u, time: old before the solver, new after it c) This can also be a list of C++ objects which inherit ITimeIntegratorObserver or Lua Callbacks created by util.LuaCallbackHelper:create()
startTSNo(optional) time step number of the initial condition (normally 0).
endTSNo(optional) if passed, stop after the time step with this number.
newtonLineSearchFallbacks(optional) Sequence of line-search objects. Each time the newton-solver fails in a time-step, the next line-search object from the sequence is used.
additionalFinishedConditions(optional) More objects of type IFinishedConditions to add to the FinishedConditions defined by endTSNo or endTime

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / time_step_util.lua :247-606

Variable Documentation

◆ restartWithCheckpoint

parameterBool restartWithCheckpoint