From c73b1f04b2324e15f6b2368524bcb4da52dfe07a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=BChle=2C=20Laura=20Christine=20=28lakue103=29?= <laura.kuehle@uni-duesseldorf.de> Date: Wed, 11 Nov 2020 21:30:08 +0100 Subject: [PATCH] Added some generic class documentation. --- DG_Approximation.py | 13 ++++++++----- Limiter.py | 6 ++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/DG_Approximation.py b/DG_Approximation.py index d2da853..c7c892a 100644 --- a/DG_Approximation.py +++ b/DG_Approximation.py @@ -3,7 +3,7 @@ @author: Laura C. Kühle Plotter: -TODO: Contemplate using Seaborn instead of matplotlib +TODO: Contemplate using Seaborn instead of matplotlib -> Done (used now) TODO: Double-check everything! TODO: Replace loops with list comprehension if feasible @@ -12,11 +12,8 @@ TODO: Write documentation for all methods TODO: Restructure Vectors_of_Polynomials -> Done TODO: Rename Vectors_of_Polynomials -> Done (Basis_Function) -TODO: Ask about Legendre as scaling vector -TODO: Ask whether basis and wavelet should both depend on x (or x and z) -TODO: Ask about renaming ModifiedMinMod to Cockburn-Shu (like Gerhard et al.) TODO: Contemplate how to make shock tubes comparable -TODO: Implement type check for all kwargs and configs +TODO: Implement type check for all kwargs and configs -> Done (not recommended for Python) """ import numpy as np @@ -36,6 +33,12 @@ xi = Symbol('z') class DGScheme(object): + """ + Do documentation here. + + Here come some parameter. + """ + def __init__(self, detector, **kwargs): # Unpack keyword arguments self._wave_speed = kwargs.pop('wave_speed', 1) diff --git a/Limiter.py b/Limiter.py index 22e0189..6397bbc 100644 --- a/Limiter.py +++ b/Limiter.py @@ -63,6 +63,12 @@ class MinMod(Limiter): class ModifiedMinMod(MinMod): + """ + Do documentation here. Also called Cockburn-Shu limiter. + + Here come some parameter. + """ + def _reset(self, config): super()._reset(config) -- GitLab