Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the capability to check whether a B-series is energy-preserving (#…
…117) * comentario * requested changes to the PR: added function for bseries 'BSeries_Energy_Preserving', translated comments into English, erased two packages, changed the name of some variables and flags. * generalized the function 'bush_detector_ for any iniital index. Changed the name of 'adjoint()' for 'rightmost_energy_preserving_tree()' * added the files 'examples.jl' with four examples; also added the file for the code of the CSRK project. * simplified the function 'symfact_normalization', and realized that the only function taken from 'Combinatorics' is 'permutations'. * added docstrings. Deleted the function 'BMinus'. Eliminated the variable 'signal' from the main functions. Renamed the function 'IsEnergyPreserving' for 'energy_preserving_trees_test' * added docstrings and modified the CSRK.jl. Added tests to the runtests.jl * added Energy_Preserving.jl to src * fixed first function in CSRK.jl * added a module in Energy_Preserving.jl. In the file 'BSeries.jl' I added the lines 'include("Energy_Preserving.jl")', 'using .Energy_Preserving', and 'export OrderMethod' * added 'include("Energy_Preserving.jl")' to the BSeries file, and wrote 'export Energy_Preserving.OrderMethod' and 'using Energy_Preserving' * Committing local changes * added the code of Energy_Preserving to src/BSeries.jl * removed files from this branch: examples.jl, Energy_Preserving.jl and CSRK.jl * removed the file 'src/Energ_Preserving.jl' * Modified the docstring and added main reference for 'is_energy_preserving' * added the line 'export is_energy_preserving, OrderMethod' * removed Revise from the file 'Project.toml' * changes in BSeries.jl: changed the name of 'OrderMethod', added the functoin 'permutations' from Combinatorics * removed Combinatorics from dependencies * Modifications so that the 5 tests passed * changed the version of Combinatorics to "1" * Update src/BSeries.jl Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com> * Update src/BSeries.jl Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com> * moved the line of Combinatorics alphabetically Please enter the commit message for your changes. Lines starting * changed docstrngs in secondary functions for comments * removed comments from renormalize_bseries and used 'eachindex' Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com> * several modifications, but the tests still passed. changed dictionaries for arrays, renamed some as 'ribs', and made the code shorter. * changed dictionaries for arrays, used the word 'ribs' for some variables and eliminated the function 'reverse_leafs' * eliminated the function 'get_permutations' * modified the function 'renormalize_bseries!' so that it receives a bseries and modifies it. Also, added docstring and exported this function. * added the 'max_order' parameter to 'energ_preserving_order(A,b,max_order)' * modified the function 'energy_preserving_order' so that its input is a rk method. Then, also modified the runtests file * added references to RK methods in the tests * changed 'spine/ribs' for 'trunk/branch' * modified the function 'is_energy_preserving' to iterate over each order instead of all the trees every time * added comments to the new functino 'low_order_energy_preserving' * added 'assert'. Deleted 'add_one_to_the_left' function and fixed ortography issues * put the function 'get_trunk' inside the function 'get_branches', so that this is only one function now. * modified the function 'equivalent_trees': now its faster and the function 'is_energy_preserving' is really fast for order 10 * changed variables names in the function 'equivalent_trees' * modified the 'runtest' file for higher orders for the AVF method * modified the comments about the function 'low_order_energy_preserving' * format * format * fix typo --------- Co-authored-by: David Ketcheson <dketch@gmail.com> Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
- Loading branch information