Repository navigation
magnetics! on an IDS without data; mesher_heat_flux: levels as a vector, midplane point, closing abscissa - #328
Merged
Merged
Conversation
`AbstractTrees.Leaves` of an IDS without data yields the IDS itself (as it does for an empty element of an array of structures), which has no `field`: `magnetics!(mag, eq)` raised `type magnetics has no field field` on a dd without magnetics data instead of doing nothing. Only field leaves are looked at now, as in `time_groups` and `time_dependent_leaves`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- With `levels` a vector and `merge_wall = true` (the default) the function raised `UndefVarError: eqt2d`: the 2D equilibrium was looked up only in the branch that builds the levels from a number. - The first level is set to the separatrix; this was written into the caller's vector. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…he mesh `(r_wall_midplane, Z0) in (Rwall, Zwall)` looks for the pair among the two vectors, so it was always false and the point was always prepended: when the mesh already has that point it was there twice. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The closing point was appended to the mesh before the length of the closing segment was computed, from the first and the (new) last point: the segment had zero length in `s`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes in
magnetics!and in the wall mesh of the heat fluxes, one commit each.magnetics!: IDS without data.AbstractTrees.Leavesof an IDS without data yields the IDS itself, which has nofield, somagnetics!(mag, eq)raisedtype magnetics has no field fieldon a dd without magnetics data (FUSE's ActorMagnetics on a machine without probes) instead of doing nothing. Only field leaves are looked at now, as intime_groupsandtime_dependent_leaves.mesher_heat_flux: psi levels given as a vector.levelsa vector andmerge_wall = true(the default) the function raisedUndefVarError: eqt2d: the 2D equilibrium was looked up only in the branch that builds the levels from a number;mesher_heat_flux: outer midplane point.(r_wall_midplane, Z0) in (Rwall, Zwall)looks for the pair among the two vectors, so it was always false and the point was always prepended, also when the mesh already has it.mesher_heat_flux: abscissa of the closing point. The closing point was appended to the mesh before the length of the closing segment was computed, from the first and the (new) last point, so the last segment had zero length ins.Effect
On the dds of
FUSE.initfor ITER (from scalars), D3D and FPP:magnetics!, ITER and FPP (no magnetics data)magnetics!, D3D (76 probes, 44 flux loops)mesher_heat_flux(dd; levels=<vector>)UndefVarErrormesher_heat_flux(dd),merge_walltrue and false:Rwall,Zwalls[end]s[end-1]None of the three meshes holds the outer midplane point before it is added, so fix 3 changes nothing there.
sis used by the plot recipes of the heat flux (the abscissa of the 1D plots).Tests
runtests_interpolations.jl,magnetics!: a second call replaces the synthetic data; an IDS without data stays empty.runtests_smoke.jl,thermal_loads.jl: the mesh is closed and its last abscissa includes the closing segment; the outer midplane point is in the mesh once; levels given as a vector (with and without the wall) give the mesh they were taken from and are not changed.runtests_smoke.jl,runtests_interpolations.jlandruntests_fluxsurfaces.jlpass locally.🤖 Generated with Claude Code