From f1fae8247c9625e91dddab45914c0dae4999dec6 Mon Sep 17 00:00:00 2001 From: Daniel_Doehring Date: Mon, 9 Sep 2024 10:44:24 +0200 Subject: [PATCH 1/4] Remove `semi` AnalysisSurfaceIntegral --- .../elixir_euler_NACA0012airfoil_mach085.jl | 4 ++-- examples/p4est_2d_dgsem/elixir_euler_subsonic_cylinder.jl | 4 ++-- .../elixir_navierstokes_NACA0012airfoil_mach08.jl | 8 ++++---- src/callbacks_step/analysis_surface_integral_2d.jl | 4 +--- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/examples/p4est_2d_dgsem/elixir_euler_NACA0012airfoil_mach085.jl b/examples/p4est_2d_dgsem/elixir_euler_NACA0012airfoil_mach085.jl index 45b750728c9..638aff1b10c 100644 --- a/examples/p4est_2d_dgsem/elixir_euler_NACA0012airfoil_mach085.jl +++ b/examples/p4est_2d_dgsem/elixir_euler_NACA0012airfoil_mach085.jl @@ -85,11 +85,11 @@ analysis_interval = 2000 l_inf = 1.0 # Length of airfoil force_boundary_names = (:AirfoilBottom, :AirfoilTop) -drag_coefficient = AnalysisSurfaceIntegral(semi, force_boundary_names, +drag_coefficient = AnalysisSurfaceIntegral(force_boundary_names, DragCoefficientPressure(aoa(), rho_inf(), u_inf(equations), l_inf)) -lift_coefficient = AnalysisSurfaceIntegral(semi, force_boundary_names, +lift_coefficient = AnalysisSurfaceIntegral(force_boundary_names, LiftCoefficientPressure(aoa(), rho_inf(), u_inf(equations), l_inf)) diff --git a/examples/p4est_2d_dgsem/elixir_euler_subsonic_cylinder.jl b/examples/p4est_2d_dgsem/elixir_euler_subsonic_cylinder.jl index 21df724da4d..4fb62d358dd 100644 --- a/examples/p4est_2d_dgsem/elixir_euler_subsonic_cylinder.jl +++ b/examples/p4est_2d_dgsem/elixir_euler_subsonic_cylinder.jl @@ -89,11 +89,11 @@ rho_inf = 1.4 u_inf = 0.38 l_inf = 1.0 # Diameter of circle -drag_coefficient = AnalysisSurfaceIntegral(semi, (:x_neg,), +drag_coefficient = AnalysisSurfaceIntegral((:x_neg,), DragCoefficientPressure(aoa, rho_inf, u_inf, l_inf)) -lift_coefficient = AnalysisSurfaceIntegral(semi, (:x_neg,), +lift_coefficient = AnalysisSurfaceIntegral((:x_neg,), LiftCoefficientPressure(aoa, rho_inf, u_inf, l_inf)) diff --git a/examples/p4est_2d_dgsem/elixir_navierstokes_NACA0012airfoil_mach08.jl b/examples/p4est_2d_dgsem/elixir_navierstokes_NACA0012airfoil_mach08.jl index 40baef6ef96..43ce7ac1ed6 100644 --- a/examples/p4est_2d_dgsem/elixir_navierstokes_NACA0012airfoil_mach08.jl +++ b/examples/p4est_2d_dgsem/elixir_navierstokes_NACA0012airfoil_mach08.jl @@ -120,23 +120,23 @@ summary_callback = SummaryCallback() analysis_interval = 2000 force_boundary_names = (:AirfoilBottom, :AirfoilTop) -drag_coefficient = AnalysisSurfaceIntegral(semi, force_boundary_names, +drag_coefficient = AnalysisSurfaceIntegral(force_boundary_names, DragCoefficientPressure(aoa(), rho_inf(), u_inf(equations), l_inf())) -lift_coefficient = AnalysisSurfaceIntegral(semi, force_boundary_names, +lift_coefficient = AnalysisSurfaceIntegral(force_boundary_names, LiftCoefficientPressure(aoa(), rho_inf(), u_inf(equations), l_inf())) -drag_coefficient_shear_force = AnalysisSurfaceIntegral(semi, force_boundary_names, +drag_coefficient_shear_force = AnalysisSurfaceIntegral(force_boundary_names, DragCoefficientShearStress(aoa(), rho_inf(), u_inf(equations), l_inf())) -lift_coefficient_shear_force = AnalysisSurfaceIntegral(semi, force_boundary_names, +lift_coefficient_shear_force = AnalysisSurfaceIntegral(force_boundary_names, LiftCoefficientShearStress(aoa(), rho_inf(), u_inf(equations), diff --git a/src/callbacks_step/analysis_surface_integral_2d.jl b/src/callbacks_step/analysis_surface_integral_2d.jl index e22d8b14e94..2b5790e9fb0 100644 --- a/src/callbacks_step/analysis_surface_integral_2d.jl +++ b/src/callbacks_step/analysis_surface_integral_2d.jl @@ -20,7 +20,6 @@ For instance, this can be used to compute the lift [`LiftCoefficientPressure`](@ drag coefficient [`DragCoefficientPressure`](@ref) of e.g. an airfoil with the boundary name `:Airfoil` in 2D. -- `semi::Semidiscretization`: Passed in to retrieve boundary condition information - `boundary_symbols::NTuple{NBoundaries, Symbol}`: Name(s) of the boundary/boundaries where the quantity of interest is computed - `variable::Variable`: Quantity of interest, like lift or drag @@ -29,8 +28,7 @@ struct AnalysisSurfaceIntegral{Variable, NBoundaries} variable::Variable # Quantity of interest, like lift or drag boundary_symbols::NTuple{NBoundaries, Symbol} # Name(s) of the boundary/boundaries - function AnalysisSurfaceIntegral(semi, - boundary_symbols::NTuple{NBoundaries, Symbol}, + function AnalysisSurfaceIntegral(boundary_symbols::NTuple{NBoundaries, Symbol}, variable) where {NBoundaries} return new{typeof(variable), NBoundaries}(variable, boundary_symbols) end From 1aac63d54cc56d212131eed7ad4a2bfe631850b9 Mon Sep 17 00:00:00 2001 From: Daniel_Doehring Date: Tue, 10 Sep 2024 08:54:34 +0200 Subject: [PATCH 2/4] News entry --- NEWS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS.md b/NEWS.md index 9371cafa07f..242a7580dbf 100644 --- a/NEWS.md +++ b/NEWS.md @@ -11,6 +11,9 @@ for human readability. - The AMR routines for `P4estMesh` and `T8codeMesh` were changed to work on the product of the Jacobian and the conserved variables instead of the conserved variables only to make AMR fully conservative ([#2028]). This may change AMR results slightly. +- We removed the first argument `semi` corresponding to a `Semidiscretizaion` from the + `AnalysisSurfaceIntegral` constructor, as it is no longer needed (see [#1959]). + The `AnalysisSurfaceIntegral` now only takes the arguments `boundary_symbols` and `variable`. ([#2069]) ## Changes when updating to v0.8 from v0.7.x From bac6d0859b26d9bc1dc6de2af3be062019e81857 Mon Sep 17 00:00:00 2001 From: Daniel_Doehring Date: Wed, 11 Sep 2024 08:51:38 +0200 Subject: [PATCH 3/4] correct news --- NEWS.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index 242a7580dbf..983da6a9c80 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,14 @@ Trixi.jl follows the interpretation of [semantic versioning (semver)](https://ju used in the Julia ecosystem. Notable changes will be documented in this file for human readability. +## Changes when updating to v0.9 from v0.8.x + +#### Changed + +- We removed the first argument `semi` corresponding to a `Semidiscretizaion` from the + `AnalysisSurfaceIntegral` constructor, as it is no longer needed (see [#1959]). + The `AnalysisSurfaceIntegral` now only takes the arguments `boundary_symbols` and `variable`. ([#2069]) + ## Changes in the v0.8 lifecycle #### Changed @@ -11,9 +19,6 @@ for human readability. - The AMR routines for `P4estMesh` and `T8codeMesh` were changed to work on the product of the Jacobian and the conserved variables instead of the conserved variables only to make AMR fully conservative ([#2028]). This may change AMR results slightly. -- We removed the first argument `semi` corresponding to a `Semidiscretizaion` from the - `AnalysisSurfaceIntegral` constructor, as it is no longer needed (see [#1959]). - The `AnalysisSurfaceIntegral` now only takes the arguments `boundary_symbols` and `variable`. ([#2069]) ## Changes when updating to v0.8 from v0.7.x From 9df3e6fb0e89f7de80ff73917d85fe12d2623afe Mon Sep 17 00:00:00 2001 From: Daniel Doehring Date: Wed, 11 Sep 2024 10:46:40 +0200 Subject: [PATCH 4/4] Update NEWS.md --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 983da6a9c80..777dc56021c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -8,7 +8,7 @@ for human readability. #### Changed -- We removed the first argument `semi` corresponding to a `Semidiscretizaion` from the +- We removed the first argument `semi` corresponding to a `Semidiscretization` from the `AnalysisSurfaceIntegral` constructor, as it is no longer needed (see [#1959]). The `AnalysisSurfaceIntegral` now only takes the arguments `boundary_symbols` and `variable`. ([#2069])