Skip to content

VolumeIntegralAdaptive with IndicatorEntropyChange#2754

Merged
ranocha merged 200 commits intotrixi-framework:mainfrom
DanielDoehring:VolumeIntegralAdaptive_Start
Feb 13, 2026
Merged

VolumeIntegralAdaptive with IndicatorEntropyChange#2754
ranocha merged 200 commits intotrixi-framework:mainfrom
DanielDoehring:VolumeIntegralAdaptive_Start

Conversation

@DanielDoehring
Copy link
Copy Markdown
Member

@DanielDoehring DanielDoehring commented Jan 20, 2026

Carved out from #2601 . Currently very similar to #468 and #2764

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

sol = solve(ode, CarpenterKennedy2N54(williamson_condition = false);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to switch to SSPRK43 here from your point of view?

DanielDoehring and others added 3 commits February 13, 2026 09:17
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
Comment on lines +286 to +301
VolumeIntegralAdaptive(;
volume_integral_default,
volume_integral_stabilized,
indicator = IndicatorEntropyChange())

!!! warning "Experimental code"
This code is experimental and may change in any future release.

Currently limited to `IndicatorEntropyChange()`.
"""
struct VolumeIntegralAdaptive{VolumeIntegralDefault, VolumeIntegralStabilized,
Indicator} <: AbstractVolumeIntegral
volume_integral_default::VolumeIntegralDefault # Cheap(er) default volume integral to be used in non-critical regions
volume_integral_stabilized::VolumeIntegralStabilized # More expensive volume integral with stabilizing effect
indicator::Indicator
end
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new version should also work for you @jlchan, right? we would then dispatch calc_volume_integral only on the indicator and could keep the stuff related to volume integrals fully general.

Copy link
Copy Markdown
Contributor

@jlchan jlchan Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! I actually also made the change recently in

Trixi.jl/src/solvers/dg.jl

Lines 309 to 315 in 97504dd

struct VolumeIntegralEntropyCorrection{VolumeIntegralDefault,
VolumeIntegralEntropyStable, Indicator} <:
AbstractVolumeIntegralShockCapturing
volume_integral_default::VolumeIntegralDefault
volume_integral_entropy_stable::VolumeIntegralEntropyStable
indicator::Indicator
end

Happy to unify things under VolumeIntegralAdaptive when it's ready.

Copy link
Copy Markdown
Member

@ranocha ranocha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks already quite good to me 👍

@ranocha
Copy link
Copy Markdown
Member

ranocha commented Feb 13, 2026

Please also note #2754 (comment)

DanielDoehring and others added 4 commits February 13, 2026 17:11
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
Copy link
Copy Markdown
Member

@ranocha ranocha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! I will merge this, assuming you add a bit of documentation explaining what the volume integral does in a subsequent PR.

@ranocha ranocha merged commit 9f4f60a into trixi-framework:main Feb 13, 2026
39 checks passed
@DanielDoehring DanielDoehring deleted the VolumeIntegralAdaptive_Start branch February 13, 2026 23:06
DanielDoehring added a commit to DanielDoehring/Trixi.jl that referenced this pull request Feb 19, 2026
…rk#2754)

* Make volume integral computation adaptive

* towards 2d

* simplify

* towards 2d

* try

* non  cons does not work with weak form

* example

* whiteapce

* vis

* Compute first mean, then entropy (much cheaper)

* move u mean

* benchmark

* comment

* work

* u_mean

* rm

* fmt

* shorten

* work

* shorten

* shorten

* move

* bt

* examples

* restz

* todo

* rename

* test

* fmt

* rm amr cap

* covergae

* SAVE Sol

* ex

* test vals

* Update test/test_tree_1d_euler.jl

* Update test/test_tree_1d_euler.jl

* rm int

* Update src/solvers/dgsem/calc_volume_integral.jl

Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>

* rev

* rev

* better indicator

* prototype

* ft

* fmt

* rm

* 3d test

* cont

* rename

* more examples

* cont

* Update src/solvers/dgsem/dgsem.jl

* Update src/solvers/dgsem_tree/indicators.jl

* 3d non std

* alive cb

* incr

* clean up

* shorten

* tests

* WF & SC

* ac

* 12.5

* restruct

* fix

* test more print

* Update src/solvers/dgsem_tree/indicators.jl

* Update src/solvers/dgsem_tree/indicators.jl

* Update src/solvers/dgsem_tree/indicators.jl

* safety check

* Update src/solvers/dgsem_tree/indicators.jl

* Update src/solvers/dg.jl

* change

* change

* jacobian

* use negative matrix

* investigate

* hllc

* jac business

* move indicator

* more indicators

* docstrings, test

* experiment threshold adjustment

* try clever update of target entropy decay

* rm example

* storage-computation tradeoff

* store entropy

* 3d sedov blast

* all reference

* update

* Adaptive & RRG

* update target decay

* idea

* try update again

* float

* params

* naca0012 NSF separation

* use sd7003 for separation example

* restart

* fi xorder cbs

* rm save sol

* restart

* add

* run longer non-ref

* rev

* check with AMR 3

* remove `calc_entropy_delta`: Trade computations for storage

* rm update

* 2 lvl indicator

* change

* toml

* rm

* conclude sd7003 sim

* compare runtimes

* rename

* reduce to entropy diffusion

* linear stab

* reference

* fix

* test vals

* Update src/callbacks_step/analysis_dg2d.jl

Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>

* comments

* Update src/solvers/dgsem/calc_volume_integral.jl

Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>

* safe guarding

* comment

* cfl

* rename

* make more similar to Jessse PR

* move comment

* fix

* fix

* comments

* adapt to jesse info

* docstrings

* fix

* export

* rename

* fix

* fix

* comment

* Update src/solvers/dgsem/indicators.jl

Co-authored-by: Jesse Chan <1156048+jlchan@users.noreply.github.com>

* retrieve

* exchange

* Update src/equations/compressible_euler_2d.jl

* ii => i

* bcs

* mesh periodi

* move create cache

* Apply suggestions from code review

Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>

* Fix

* rm defaults

* generalize comments

* comments

* format

* Update src/solvers/dg.jl

Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>

* change

* Update src/solvers/dg.jl

Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>

---------

Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com>
Co-authored-by: Jesse Chan <1156048+jlchan@users.noreply.github.com>
Co-authored-by: Hendrik Ranocha <mail@ranocha.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants