# -*- coding: utf-8 -*- """ @author: Laura C. Kühle Discussion: TODO: Contemplate saving 5-CV split and evaluating models separately TODO: Contemplate separating cell average and reconstruction calculations completely TODO: Contemplate removing Methods section from class docstring TODO: Contemplate containing the quadrature application for plots in Mesh TODO: Contemplate containing coarse mesh generation in Mesh TODO: Ask whether all quadratures depend on freely chosen num_nodes TODO: Contemplate saving training data for each IC separately TODO: Contemplate removing TrainingDataGenerator class TODO: Ask why no fine mesh is used for calculate_coarse_projection() TODO: Discuss adding kwargs to attributes in documentation TODO: Discuss descriptions (matrices, cfl number, right-hand side, limiting slope, basis, wavelet, etc.) TODO: Discuss referencing info on SSPRK3 TODO: Discuss name for quadrature mesh (now: grid) TODO: Contemplate using lambdify for basis TODO: Contemplate allowing vector input for ICs TODO: Discuss how wavelet details should be plotted Urgent: TODO: Refactor Boxplot class -> Done TODO: Enforce periodic boundary condition for projection with decorator -> Done TODO: Enforce Boxplot bounds with decorator TODO: Enforce Boxplot folds with decorator TODO: Enforce boundary for initial condition in exact solution only TODO: Adapt number of ghost cells based on ANN stencil TODO: Ensure exact solution is calculated in Equation class TODO: Extract objects from UpdateScheme TODO: Enforce num_ghost_cells to be positive integer for DG (not training) TODO: Add Burger class TODO: Use cfl_number for updating, not just time (equation-related?) Critical, but not urgent: TODO: Make sure TCs are reported as ndarray TODO: Make sure that the cell indices are the same over all TCDs TODO: Combine ANN workflows if feasible TODO: Check whether all instance variables are sensible TODO: Check whether all ValueError are set (correctly) TODO: Introduce env files for each SM rule TODO: Add an environment file for Snakemake TODO: Rename files according to standard TODO: Allow comparison between ANN training datasets TODO: Use full path for ANN model state TODO: Add a default model state TODO: Look into validators for variable checks TODO: Investigate g-mesh(?) TODO: Enforce even number of ghost cells on each side on fine mesh (?) TODO: Create g-mesh with Mesh class TODO: Add images to report TODO: Add verbose output TODO: Add tests for all functions Not feasible yet or doc-related: TODO: Move plot_approximation_results() into plotting script TODO: Move plot_results() into plotting script TODO: Move plot_evaluation_results() into plotting script 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 TODO: Restructure directories TODO: Adjust definitions of each IC to be dependent on domain TODO: Add README for ANN training TODO: Give detailed description of wavelet detection TODO: Adjust code to allow classes for all equations (Burger, linear advection, 1D Euler) TODO: Add ThresholdDetector TODO: Double-check everything! (also with pylint, pytype, pydoc, pycodestyle, pydocstyle) TODO: Check whether documentation style is correct TODO: Check whether all types in doc are correct TODO: Add type annotations to function heads TODO: Clean up docstrings TODO: Investigate profiling for speed up """ configfile: 'config.yaml' DIR = 'workflows' module_config = {'data_dir': config['data_dir'], 'random_seed': config['random_seed']} module ann_data: snakefile: DIR + '/ANN_data.smk' config: {**config['ANN_Data'], **module_config} use rule * from ann_data as ANN_* module ann_training: snakefile: DIR + '/ANN_training.smk' config: {**config['ANN_Training'], **module_config} use rule * from ann_training as ANN_* module approximation: snakefile: DIR + '/approximation.smk' config: {**config['Approximation'], **module_config} use rule * from approximation as DG_* rule all: input: rules.ANN_all.input, rules.DG_all.input default_target: True