-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review #388
Review #388
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #388 +/- ##
==========================================
- Coverage 74.04% 73.96% -0.09%
==========================================
Files 274 278 +4
Lines 23153 23173 +20
==========================================
- Hits 17143 17139 -4
- Misses 6010 6034 +24 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am very sorry for nitpicking so much! I am making an effort to learn to write cleaner code and the main things I learned are:
- Choose expressive names for functions and variables in favour of comments
- Make smaller functions that do only what they promise in their name
I hope I don't annoy you too much with all this complaining.. But I do feel that these tips helped me a lot and hope you find it helpful as well.
from tabulate import tabulate | ||
|
||
|
||
def check_stab_points( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current convention is that only code that is exclusively plotting things should be excluded from coverage reports. If I understand correctly, this function generates configurations for simulations. This is a grey area, I guess. In principle, you want to make sure the configuration stays valid, but that is difficult to test reasonably. Previously, we decided to just not test this, but to be honest about it and not exclude it from the report. Does anybody want to change or convention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I'd rather have it as you describe: don't exclude it, try to test it and if not, then you don't.
stab_model = Stability_implementation( | ||
description, kappa_max=points[0], mu_max=points[1], Num_iter=(2, 2) | ||
) | ||
# breakpoint() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove temporary comments
description = dampedharmonic_oscillator_params() | ||
quad_type_list = ['GAUSS', 'LOBATTO', 'RADAU-LEFT', 'RADAU-RIGHT'] | ||
|
||
# Initialize data as a list of rows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is misleading. data
is initialised as an empty list. Please remove.
# Initialize data as a list of rows | ||
data = [] | ||
|
||
# Loop through different numbers of nodes and maximum iterations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant and slightly misleading comment
description['sweeper_params']['quad_type'] = quad_type | ||
description['step_params']['maxiter'] = max_iter | ||
|
||
# Create Stability_implementation instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant comment
# initialize step parameters | ||
step_params = dict() | ||
step_params['maxiter'] = 50 | ||
# Initialize step parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant comment
description["sweeper_params"] = sweeper_params | ||
description["level_params"] = level_params | ||
description["step_params"] = step_params | ||
# Fill description dictionary for easy step instantiation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant comment
kappa: spring constant | ||
mu: friction | ||
|
||
https://beltoforion.de/en/harmonic_oscillator/ | ||
Source: https://beltoforion.de/en/harmonic_oscillator/ | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does this have a docstring? I suggest removing it.
description = dampedharmonic_oscillator_params() | ||
Stability = Stability_implementation(description, kappa_max=18, mu_max=18, Num_iter=(200, 200)) | ||
Stability = Stability_implementation(description, kappa_max=30, mu_max=30, Num_iter=(200, 200)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe pep8 wants us to use lower case names for variables and upper case names for classes.
@@ -230,7 +230,7 @@ def plot_work_precision(self): # pragma: no cover | |||
|
|||
for ii, jj in enumerate(self.K_iter): | |||
# ============================================================================= | |||
# # If you want to get exactly the same picture like in paper uncomment this only for vertical axis | |||
# # If you want to get exactly the same picture like in paper uncomment this only for vertical axis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this comment. And it has two #
in the beginning.
@@ -670,7 +670,7 @@ def compute_global_error_data(self, Picard=False, RK=False, VV=False, work_count | |||
file.close() | |||
|
|||
# find expected local convergence order for position | |||
def local_order_pos(self, order_K, order_quad): | |||
def local_order_pos(self, order_K, order_quad): # pragma: no cover |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't exclude this from the coverage report
@@ -687,7 +687,7 @@ def local_order_pos(self, order_K, order_quad): | |||
raise NotImplementedError('order of convergence explicitly not implemented ') | |||
|
|||
# find expected local convergence order for velocity | |||
def local_order_vel(self, order_K, order_quad): | |||
def local_order_vel(self, order_K, order_quad): # pragma: no cover |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't exclude this from the coverage report
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comments @brownbaerchen, I will fix these issues.
…with. It is not ready yet; if Codecov fails, I will include more tests.
|
||
|
||
def dampedharmonic_oscillator_params(): | ||
|
||
def harmonic_oscillator_params(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about a more descriptive function name such as get_default_harmonic_oscillator_description
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only skimmed the code because it is a lot of stuff that I don't really understand, but I trust you that it does what you want.
Anyways, I have another tip for you: The principle of least astonishment. The idea being that a function name and its arguments should tell you what it does.
This kind of expands on the descriptive naming idea. In particular, nondescript naming or too long functions can only lead to some surprise in the sense that you don't know what to expect or don't know what you are seeing.
I don't mind merging code that I don't understand in a project. And if you have tested your code, I believe you. But keep in mind that it's really hard for other people to understand very long functions that do everything at once.
kappa: spring constant | ||
mu: friction | ||
Source: https://beltoforion.de/en/harmonic_oscillator/ | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this function tell us about the harmonic oscillator? I am not wondering what the harmonic oscillator does, but what this file is about. The documentation of the harmonic oscillator should go into the harmonic oscillator problem class and nowhere else.
from tabulate import tabulate | ||
class StabilityImplementation: | ||
""" | ||
Routine to compute the stability domains of different configurations of SDC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a class, not a routine. Because the name of the class is not very descriptive, I don't find it obvious what this is supposed to do.
Kpicard_eigval, | ||
) = L.sweep.get_scalar_problems_picardsweep_mats(nsweeps=self.K_iter, lambdas=lambdas) | ||
else: | ||
ProblemError("Picard interation is False") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this error.
Rpicard_mat = np.array([[1.0, dt], [0, 1.0]]) + np.dot(q_mat, FPicard) @ ones.T | ||
stab_func_picard, v = np.linalg.eig(Rpicard_mat) | ||
else: | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this pass an then raise an error?
stab_func_picard, v = np.linalg.eig(Rpicard_mat) | ||
else: | ||
pass | ||
raise ProblemError("Collocation update step is only works for True") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the pass
can be removed 😉
self.SDC, self.Ksdc, self.picard, self.Kpicard = self.stability_data() | ||
self.cwd = cwd | ||
|
||
def stability_data(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is pretty long and difficult to understand.
Maybe it would make sense to split this function for the different types of iterations? Or to annotate it with some comments as to what you are doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote down some comments
results_data = [] | ||
|
||
# Loop through different numbers of nodes and maximum iterations | ||
for num_nodes in description['helper_params']['num_nodes_list']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is helper_params
not a separate parameter to this function? Since a description
dictionary is heavily used in pySDC, I find this confusing. You expect everything in the description to be a parameter for pySDC, but here it's just used for this function. Hiding this necessary parameter for the function in the description object makes it difficult to understand what's going on.
given points and excluded codecov function that generates a table.
Are we good here? |
lgtm |
) * first working SDC version (M and Minv) * Update playground.py * cleaning up * Added some hyphens in plots (#389) * Removed seperate file for GPU Dahlquist implementation (#391) Co-authored-by: Thomas <[email protected]> * Review (#388) * Bug is fixed and added new code * new code for the table * Edits in markdown file * some edits in test * Bugs fix * Codecov * I cleaned up my code and separated classes to make it easier to work with. It is not ready yet; if Codecov fails, I will include more tests. * forgot black * flake8 * bug fix * Edits codes according to the comments * Edited codes according to the comments in the GitHub * Defined new function in stability_simulation.py to check stability for given points and excluded codecov function that generates a table. * small edits for codecov * removed no cover * NCCL communicators (#392) * Added wrapper for MPI communicator to use NCCL under the hood * Small fix * Moved NCCL communicator wrapper to helpers --------- Co-authored-by: Thomas <[email protected]> * Version bump for new release * proper readme and link * Started playground for machine learning generated initial guesses for (#394) SDC * playing with FEniCS * blackening * Bug fix (#395) * readme file changes * fixed bugs for stability plots and some edits in README file * some edits * typo in citation * Bump version * Bug fix (#396) * Clear documentation and some edits in the code * forgot black * some changes * bump version * Cosmetic changes (#398) * Parallel SDC (Reloaded) project (#397) TL: Added efficient diagonal preconditioners and associated project. Coauthored by @caklovicka * Generic multi-component mesh (#400) * Generic multicomponent mesh * new try * Added a test for MultiComponentMesh * Test that the type is conserved also after numpy operations * Added documentation for how to use `MultiComponentMesh` * Changed formatting of the documentation * Update ci_pipeline.yml * version freak show * version freak show II * version freak show III * version freak show IV * Update ci_pipeline.yml * version freak show V * 2D Brusselator problem (#401) * Added 2D Brusselator problem from Hairer-Wanner II. Thanks @grosilho for the suggestion! * Added forgotten pytest marker * Fix brain afk error * Added work counter for right hand side evaluations * Removed file for running Brusselator from project * Retry at removing the file * I need to go to git school * Datatype `DAEMesh` for DAEs (#384) * Added DAE mesh * Updated all DAE problems and the SDC-DAE sweeper * Updated playgrounds with new DAE datatype * Adapted tests * Minor changes * Black.. :o * Added DAEMesh only to semi-explicit DAEs + update for FI-SDC and ProblemDAE.py * Black :D * Removed unnecessary approx_solution hook + replaced by LogSolution hook * Update WSCC9 problem class * Removed unnecessary comments * Removed test_misc.py * Removed registering of newton_tol from child classes * Update test_problems.py * Rename error hook class for logging global error in differential variable(s) * Added MultiComponentMesh - @brownbaerchen + @tlunet + @pancetta Thank ugit add pySDC/implementations/datatype_classes/MultiComponentMesh.py * Updated stuff with new version of DAE data type * (Hopefully) faster test for WSCC9 * Test for DAEMesh * Renaming * ..for DAEMesh.py * Bug fix * Another bug fix.. * Preparation for PDAE stuff (?) * Changes + adapted first test for PDAE stuff * Commented out test_WSCC9_SDC_detection() - too long runtime * Minor changes for test_DAEMesh.py * Extended test for DAEMesh - credits for @brownbaerchen * Test for HookClass_DAE.py * Update for DAEMesh + tests * 🎉 - speed up test a bit (at least locally..) * Forgot to enable other tests again * Removed if-else-statements for mesh type * View for unknowns in implSysFlatten * Fix for RK sweeper - changed nodes in BackwardEuler class (#403) * Made aborting the step at growing residual optional (#405) * `pySDC`-build-in `LagrangeApproximation` class in `SwitchEstimator` (#406) * SE now uses LagrangeApproximation class + removed Lagrange class in SE * Removed log message again (not corresponding to PR) * version bump * Added hook for logging to file (#410) * Monodomain project (#407) * addded some classes from oldexplicit_stabilized branch. Mainly, the problems description, datatype classes, explicit stabilized classes. Tested for IMEX on simple problems * added implicit,explicit,exponential integrator (in electrophysiology aka Rush-Larsen) * added exponential imex and mES, added parabolic_system in vec format * added new stabilized integrators using multirate, splitting and exponential approaches * before adding exponential_runge_kutta as underlying method, instead of the traditional collocation methods * added first order exponential runge kutta as underlying collocation method. To be generalized to higher order * generalized exponential runge kutta to higher order. Added exponential multirate stabilized method using exponential RK but must tbe checked properly * fixed a few things * optimized a few things * renamed project ExplicitStabilized to Monodomain * removed deprecated problems * fixed some renaming issues * did refactoring of code and put in Monodomain_NEW * removed old code and renamed new code * added finite difference discretization * added many things, cant remember * old convergence_controller * addded some classes from oldexplicit_stabilized branch. Mainly, the problems description, datatype classes, explicit stabilized classes. Tested for IMEX on simple problems * added implicit,explicit,exponential integrator (in electrophysiology aka Rush-Larsen) * added exponential imex and mES, added parabolic_system in vec format * added new stabilized integrators using multirate, splitting and exponential approaches * before adding exponential_runge_kutta as underlying method, instead of the traditional collocation methods * added first order exponential runge kutta as underlying collocation method. To be generalized to higher order * generalized exponential runge kutta to higher order. Added exponential multirate stabilized method using exponential RK but must tbe checked properly * fixed a few things * optimized a few things * renamed project ExplicitStabilized to Monodomain * removed deprecated problems * fixed some renaming issues * did refactoring of code and put in Monodomain_NEW * removed old code and renamed new code * added finite difference discretization * added many things, cant remember * added smooth TTP model for conv test, added DCT for 2D and 3D problems * added plot stuff and run scripts * fixed controller to original * removed explicit stabilized files * fixed other files * removed obsolete splittings from ionic models * removed old sbatch scripts * removed mass transfer and sweeper * fixed something * removed my base transfer * removed hook class pde * removed FD files * fixed some calls to FD stuff * removed FEM FEniCSx files * renamed FD_Vector to DCT_Vector * added hook for output and visualization script * removed plot scripts * removed run scripts, except convergence * removed convergence experiments script * fixed TestODE * added stability test in run_TestODE * added stability test in run_TestODE * added stability test in run_TestODE * removed obsolete stuff in TestODE * removed unneeded stuff from run_MonodomainODE * cleaned a bit run_MonodomainODE * removed utils/ * added few comments, cleaned a bit * removed schedule from workflow * restored tutorial step 7 A which I has modified time ago * run black on monodomain project * fixed a formatting thing * reformatted everything with black * Revert "revert formatted with black" This reverts commit 82c82e9. * added environment file for monodomain project, started to add stuff in workflow * added first test * added package tqdm to monodomain environment * added new TestODE using DCT_vectors instead of myfloat, moved phi_eval_lists from MonodomainODE to the sweeper * deleted old TestODE and myfloat stuff * renamed TestODEnew to TestODE * cleaned a bit * added stability, convergence and iterations tests. Changed a bit other scripts as needed * reactivated other tests in workflow * removed my tests temporarly * added monodomain marker to project pyproject.toml * changed files and function names for tests * fixed convergence test * made one test a bit shorter * added test for SDC on HH and fixed missing feature in SDC imex sweeper for monodomain * reformatted with correct black options * fixed a lint error * another lint error * adding tests with plot * modified convergence test * added test iterations in parallel * removed plot from tests * added plots without writing to file * added write to file * simplified plot * new plot * fixed plot in iterations parallel * added back all tests and plots * cleaned a bit * added README * fixed readme * modified comments in controllers * try to compute phi every step * removed my controllers, check u changed before comuting phis * enabled postprocessing in pipeline * added comments to data_type classes, removed unnecessary methods * added comments to hooks * added comments to the problem classes * added comments to the run scripts * added comments to sweepers and transfer classes * fixed the readme * decommented if in pipeline * removed recv_mprobe option * changed back some stuff outiside of monodomain project * same * again * fixed Thomas hints * removed old unneeded move coverage folders * fixed previously missed Thomas comments * begin change datatype * changed run_Monodomain * added prints * fixed prints * mod print * mod print * mod print * mod print * rading init val * rading init val * removed prints * removed prints * checking longer time * checking longer time * fixed call phi eval * trying 2D * trying 2D * new_data type passing tests * removed coverage folders * optmized phi eval lists * before changing phi type * changed eval phi lists * polished a bit * before switch indeces * reformatted phi computaiton to its traspose * before changing Q * optimized integral of exp terms * changed interfate to c++ code * moved definition of dtype u f * tests passed after code refactoring * Generic MPI FFT class (#408) * Added generic MPIFFT problem class * Fixes * Generalized to `xp` in preparation for GPUs * Fixes * Ported Allen-Cahn to generic MPI FFT implementation * Ported Gray-Scott to generic MPI FFT (#412) * Ported Gray-Scott to generic MPI FFT class * `np` -> `xp` * Reverted poor changes * Update README.md (#413) Added the ExaOcean grant identified and the "Supported by the European Union - NextGenerationEU." clause that they would like us to display. * TIME-X Test Hackathon @ TUD: Test for `SwitchEstimator` (#404) * Added piecewise linear interpolation to SwitchEstimator * Started with test for SwitchEstimator [WIP] * Test to proof sum_restarts when event occuring at boundary * Started with test to check adapt_interpolation_info [WIP] * Added test for SE.adapt_interpolation_info() * Update linear interpolation + logging + changing tolerances * Test for linear interpolation + update of other test * Correction for finite difference + adaption tolerance * Added test for DAE case for SE * Choice of FD seems to be important for performance of SE * Removed attributes from dummy probs (since the parent classes have it) * Test for dummy problems + using functions from battery_model.py * Moved standard params for test to function * Updated hardcoded solutions for battery models * Updated hardcoded solutions for DiscontinuousTestODE * Updated docu in SE for FDs * Lagrange Interpolation works better with baclward FD and alpha=0.9 * Added test for state function + global error * Updated LogEvent hooks * Updated hardcoded solutions again * Adapted test_problems.py * Minor changes * Updated tests * Speed-up test for buck converter * Black.. * Use msg about convergence info in Newton in SE * Moved dummy problem to file * Speed up loop using mask * Removed loop * SDC-DAE sweeper for semi-explicit DAEs (#414) * Added SI-SDC-DAE sweeper * Starte with test for SemiImplicitDAE * Test for SI-SDC sweeper * Clean-up * Removed parameter from function * Removed test + changed range of loop in SI-sweeper --------- Co-authored-by: Robert Speck <[email protected]> Co-authored-by: Thomas Baumann <[email protected]> Co-authored-by: Thomas <[email protected]> Co-authored-by: Ikrom Akramov <[email protected]> Co-authored-by: Thibaut Lunet <[email protected]> Co-authored-by: Lisa Wimmer <[email protected]> Co-authored-by: Giacomo Rosilho de Souza <[email protected]> Co-authored-by: Daniel Ruprecht <[email protected]>
commit cbaae05 Author: jakob-fritz <[email protected]> Date: Wed Apr 24 10:34:09 2024 +0200 Make create_gitlab_ci branch up-to-date before merging into master (Parallel-in-Time#418) * first working SDC version (M and Minv) * Update playground.py * cleaning up * Added some hyphens in plots (Parallel-in-Time#389) * Removed seperate file for GPU Dahlquist implementation (Parallel-in-Time#391) Co-authored-by: Thomas <[email protected]> * Review (Parallel-in-Time#388) * Bug is fixed and added new code * new code for the table * Edits in markdown file * some edits in test * Bugs fix * Codecov * I cleaned up my code and separated classes to make it easier to work with. It is not ready yet; if Codecov fails, I will include more tests. * forgot black * flake8 * bug fix * Edits codes according to the comments * Edited codes according to the comments in the GitHub * Defined new function in stability_simulation.py to check stability for given points and excluded codecov function that generates a table. * small edits for codecov * removed no cover * NCCL communicators (Parallel-in-Time#392) * Added wrapper for MPI communicator to use NCCL under the hood * Small fix * Moved NCCL communicator wrapper to helpers --------- Co-authored-by: Thomas <[email protected]> * Version bump for new release * proper readme and link * Started playground for machine learning generated initial guesses for (Parallel-in-Time#394) SDC * playing with FEniCS * blackening * Bug fix (Parallel-in-Time#395) * readme file changes * fixed bugs for stability plots and some edits in README file * some edits * typo in citation * Bump version * Bug fix (Parallel-in-Time#396) * Clear documentation and some edits in the code * forgot black * some changes * bump version * Cosmetic changes (Parallel-in-Time#398) * Parallel SDC (Reloaded) project (Parallel-in-Time#397) TL: Added efficient diagonal preconditioners and associated project. Coauthored by @caklovicka * Generic multi-component mesh (Parallel-in-Time#400) * Generic multicomponent mesh * new try * Added a test for MultiComponentMesh * Test that the type is conserved also after numpy operations * Added documentation for how to use `MultiComponentMesh` * Changed formatting of the documentation * Update ci_pipeline.yml * version freak show * version freak show II * version freak show III * version freak show IV * Update ci_pipeline.yml * version freak show V * 2D Brusselator problem (Parallel-in-Time#401) * Added 2D Brusselator problem from Hairer-Wanner II. Thanks @grosilho for the suggestion! * Added forgotten pytest marker * Fix brain afk error * Added work counter for right hand side evaluations * Removed file for running Brusselator from project * Retry at removing the file * I need to go to git school * Datatype `DAEMesh` for DAEs (Parallel-in-Time#384) * Added DAE mesh * Updated all DAE problems and the SDC-DAE sweeper * Updated playgrounds with new DAE datatype * Adapted tests * Minor changes * Black.. :o * Added DAEMesh only to semi-explicit DAEs + update for FI-SDC and ProblemDAE.py * Black :D * Removed unnecessary approx_solution hook + replaced by LogSolution hook * Update WSCC9 problem class * Removed unnecessary comments * Removed test_misc.py * Removed registering of newton_tol from child classes * Update test_problems.py * Rename error hook class for logging global error in differential variable(s) * Added MultiComponentMesh - @brownbaerchen + @tlunet + @pancetta Thank ugit add pySDC/implementations/datatype_classes/MultiComponentMesh.py * Updated stuff with new version of DAE data type * (Hopefully) faster test for WSCC9 * Test for DAEMesh * Renaming * ..for DAEMesh.py * Bug fix * Another bug fix.. * Preparation for PDAE stuff (?) * Changes + adapted first test for PDAE stuff * Commented out test_WSCC9_SDC_detection() - too long runtime * Minor changes for test_DAEMesh.py * Extended test for DAEMesh - credits for @brownbaerchen * Test for HookClass_DAE.py * Update for DAEMesh + tests * 🎉 - speed up test a bit (at least locally..) * Forgot to enable other tests again * Removed if-else-statements for mesh type * View for unknowns in implSysFlatten * Fix for RK sweeper - changed nodes in BackwardEuler class (Parallel-in-Time#403) * Made aborting the step at growing residual optional (Parallel-in-Time#405) * `pySDC`-build-in `LagrangeApproximation` class in `SwitchEstimator` (Parallel-in-Time#406) * SE now uses LagrangeApproximation class + removed Lagrange class in SE * Removed log message again (not corresponding to PR) * version bump * Added hook for logging to file (Parallel-in-Time#410) * Monodomain project (Parallel-in-Time#407) * addded some classes from oldexplicit_stabilized branch. Mainly, the problems description, datatype classes, explicit stabilized classes. Tested for IMEX on simple problems * added implicit,explicit,exponential integrator (in electrophysiology aka Rush-Larsen) * added exponential imex and mES, added parabolic_system in vec format * added new stabilized integrators using multirate, splitting and exponential approaches * before adding exponential_runge_kutta as underlying method, instead of the traditional collocation methods * added first order exponential runge kutta as underlying collocation method. To be generalized to higher order * generalized exponential runge kutta to higher order. Added exponential multirate stabilized method using exponential RK but must tbe checked properly * fixed a few things * optimized a few things * renamed project ExplicitStabilized to Monodomain * removed deprecated problems * fixed some renaming issues * did refactoring of code and put in Monodomain_NEW * removed old code and renamed new code * added finite difference discretization * added many things, cant remember * old convergence_controller * addded some classes from oldexplicit_stabilized branch. Mainly, the problems description, datatype classes, explicit stabilized classes. Tested for IMEX on simple problems * added implicit,explicit,exponential integrator (in electrophysiology aka Rush-Larsen) * added exponential imex and mES, added parabolic_system in vec format * added new stabilized integrators using multirate, splitting and exponential approaches * before adding exponential_runge_kutta as underlying method, instead of the traditional collocation methods * added first order exponential runge kutta as underlying collocation method. To be generalized to higher order * generalized exponential runge kutta to higher order. Added exponential multirate stabilized method using exponential RK but must tbe checked properly * fixed a few things * optimized a few things * renamed project ExplicitStabilized to Monodomain * removed deprecated problems * fixed some renaming issues * did refactoring of code and put in Monodomain_NEW * removed old code and renamed new code * added finite difference discretization * added many things, cant remember * added smooth TTP model for conv test, added DCT for 2D and 3D problems * added plot stuff and run scripts * fixed controller to original * removed explicit stabilized files * fixed other files * removed obsolete splittings from ionic models * removed old sbatch scripts * removed mass transfer and sweeper * fixed something * removed my base transfer * removed hook class pde * removed FD files * fixed some calls to FD stuff * removed FEM FEniCSx files * renamed FD_Vector to DCT_Vector * added hook for output and visualization script * removed plot scripts * removed run scripts, except convergence * removed convergence experiments script * fixed TestODE * added stability test in run_TestODE * added stability test in run_TestODE * added stability test in run_TestODE * removed obsolete stuff in TestODE * removed unneeded stuff from run_MonodomainODE * cleaned a bit run_MonodomainODE * removed utils/ * added few comments, cleaned a bit * removed schedule from workflow * restored tutorial step 7 A which I has modified time ago * run black on monodomain project * fixed a formatting thing * reformatted everything with black * Revert "revert formatted with black" This reverts commit 82c82e9. * added environment file for monodomain project, started to add stuff in workflow * added first test * added package tqdm to monodomain environment * added new TestODE using DCT_vectors instead of myfloat, moved phi_eval_lists from MonodomainODE to the sweeper * deleted old TestODE and myfloat stuff * renamed TestODEnew to TestODE * cleaned a bit * added stability, convergence and iterations tests. Changed a bit other scripts as needed * reactivated other tests in workflow * removed my tests temporarly * added monodomain marker to project pyproject.toml * changed files and function names for tests * fixed convergence test * made one test a bit shorter * added test for SDC on HH and fixed missing feature in SDC imex sweeper for monodomain * reformatted with correct black options * fixed a lint error * another lint error * adding tests with plot * modified convergence test * added test iterations in parallel * removed plot from tests * added plots without writing to file * added write to file * simplified plot * new plot * fixed plot in iterations parallel * added back all tests and plots * cleaned a bit * added README * fixed readme * modified comments in controllers * try to compute phi every step * removed my controllers, check u changed before comuting phis * enabled postprocessing in pipeline * added comments to data_type classes, removed unnecessary methods * added comments to hooks * added comments to the problem classes * added comments to the run scripts * added comments to sweepers and transfer classes * fixed the readme * decommented if in pipeline * removed recv_mprobe option * changed back some stuff outiside of monodomain project * same * again * fixed Thomas hints * removed old unneeded move coverage folders * fixed previously missed Thomas comments * begin change datatype * changed run_Monodomain * added prints * fixed prints * mod print * mod print * mod print * mod print * rading init val * rading init val * removed prints * removed prints * checking longer time * checking longer time * fixed call phi eval * trying 2D * trying 2D * new_data type passing tests * removed coverage folders * optmized phi eval lists * before changing phi type * changed eval phi lists * polished a bit * before switch indeces * reformatted phi computaiton to its traspose * before changing Q * optimized integral of exp terms * changed interfate to c++ code * moved definition of dtype u f * tests passed after code refactoring * Generic MPI FFT class (Parallel-in-Time#408) * Added generic MPIFFT problem class * Fixes * Generalized to `xp` in preparation for GPUs * Fixes * Ported Allen-Cahn to generic MPI FFT implementation * Ported Gray-Scott to generic MPI FFT (Parallel-in-Time#412) * Ported Gray-Scott to generic MPI FFT class * `np` -> `xp` * Reverted poor changes * Update README.md (Parallel-in-Time#413) Added the ExaOcean grant identified and the "Supported by the European Union - NextGenerationEU." clause that they would like us to display. * TIME-X Test Hackathon @ TUD: Test for `SwitchEstimator` (Parallel-in-Time#404) * Added piecewise linear interpolation to SwitchEstimator * Started with test for SwitchEstimator [WIP] * Test to proof sum_restarts when event occuring at boundary * Started with test to check adapt_interpolation_info [WIP] * Added test for SE.adapt_interpolation_info() * Update linear interpolation + logging + changing tolerances * Test for linear interpolation + update of other test * Correction for finite difference + adaption tolerance * Added test for DAE case for SE * Choice of FD seems to be important for performance of SE * Removed attributes from dummy probs (since the parent classes have it) * Test for dummy problems + using functions from battery_model.py * Moved standard params for test to function * Updated hardcoded solutions for battery models * Updated hardcoded solutions for DiscontinuousTestODE * Updated docu in SE for FDs * Lagrange Interpolation works better with baclward FD and alpha=0.9 * Added test for state function + global error * Updated LogEvent hooks * Updated hardcoded solutions again * Adapted test_problems.py * Minor changes * Updated tests * Speed-up test for buck converter * Black.. * Use msg about convergence info in Newton in SE * Moved dummy problem to file * Speed up loop using mask * Removed loop * SDC-DAE sweeper for semi-explicit DAEs (Parallel-in-Time#414) * Added SI-SDC-DAE sweeper * Starte with test for SemiImplicitDAE * Test for SI-SDC sweeper * Clean-up * Removed parameter from function * Removed test + changed range of loop in SI-sweeper --------- Co-authored-by: Robert Speck <[email protected]> Co-authored-by: Thomas Baumann <[email protected]> Co-authored-by: Thomas <[email protected]> Co-authored-by: Ikrom Akramov <[email protected]> Co-authored-by: Thibaut Lunet <[email protected]> Co-authored-by: Lisa Wimmer <[email protected]> Co-authored-by: Giacomo Rosilho de Souza <[email protected]> Co-authored-by: Daniel Ruprecht <[email protected]> commit 24cdf05 Author: Jakob Fritz <[email protected]> Date: Wed Apr 24 09:11:38 2024 +0200 Split installation and running into two jobs As one of the two jobs often failed during installation, while the other one succeeded. So it might be a race condition. Therefore, splitting installation and usage into separate jobs commit 488e7a4 Author: Jakob Fritz <[email protected]> Date: Wed Apr 24 08:34:59 2024 +0200 ci_pipeline.yml now more similar to upstream commit 9ab9b63 Author: Jakob Fritz <[email protected]> Date: Tue Apr 23 15:36:39 2024 +0200 Reduced diff to master commit cdb77d4 Author: jakob-fritz <[email protected]> Date: Mon Apr 22 16:46:44 2024 +0200 WIP: Use HPC for CI (Parallel-in-Time#386) Works on Parallel-in-Time#415 Added sync with Gitlab, now also for pull requests --------- Co-authored-by: Robert Speck <[email protected]> and Thomas Baumann <[email protected]> commit fb4b745 Author: Jakob Fritz <[email protected]> Date: Mon Apr 22 16:02:49 2024 +0200 Moved development of action into main branch and added version-tag commit 7de7187 Author: Jakob Fritz <[email protected]> Date: Mon Apr 22 11:19:53 2024 +0200 Added triggers for workflows again commit 5f45785 Author: Jakob Fritz <[email protected]> Date: Thu Apr 18 14:22:13 2024 +0900 Updated name of step, as merge is not ff-only anymore commit 2e9930f Author: Jakob Fritz <[email protected]> Date: Wed Apr 17 13:36:44 2024 +0900 Wrong syntax for if else commit e33a611 Author: Jakob Fritz <[email protected]> Date: Wed Apr 17 13:33:40 2024 +0900 Unshallow repo if needed commit c7db47a Author: Jakob Fritz <[email protected]> Date: Wed Apr 17 13:18:26 2024 +0900 Add name and email for merge-commit commit f34de9c Author: Jakob Fritz <[email protected]> Date: Wed Apr 17 12:09:20 2024 +0900 Also allow non-fast-forward merges commit 82d9233 Author: Jakob Fritz <[email protected]> Date: Wed Apr 17 11:49:56 2024 +0900 Don't run mirror on push now (as gitlab-file is incorrect in this branch) commit d1b7250 Author: Jakob Fritz <[email protected]> Date: Wed Apr 17 11:49:02 2024 +0900 Make unshallow before merging to properly compare history commit 9cfeea3 Author: Jakob Fritz <[email protected]> Date: Wed Apr 17 11:17:48 2024 +0900 Changed way to use variables (set locally and later in github_env) commit 6961ef3 Author: Jakob Fritz <[email protected]> Date: Tue Apr 16 16:31:51 2024 +0900 Reverted and changed way to store variable commit d906604 Author: Jakob Fritz <[email protected]> Date: Tue Apr 16 16:21:54 2024 +0900 Redone storing of var again commit faec097 Author: Jakob Fritz <[email protected]> Date: Tue Apr 16 14:50:56 2024 +0900 Corrected querying of a variable commit cbf0b5d Author: Jakob Fritz <[email protected]> Date: Tue Apr 16 13:57:31 2024 +0900 Added more reporting for better debugging commit efdaa05 Author: Jakob Fritz <[email protected]> Date: Tue Apr 16 13:23:08 2024 +0900 Don't run main CI during development commit ccd646a Author: Jakob Fritz <[email protected]> Date: Tue Apr 16 13:22:44 2024 +0900 First fetch, to be able to checkout branch commit 2712998 Author: Jakob Fritz <[email protected]> Date: Tue Apr 16 12:15:13 2024 +0900 Don't rerun CI on every push during this development commit 8a316e2 Author: Jakob Fritz <[email protected]> Date: Tue Apr 16 12:14:31 2024 +0900 Moved the check of condition from shell to yaml commit d347bd3 Author: Jakob Fritz <[email protected]> Date: Tue Apr 16 11:52:02 2024 +0900 Try to merge code (from PR) first So that merged state is tested in Gitlab-CI commit bcd64a5 Author: Jakob Fritz <[email protected]> Date: Mon Feb 5 11:25:43 2024 +0100 Use specific version of github2lab action commit 28472dc Author: Jakob Fritz <[email protected]> Date: Mon Jan 29 15:10:38 2024 +0100 Uses newer checkout-action to use new node-version (20) Version 16 is deprecated commit fefe88b Author: Jakob Fritz <[email protected]> Date: Mon Jan 29 14:53:18 2024 +0100 Minor formatting updates in README to trigger CI commit 3de1b56 Author: Jakob Fritz <[email protected]> Date: Fri Jan 26 16:13:53 2024 +0100 Formatted md-file to trigger CI commit ef6a866 Author: Jakob Fritz <[email protected]> Date: Thu Jan 18 15:48:25 2024 +0100 Set sha for checkout properly commit be3aef7 Author: Jakob Fritz <[email protected]> Date: Mon Jan 15 16:14:41 2024 +0100 Using default shallow checkout Otherwise, other own action complains commit f38f0e5 Author: Jakob Fritz <[email protected]> Date: Mon Jan 15 16:11:05 2024 +0100 Updated ref to use lastest code from PR; not merge Previously, a version of the code was used that was how a merge could look like. Now, the code is used as it is in the PR commit 249741b Author: Jakob Fritz <[email protected]> Date: Mon Jan 15 08:47:45 2024 +0100 Updated workflow for mirroring commit d8604b7 Author: Jakob Fritz <[email protected]> Date: Mon Jan 8 16:39:49 2024 +0100 Try exapnding the predefined variable commit c49accd Author: Jakob Fritz <[email protected]> Date: Mon Jan 8 16:37:10 2024 +0100 Another attempt to get the action to work commit 5e0118a Author: Jakob Fritz <[email protected]> Date: Mon Jan 8 16:28:51 2024 +0100 Hopefully now, variable is expanded instead using the name commit 832e7e5 Author: Jakob Fritz <[email protected]> Date: Mon Jan 8 16:07:29 2024 +0100 Exit instead of return needed Because exiting the shell instead of a function commit 5a5de4a Author: Jakob Fritz <[email protected]> Date: Mon Jan 8 12:00:55 2024 +0100 First version of CI to mirror pull_requests to Gitlab If someone with write-permissions triggered the workflow
I added a couple of new files and completed the readme documentation.