Skip to content
Snippets Groups Projects
Commit 58b0c231 authored by Laura Christine Kühle's avatar Laura Christine Kühle
Browse files

Added function to select parameters for DG scheme.

parent aa33f1d3
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,8 @@ Urgent:
TODO: Build package for DG scheme -> Done
TODO: Move scripts into separate directory -> Done
TODO: Move TODOs to Snakefile -> Done
TODO: Outsource run commands in SM rules into separate files
TODO: Outsource run commands in SM rules into separate files -> Done
TODO: Add function to select parameters for DG schemes -> Done
TODO: Move plot_approximation_results() into plotting script
TODO: Introduce env files for each SM rule
......@@ -53,6 +54,7 @@ TODO: Add a default model state
TODO: Look into validators for variable checks
Not feasible yet or doc-related:
TODO: Enforce SM conventions (no direct access to config, order in rule, etc.)
TODO: Replace pop() with get() for dictionary access
TODO: Induce shift in IC class
TODO: Force input_size for each ANN model to be stencil length
......
......@@ -20,13 +20,17 @@ def get_ANN_model(wildcards):
return []
def get_DG_params(wildcards):
return config['schemes'][wildcards.scheme]
rule approximate_solution:
input:
get_ANN_model
output:
DIR+'/fig/{scheme}.json'
params:
dg_params = lambda wildcards: config['schemes'][wildcards.scheme],
dg_params = get_DG_params,
plot_dir = DIR + '/fig'
log:
DIR+'/log/approximate_solution/{scheme}.log'
......@@ -40,7 +44,7 @@ rule plot_approximation_results:
output:
expand(DIR + '/fig/{plot}/{{scheme}}.pdf', plot=PLOTS)
params:
dg_params=lambda wildcards: config['schemes'][wildcards.scheme],
dg_params = get_DG_params,
plot_dir = DIR + '/fig',
directory = DIR
log:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment