Temporal Schemes¶
The modules defining temporal schemes are located in the folder _Solver/TemporalSchemes
.
As only one main iteration routine is required externally, the module’s architecture is free.
Already implemented schemes
Deffered correction¶
Module that defines the DeC time iteration method, adapted to the residual distribution framework.
The main iteration is given by the routine DeC
; direclty referenced and mapped in the Mappers.py
file.
Note
Adapted to RD and python from the Julia code of Davide Torlo
A standalone version for ODE with examples is available on request
-
3_LESARD.SourceCode._Solver.TemporalSchemes.DeC.
DeC
(schemeSC, schemeFS, dt, Problem, Mesh, Sol, M, K, typpe='Equispaced')¶ Provides a full time iteration according to the DeC method
Functional inputs
– schemeSP (scheme module list) – handler of the spatial scheme module, should be vectorised for using on several (spatial) points simultaneously followed (if any) by the list of its amendments (limiter, jumps etc)
– schemeFS (scheme module list) – handler of the FluidSpotter scheme module, should be vectorised for using on several (spatial) points simultaneously followed (if any) by the list of its amendments (limiter, jumps etc)
Problem inputs
– Problem (Problem) – the considered problem
– Mesh (MeshStructure) – the considered mesh
Time-dependent inputs
– dt (float) – time span on which to evolve the solution
– Sol (Solution structure) – the initial condition, as a solution structure
Input parameters:
– M (integer) – the number of subtimesteps
– K (integer) – the number of corrections
– typpe (string) – type of the interpolation (quadrature) nodes to be used: “Equispaced”, “GaussLobatto”. Default is set as Equispaced
Returns
– Tspan (float) – the full time step interval
– U (float numpy array) – the updated solution (NbVars x (NbGivenPoints))
-
3_LESARD.SourceCode._Solver.TemporalSchemes.DeC.
LagrangeBasis
(X, t, i)¶ Interpolation of the ith Lagrange polynomial, evaluated at the point t given the nodes X
- Parameters
X (float array-like) – the list of nodes that are constructing the Lagrange interpolation polynomial
t (float) – the point for which to evaluate the Lagrange polynomial
i (integer) – the considered Lagrange polynomial basis (w.r.t. the nodes order given in X)
- Returns
the interpolated value of the ith Lagrange polynomial at the location t
- Return type
v (float)
-
3_LESARD.SourceCode._Solver.TemporalSchemes.DeC.
Nodes
(order, typpe)¶ Retrieves the interpolation (quadrature) nodes between 0 and 1, depending on the wished interpolation order and the nodes type.
- Parameters
order (integer) – the wished interpolation order
typpe (string) – the wished type of nodes. Implemented types are: “Equispaced”, “GaussLobatto”
Returns
– Nt (float numpy array) – the interpolation nodes
– W (float numpy array) – the associated quadrature weights
-
3_LESARD.SourceCode._Solver.TemporalSchemes.DeC.
ThetaDec
(order, typpe)¶ Computes the theta
- Parameters
order (integer) – the wished interpolation order
typpe (string) – the wished type of nodes. Implemented types are: “Equispaced”, “GaussLobatto”
- Returns
matrix of values for DeC use (order x order)
- Return type
theta (float numpy array)