LESARD: Mapping routines¶
The file SourceCode/Mappers.py
maps the parameters that can be set by the user to the actual module or routine that implements the related problem or property.
Please then use this page as a reference when designing a new problem or setting file. Furthermore, when implementing a new possibility for the code, please copy the new module or portion of code in the corresponding folder and enrich the mappers below.
Note
The mappers for the problem dependent equations of state, boundary and initial conditions should be provided in the ProblemFile module in the initialisation of their respective classes (see the problem definition’s documentation).
-
3_LESARD.SourceCode.Mappers.
Governing_Equations
(id)¶ Mapper to the modules contained in the
ProblemDefinition.GoverningEquations
library, defining the governing equations.Parameters
id (integer) – the index corresponding to the investigated equation
Implemented equations given the id
- Euler equations
- Linear advection (rotation)
- Linear advection (translation)
- Returns
the module itself, containing the classes associated to the given equation (see the documentation of
ProblemDefinition
)- Return type
GoverningEquations.Module (module)
-
3_LESARD.SourceCode.Mappers.
Fluid_Properties
(id, Model)¶ Mapper that defines the considered fluid properties to input in the model required by the GoverningEquations, according to the fluids templates (classes) defined in
ProblemDefinition.FluidModels
module.Parameters
id (integer) – the index corresponding to the wished Fluid properties
Model (string) – name of the fluid’s model that one wants to use
Implemented fluid types given the id
- Air with properties \(\gamma=1.5\) and \(p_\infty=0\) and \(R=0.287\), with a blue representation color
- R22 fluid with properties \(\gamma=1.249\) and \(p_\infty=0\) and \(R=0.091\), with a red representation color
- Helium with properties \(\gamma=1.67\) and \(p_\infty=0\) and \(R=2.08\), with a green representation color
- Returns
Returns an instance of the fluid model with filled properties
- Return type
Prop (Model instance)
-
3_LESARD.SourceCode.Mappers.
Temporal_Scheme
(id, params)¶ Mapper that defines the temporal scheme to use, according to the predefined temporal schemes given in
SourceCode._Solver.TemporalSchemes
library.Parameters
id (integer) – the index corresponding to the wished Fluid properties
params (integers list) – list of the parameters to give to the time stepping functions as given by the user
Implemented temporal schemes given the id
- Deffered correction (DeC)
- Returns
Returns the iteration routine itself
- Return type
Func (function callback)
-
3_LESARD.SourceCode.Mappers.
Spatial_Scheme
(id)¶ Mapper that defines the temporal scheme to use, according to the predefined spatial schemes given in
SourceCode._Solver.SpatialSchemes
library.Parameters
id (integer) – the index corresponding to the wished Fluid properties
Implemented spatial schemes given the id
- Continuous Galerkin
- Continuous Galerkin + Lax-Friedrichs flux
- Continuous Galerkin on Primary variables
- Returns
Returns the module associated to the wished spatial scheme
- Return type
SpatialSchemes.Module (module)
-
3_LESARD.SourceCode.Mappers.
Limiter
(id)¶ Mapper that defines the limiting amendement to apply to the scheme, according to the given index. The user input for the admendements sequence is interpreted in the
SourceCode._Solver.SpatialModifiers
library. All the limiters should have a filename begining byLimiter_
.Parameters
id (integer) – the index corresponding to the wished amendement to the scheme
Implemented amendements given the id and their type
- Limiters
- Psi
- Returns
Returns the module associated to the wished limiter
- Return type
SpatialModifiers.Module (module)
-
3_LESARD.SourceCode.Mappers.
Filtering
(id)¶ Mapper that defines the filtering amendement to apply to the scheme, according to the given index. The user input for the admendements sequence is interpreted in the
SourceCode._Solver.SpatialModifiers
library. All the filters should have a filename begining byFiltering_
.Parameters
id (integer) – the index corresponding to the wished amendement to the scheme
Implemented amendements given the id and their type
- Filtering
- Streamline (failing for systems)
- Returns
Returns the module associated to the wished limiter
- Return type
SpatialModifiers.Module (module)
-
3_LESARD.SourceCode.Mappers.
Fluid_Selector
(id)¶ Mapper that defines the the fluid selector to use, according to the ones defined in
SourceCode._Solver.FluidSelectors
module, containing its type, evolution equation, fluid determination and possibly redistancing routines.Parameters
id (integer) – the index corresponding to the wished Fluid selector
Implemented fluid’s selectors
- NaiveLS_CG
- NaiveLS_CG_LFX
- NaiveLS_CG_LFX_Limited
- Returns
class containing all the fluid’s selector tools
- Return type
FluidSelectors.Module (module)
-
3_LESARD.SourceCode.Mappers.
Boundary_Conditions
(id, *params)¶ Mapper that defines the the fluid selector to use, according to the ones defined in
SourceCode._Solver.FluidSelectors
module, containing its type, evolution equation, fluid determination and possibly redistancing routines.Parameters
- - id (integer) – the index corresponding to the wished Fluid selector
id (params) – (optional) the parameters to pass to the selected boundary function routine
Implemented boundary conditions
- Outflow
- Inflow (see the inflow doc to know which inflow function and parameters are available)
- Wall
- Dirichlet
- Returns
function callback applying the selected boundary condition.
- Return type
BoundaryConditionsRoutine (function callback)
-
3_LESARD.SourceCode.Mappers.
Redistancer
(id, *params)¶ Mapping to the wished redistancing algorithm for the level set. Please refer to each module to discover the possible further parameters to select.
Parameters
- id (integer) – the index corresponding to the wished quadrature implementation
Implemented redistancing routines
- HopfLax with Gradient Descent as an optimisation solver and Weno-like gradient approximation (recomendedd)
- HopfLax with Bregman split method as optimizer
- HopfLax with Backstracking Bregman split as optimizer, using Weno-like gradient approximation
- HopfLax with Classical Bregman split as optimizer and Backstracking Bregman split as sub-optimizer, using Weno-like gradient approximation
- Returns
instance of the clas furnishing the redistancing technique.
- Return type
QuadratureRules.Module (module)
-
3_LESARD.SourceCode.Mappers.
Quadrature_Rules
(id)¶ Mapping to the wished quadrature rule module. Please refer to each module to discover the possible further parameters to select.
Parameters
- id (integer) – the index corresponding to the wished quadrature implementation
Implemented quadrature rules
- HandBased, hardly coded
- Using the library of QuadPy, with further choices to select (see the module itself for more details)
- Returns
module containing the classes furnishing the inner and boundary quadratures.
- Return type
QuadratureRules.Module (module)