Skip to content

Commit

Permalink
Merge branch 'main' into macro
Browse files Browse the repository at this point in the history
  • Loading branch information
huiyuxie authored Oct 3, 2024
2 parents bd2269d + fa43fb2 commit 6c45ddf
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/typos@v1.24.3
uses: crate-ci/typos@v1.25.0
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `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])

## Changes in the v0.8 lifecycle

#### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
4 changes: 2 additions & 2 deletions examples/p4est_2d_dgsem/elixir_euler_subsonic_cylinder.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
5 changes: 1 addition & 4 deletions examples/tree_1d_dgsem/elixir_burgers_rarefaction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ end
###############################################################################
# Specify non-periodic boundary conditions

function inflow(x, t, equations::InviscidBurgersEquation1D)
return initial_condition_rarefaction(coordinate_min, t, equations)
end
boundary_condition_inflow = BoundaryConditionDirichlet(inflow)
boundary_condition_inflow = BoundaryConditionDirichlet(initial_condition_rarefaction)

function boundary_condition_outflow(u_inner, orientation, normal_direction, x, t,
surface_flux_function,
Expand Down
5 changes: 1 addition & 4 deletions examples/tree_1d_dgsem/elixir_burgers_shock.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ end
###############################################################################
# Specify non-periodic boundary conditions

function inflow(x, t, equations::InviscidBurgersEquation1D)
return initial_condition_shock(coordinate_min, t, equations)
end
boundary_condition_inflow = BoundaryConditionDirichlet(inflow)
boundary_condition_inflow = BoundaryConditionDirichlet(initial_condition_shock)

function boundary_condition_outflow(u_inner, orientation, normal_direction, x, t,
surface_flux_function,
Expand Down
4 changes: 1 addition & 3 deletions src/callbacks_step/analysis_surface_integral_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6c45ddf

Please sign in to comment.