Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Troubled Cell Detection
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Laura Christine Kühle
Troubled Cell Detection
Commits
58b0c231
Commit
58b0c231
authored
2 years ago
by
Laura Christine Kühle
Browse files
Options
Downloads
Patches
Plain Diff
Added function to select parameters for DG scheme.
parent
aa33f1d3
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Snakefile
+3
-1
3 additions, 1 deletion
Snakefile
workflows/approximation.smk
+7
-3
7 additions, 3 deletions
workflows/approximation.smk
with
10 additions
and
4 deletions
Snakefile
+
3
−
1
View file @
58b0c231
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
workflows/approximation.smk
+
7
−
3
View file @
58b0c231
...
...
@@ -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:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment