-
Notifications
You must be signed in to change notification settings - Fork 0
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
Releasing v.0.2.0 #31
Conversation
- Find gridlines by starting at inner boundary of existing mesh and following gradients of psi_N. Stop at regular intervals to get nodes in the new mesh. - Modify steepest descent path near secondary X-point - The path that is probably meant to go through the secondary X-point will miss the secondary X-point if there's any numerical error (so, always) - Instead, find the X-point (a proposed change to EFIT.jl does this, but we can move that function back to SD4SOLPS if EFIT.jl doesn't accept it) and draw a line from the secondary X-point to the closest vertex on the inner edge of the mesh, replacing the whacky curved path that almost hits the X-point. - At this point, some of the cells are outside the limiting surface
- Add documentation to edge mesh extension functions - JSON instead of YAML: turning the matrices back into matrices is easier this way
- Fix indexing of spaces - Clean up loops - Reduce some function interfaces
Mesh extension
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test is failing and we have to determine if the mesh extension cell connection bug (seen in GGDUtils example notebook plots) is still present, and if so, fix it.
Test failure:
est Summary: | Pass Total Time
core_profile_extension | 9 9 17.8s
Slice #1 already has a rho_tor_norm profile; skipping
Rho has been added to the equilibrium
cleared ext mesh cache: /home/eldond/.julia/dev/SD4SOLPS/src/../data/__home__eldond__.julia__dev__SD4SOLPS__src__..__sample__ITER_Lore_2296_00000__EQDSK__g002296.00200___home__eldond__.julia__dev__SD4SOLPS__src__..__sample__ITER_Lore_2296_00000__EQDSK__g002296.00200.mesh_ext.json
there are 1 secondary x points
# deleted edges = 9636
edge_profile_extension: Test Failed at /home/eldond/.julia/dev/SD4SOLPS/test/runtests.jl:252
Expression: all(all_indices .== all_indices_reconstruct)
Stacktrace:
[1] macro expansion
@ ~/.julia/juliaup/julia-1.9.4+0.x64.linux.gnu/share/julia/stdlib/v1.9/Test/src/Test.jl:478 [inlined]
[2] macro expansion
@ ~/.julia/dev/SD4SOLPS/test/runtests.jl:252 [inlined]
[3] macro expansion
@ ~/.julia/juliaup/julia-1.9.4+0.x64.linux.gnu/share/julia/stdlib/v1.9/Test/src/Test.jl:1498 [inlined]
[4] top-level scope
@ ~/.julia/dev/SD4SOLPS/test/runtests.jl:223
Test Summary: | Pass Fail Total Time
edge_profile_extension | 20 1 21 21.8s
ERROR: LoadError: Some tests did not pass: 20 passed, 1 failed, 0 errored, 0 broken.
in expression starting at /home/eldond/.julia/dev/SD4SOLPS/test/runtests.jl:220
add_subset_element!(all_nodes_sub, space_idx, node_dim, node_idx) | ||
|
||
# Edges | ||
if (i > 1) & (i != cut) # i-1 to i in the npol direction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This, or a place like it, is probably where the error in the mesh extension is entering. The error is visible in the example notebooks for GGDUtils and SynthDiag.
end | ||
|
||
# Cells | ||
if (i > 1) & (i != cut) & (j > 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another possible oopsie location for connecting the extended mesh
if isfile(cached_ext_name) | ||
# md = YAML.load_file(cached_ext_name) | ||
md = JSON.parsefile(cached_ext_name) | ||
pfr_transition = md["pfr_transition"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh oh, I could have cached an error. I'm not sure if I set an expiration for caches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On that note, the sample files might've been generated by a buggy version and saved, whereas the current version might be okay. Beyond where the bug is, I'm not sure WHEN the bug is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if the bug is still present, it remains that the sample files were written with the bug active and so are problematic, but we just merged new versions of the affected repos. Whoops.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is because the error was cached. I see this issue in fresh clones of the repo. The GGDUtils plotting recipe does not do any calculations. The misconnected cells are present in the ids so it is plotting them.
# connections should be nice and simple. | ||
# The PFR flag needs to be respected; pfr nodes don't connect to non-pfr nodes | ||
pfr = rzpi.(mesh_r[:, 1], mesh_z[:, 1]) .< 1 | ||
pfr_transition = argmax(abs.(diff(pfr))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There could be an off by one indexing issue here.
The test is failing because the EFIT package registered with Julia registry is not up to date with the EFIT git repo where x_point code is present. To resolve this issue, in your SD4SOLPS directory, do following:
This should fix the issue in the test case. |
Since this repo is not a dependency of any other repo, all other version upgrades are still valid and this mesh extension issue does not affect them. |
But they have, within them, links to DVC repos at specific commits, right? Or are the DVC repos not set to specific commits and you can update them? Anyway, the sample files that are in there now are wrong. |
That did not fix it. Maybe it's because I updated to julia 1.9.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh. Test passes. All I have to do is check out the right branch.
The other branch I'm developing has the fix to the extended mesh split. I DID fix it, but it hasn't made it to dev yet, so of course you don't have it. All right, go ahead with this for now, unless you want to cherry-pick cd641ae
* makefile has been added to allow easier creation of working environment * README has been updated to guide the user through the process of creating a working environment and added links to setup and demonstration wiki.
Adding documentation with example, installation instructions
Feature changes
Internal changes