-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from ProjectTorreyPines/dev
Releasing v0.1.0
- Loading branch information
Showing
21 changed files
with
3,849 additions
and
257 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
align_assignment = true | ||
align_conditional = true | ||
align_matrix = true | ||
align_pair_arrow = true | ||
align_struct_field = true | ||
always_for_in = true | ||
always_use_return = true | ||
annotate_untyped_fields_with_any = false | ||
conditional_to_if = true | ||
for_in_replacement = "∈" | ||
format_docstrings = true | ||
import_to_using = true | ||
indent = 4 | ||
indent_submodule = true | ||
join_lines_based_on_source = true | ||
long_to_short_function_def = true | ||
margin = 88 | ||
normalize_line_endings = "unix" | ||
pipe_to_function_call = true | ||
remove_extra_newlines = true | ||
separate_kwargs_with_semicolon = true | ||
surround_whereop_typeparameters = true | ||
trailing_comma = true | ||
whitespace_in_kwargs = false | ||
whitespace_ops_in_indices = false | ||
whitespace_typedefs = true | ||
yas_style_nesting = true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/config.local | ||
/tmp | ||
/cache |
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Add patterns of files dvc should ignore, which could improve | ||
# the performance. Learn more at | ||
# https://dvc.org/doc/user-guide/dvcignore |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Format Check | ||
|
||
on: | ||
push: | ||
branches: ["master", "dev", "format"] | ||
pull_request: | ||
branches: ["master", "dev"] | ||
jobs: | ||
check: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
julia-version: [1.9.3] | ||
julia-arch: [x86] | ||
os: [ubuntu-latest] | ||
steps: | ||
- uses: julia-actions/setup-julia@latest | ||
with: | ||
version: ${{ matrix.julia-version }} | ||
|
||
- uses: actions/checkout@v1 | ||
- name: Install JuliaFormatter and format | ||
run: | | ||
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))' | ||
julia -e 'using JuliaFormatter; format(".", verbose=true)' | ||
- name: Format check | ||
run: | | ||
julia -e ' | ||
out = Cmd(`git diff --name-only`) |> read |> String | ||
if out == "" | ||
exit(0) | ||
else | ||
@error "Some files have not been formatted !!!" | ||
write(stdout, out) | ||
exit(1) | ||
end' |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,21 @@ | ||
# SOLPS2IMAS.jl | ||
|
||
Utility for loading data from existing SOLPS runs, including custom data in b2time.nc, from native SOLPS output format into IMAS | ||
![Format Check](https://github.com/ProjectTorreyPines/SOLPS2IMAS.jl/actions/workflows/format_check.yml/badge.svg) | ||
|
||
## OMAS structure notes | ||
|
||
(using xx for indices that do not matter) | ||
|
||
1. edge_profiles.ggd store data of quantities; edge_profiles.grid_ggd store data about the grid geometry | ||
2. For both ggd and grid_ggd, different slices are different slices in time. That is, what we were calling grid_number is actually time iteration number/index (say it). ggd[it].time and grid_ggd[it].time will store the time array value. | ||
3. grid_ggd[it] | ||
1. grid_ggd[it].space[xx].identifier.index needs to be selected based on grid type (1 for linear, 2 for cylinder, 4 for single null etc.) | ||
2. grid_ggd[it].grid_subset[xx] are various subsets like nodes, edges, cells etc. each with required index value at grid_ggd[it].grid_subset[xx].index | ||
3. grid_ggd[it].grid_subset[xx] properties are automatically generated for nodes, edges or cells but are required to be given for other kinds of subsets (like boundaries) | ||
4. ggd[it] | ||
1. ggd[it].electrons.<quantity>[xx].grid_subset_index needs to be mentioned to indicate whether the quantity is at a node, edge, or cell. | ||
2. ggd[it].electrons.<quantity>[xx].values store the actual value. | ||
4. ggd[it].electrons.<quantity>[xx].coefficients store interpolation function coefficients | ||
5. For multi-specie data, ggd[it].ions[xx].<quantity>[xx].values is used. For each species, ggd[it].ions[xx].element[:] is used to describe Z and charge state. | ||
|
||
## To-do: | ||
|
||
- [ ] Read atleast all electron properties. | ||
- [ ] Final function should accept one state/time file and one geometry file to return a OMAS.dd object. | ||
- [ ] Add support for boundary properties. | ||
- [ ] Add support for multi-species data. | ||
- [ ] Test using new [h5i2imas functionality](https://github.com/ProjectTorreyPines/OMAS.jl/commit/904562b4040c857260d832747d1ba46a2bf614f6) added to OMAS. | ||
- [ ] Expand testing to some self-consistency test of read data. | ||
Utility for loading data from existing SOLPS runs, including custom data in b2time.nc, | ||
from native SOLPS output format into IMAS | ||
|
||
## Running tests: | ||
|
||
Following code ensures it uses the enviroment described in ./Project.toml: | ||
|
||
``` | ||
(base) gupta@F-CJXNMY7L7 SOLPS2IMAS.jl % julia --project=./ ./test/runtests.jl | ||
it's the omas function | ||
another fun function!!!!!11!!!!! | ||
(base) gupta@F-CJXNMY7L7 SOLPS2IMAS.jl % julia --proje | ||
ct=./ test/runtests.jl | ||
solps2imas() time: 3.309287 seconds (9.92 M allocations: 666.357 MiB, 5.68% gc time, 71.71% compilation time) | ||
Test Summary: | Pass Total Time | ||
omasstuff | 4 4 6.9s | ||
hello there | ||
Test Summary: | Pass Total Time | ||
omasstuff | 3 3 2.5s | ||
utilities | 3 3 0.0s | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/b2fgmtry | ||
/b2fstate | ||
/b2time.nc | ||
/b2mn.dat |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# samples | ||
|
||
* The sample files with _red suffix have been reduced to save space. Some fields have been deleted and some arrays have been decimated. These files are suitable for limited testing only. | ||
* The sample files shown here with .dvc extension are stored in nfs mount through iris or omega. Run `dvc pull` to get the data files downloaded. Note that this will only work from inside the fusion network. See [TestSamples](https://github.com/ProjectTorreyPines/TestSamples#readme) for more details. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
md5: bcf05d7d7b6d91ef1025c0dc018c4bbf | ||
frozen: true | ||
deps: | ||
- path: ITER_Lore_2296_00000/baserun/b2fgmtry | ||
repo: | ||
url: git@github.com:ProjectTorreyPines/SOLPSTestSamples.git | ||
rev_lock: df499f1275428ec06175c48dc4af6ecbd5ec6117 | ||
outs: | ||
- md5: 6589953daeef49b21744d159af970cbb | ||
size: 2908856 | ||
hash: md5 | ||
path: b2fgmtry |
Oops, something went wrong.