Skip to content
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

PERK p2 #1871

Closed
wants to merge 76 commits into from
Closed

PERK p2 #1871

Show file tree
Hide file tree
Changes from 58 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
befd590
Templates for PERK p2, p3
DanielDoehring Jan 29, 2024
0b378f7
example
DanielDoehring Jan 29, 2024
42c74d1
constructor changed
warisa-r Feb 2, 2024
04784df
Modified so that both of the constructor stay
warisa-r Feb 2, 2024
3fcad2a
Merge pull request #20 from warisa-r/PERK_p2p3_Single
DanielDoehring Feb 2, 2024
55f4165
bring back eps
DanielDoehring Feb 8, 2024
6a31a0b
correct val
DanielDoehring Feb 8, 2024
87399dc
add constructor of PERK3
warisa-r Feb 14, 2024
e518386
minor fixes
warisa-r Feb 14, 2024
a1222d7
function and variable name adjustments
warisa-r Feb 15, 2024
483015b
spelling fix
warisa-r Feb 15, 2024
de86860
Merge branch 'PERK_p2p3_Single' into PERK_p2p3_Single
DanielDoehring Feb 16, 2024
6436708
Merge pull request #21 from warisa-r/PERK_p2p3_Single
DanielDoehring Feb 18, 2024
03f0af1
Change names and spacing according to style guide
warisa-r Mar 3, 2024
5a13446
Merge branch 'PERK_p2p3_Single' of github.com:warisa-r/Trixi.jl into …
warisa-r Mar 3, 2024
e182a89
spelling correction
warisa-r Mar 3, 2024
08b70d6
Apply suggestions from code review
warisa-r Mar 4, 2024
9881351
Merge pull request #24 from warisa-r/PERK_p2p3_Single
DanielDoehring Mar 5, 2024
bdb2db5
snake case
DanielDoehring Mar 5, 2024
19a1653
Merge branch 'PERK_p2p3_Single' of github.com:DanielDoehring/Trixi.jl…
DanielDoehring Mar 5, 2024
df4733d
revisit perk single p2 p3
DanielDoehring Mar 5, 2024
ee9e569
fmt
DanielDoehring Mar 5, 2024
32cbb1e
fmt
DanielDoehring Mar 5, 2024
be8ea21
Merge branch 'main' into PERK_p2p3_Single
DanielDoehring Mar 5, 2024
e3ec50c
semantic ordering
DanielDoehring Mar 5, 2024
fbcd6e3
add literature
DanielDoehring Mar 6, 2024
b1b6d7c
Strip code of p = 3
warisa-r Mar 6, 2024
33bb8da
Add the line to show the error of the elixir
warisa-r Mar 7, 2024
5f763bb
Make adjustments to a test file and delete example of PERK3
warisa-r Mar 8, 2024
9149b7b
Update Project.toml
warisa-r Mar 8, 2024
6c04331
Update examples/tree_1d_dgsem/elixir_advection_PERK2.jl
warisa-r Mar 8, 2024
0bafb7f
Add comments in an example of PERK2
warisa-r Mar 8, 2024
64926fb
Update src/Trixi.jl
warisa-r Mar 8, 2024
6ce99e6
Update src/time_integration/paired_explicit_runge_kutta/methods_PERK2.jl
warisa-r Mar 8, 2024
50cf650
Update src/time_integration/paired_explicit_runge_kutta/methods_PERK2.jl
warisa-r Mar 8, 2024
f48cf85
Update src/time_integration/paired_explicit_runge_kutta/methods_PERK2.jl
warisa-r Mar 8, 2024
e7060e5
Update src/time_integration/paired_explicit_runge_kutta/methods_PERK2.jl
warisa-r Mar 8, 2024
88e8168
add tspan as a parameter and adjust the elixir accordingly
warisa-r Mar 8, 2024
bb938d9
add an additional constructor and modify the function compute_PERK2_b…
warisa-r Mar 8, 2024
38f4fcb
Update src/time_integration/paired_explicit_runge_kutta/methods_PERK2.jl
warisa-r Mar 11, 2024
7619b2a
update filter function in polynomial optimizer, add literature, and c…
warisa-r Mar 12, 2024
98bfe13
Merge branch 'PERK_p2_Single' of github.com:warisa-r/Trixi.jl into PE…
warisa-r Mar 12, 2024
f2d9fa8
Apply suggestions from code review
warisa-r Mar 12, 2024
ccf4260
change tspan to have (,) instead of[,]. filter_eigenvalues minor adju…
warisa-r Mar 12, 2024
11e487c
Merge branch 'main' into PERK_p2_Single
DanielDoehring Mar 14, 2024
6cb0572
Apply suggestions from code review
warisa-r Mar 14, 2024
1f4e9d0
Update src/time_integration/paired_explicit_runge_kutta/polynomial_op…
DanielDoehring Mar 14, 2024
61da622
Apply suggestions from code review
DanielDoehring Mar 15, 2024
16ac4d5
Update src/time_integration/paired_explicit_runge_kutta/methods_PERK2.jl
DanielDoehring Mar 15, 2024
b3c12ee
Update src/time_integration/paired_explicit_runge_kutta/methods_PERK2.jl
DanielDoehring Mar 15, 2024
cb0ef29
Update src/time_integration/paired_explicit_runge_kutta/methods_PERK2.jl
DanielDoehring Mar 15, 2024
a1506a0
Apply suggestions from code review
DanielDoehring Mar 15, 2024
6fc11d5
use readdlm instead of read_file
warisa-r Mar 15, 2024
ef1f508
Update src/time_integration/paired_explicit_runge_kutta/methods_PERK2.jl
DanielDoehring Mar 15, 2024
5bb554a
add DelimFIles
DanielDoehring Mar 15, 2024
60cd20e
fmt
DanielDoehring Mar 15, 2024
8e850eb
Unit tests
DanielDoehring Mar 15, 2024
93f2ce5
Merge branch 'main' into PERK_p2_Single
DanielDoehring Mar 15, 2024
08faa0a
compat
DanielDoehring Mar 15, 2024
e17f7ad
ecos compat
DanielDoehring Mar 15, 2024
f3220e7
compat
DanielDoehring Mar 15, 2024
17096fe
compat
DanielDoehring Mar 15, 2024
01d04f2
compat
DanielDoehring Mar 15, 2024
44f413a
compat
DanielDoehring Mar 15, 2024
4ae2574
Merge branch 'main' into PERK_p2_Single
DanielDoehring Mar 15, 2024
3280fc1
callbacks
DanielDoehring Mar 15, 2024
4a3deda
increase allowed allocs
DanielDoehring Mar 17, 2024
a1da64e
fmt
DanielDoehring Mar 18, 2024
e804a63
timer for step callbacks
DanielDoehring Mar 18, 2024
214fa6a
deps compat
DanielDoehring Mar 18, 2024
443a162
remove del files compat
DanielDoehring Mar 18, 2024
247946b
skip delimitedfiles in downgrade compat
DanielDoehring Mar 18, 2024
1b3d4f6
v1
DanielDoehring Mar 18, 2024
1b94f83
Update src/time_integration/paired_explicit_runge_kutta/methods_PERK2.jl
DanielDoehring Mar 20, 2024
2ecb50f
Merge branch 'main' into PERK_p2_Single
DanielDoehring Mar 25, 2024
0d410e4
modular imp of the integrator
warisa-r Apr 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Project.toml
DanielDoehring marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ version = "0.7.4-pre"
[deps]
CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
Convex = "f65535da-76fb-5f13-bab9-19810c17039a"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
ECOS = "e2685f51-7e38-5353-a97d-a921fd2c8199"
EllipsisNotation = "da5c29d0-fa7d-589e-88eb-ea29b0a81949"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
Expand All @@ -20,6 +23,7 @@ LinearMaps = "7a12625a-238d-50fd-b39a-03d52299707e"
LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890"
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
MuladdMacro = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221"
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
Octavian = "6fd5a793-0b7e-452c-907f-f8bfe9c57db4"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
P4est = "7d669430-f675-4ae7-b43e-fab78ec5a902"
Expand Down
61 changes: 61 additions & 0 deletions examples/tree_1d_dgsem/elixir_advection_PERK2.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@

using OrdinaryDiffEq
using Trixi

###############################################################################
# semidiscretization of the linear advection equation

advection_velocity = 1.0
equations = LinearScalarAdvectionEquation1D(advection_velocity)

# Create DG solver with polynomial degree = 3 and (local) Lax-Friedrichs/Rusanov flux as surface flux
solver = DGSEM(polydeg = 3, surface_flux = flux_lax_friedrichs)

coordinates_min = -1.0 # minimum coordinate
coordinates_max = 1.0 # maximum coordinate

# Create a uniformly refined mesh with periodic boundaries
mesh = TreeMesh(coordinates_min, coordinates_max,
initial_refinement_level = 4,
n_cells_max = 30_000) # set maximum capacity of tree data structure

# A semidiscretization collects data structures and functions for the spatial discretization
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition_convergence_test,
solver)

###############################################################################
# ODE solvers, callbacks etc.

# Create ODE problem with time span from 0.0 to 1.0
ode = semidiscretize(semi, (0.0, 1.0));

# At the beginning of the main loop, the SummaryCallback prints a summary of the simulation setup
# and resets the timers
summary_callback = SummaryCallback()

# The AnalysisCallback allows to analyse the solution in regular intervals and prints the results
analysis_callback = AnalysisCallback(semi, interval = 100)

# The StepsizeCallback handles the re-calculation of the maximum Δt after each time step
stepsize_callback = StepsizeCallback(cfl = 2.5)

# Create a CallbackSet to collect all callbacks such that they can be passed to the ODE solver
callbacks = CallbackSet(summary_callback, analysis_callback,
stepsize_callback)

###############################################################################
# run the simulation

# Define tspan to calculate maximum time step allowed for the bisection algorithm used in calculate polynomial coefficients in ODE algorithm
tspan = (0.0, 1.0)

# Construct second order PERK method with 6 stages for
# given simulation setup
ode_algorithm = PERK2(6, tspan, semi)

sol = Trixi.solve(ode, ode_algorithm,
dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback
save_everystep = false, callback = callbacks);

# Print the timer summary
summary_callback()
2 changes: 2 additions & 0 deletions src/Trixi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ export trixi_include, examples_dir, get_examples, default_example,

export ode_norm, ode_unstable_check

export PERK2

export convergence_test, jacobian_fd, jacobian_ad_forward, linear_structure

export DGMulti, DGMultiBasis, estimate_dt, DGMultiMesh, GaussSBP
Expand Down
Loading
Loading