Skip to content
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

Ion particle fluxes #672

Merged
merged 8 commits into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 9 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ using Pkg;\
Pkg.activate();\
Pkg.develop([["FUSE"] ; fuse_packages]);\
Pkg.add(["JuliaFormatter", "Test", "Plots"]);\
Pkg.activate(".");\
Pkg.develop(fuse_packages);\
'
@make revise

Expand Down Expand Up @@ -192,10 +190,10 @@ Pkg.activate("./docs");\
Pkg.develop(["FUSE"; fuse_packages])'

# install FUSE without using the registry
install_no_registry: forward_compatibility registry clone_pull_all develop
install_no_registry: registry clone_pull_all develop

# install FUSE using the registry (requires registry to be up-to-date, which most likely are not! Don't use!)
install_via_registry: forward_compatibility registry develop
install_via_registry: registry develop

# install used by CI (add packages, do not dev them)
install_ci_add: registry https_add
Expand All @@ -206,25 +204,15 @@ install: install_no_registry

# update_all, a shorthand for install and precompile
update_all: install
@julia -e 'using Pkg; Pkg.resolve(); Pkg.activate("."); Pkg.resolve(); Pkg.update(); Pkg.precompile()'
@julia -e 'using Pkg; Pkg.resolve(); Pkg.update(); Pkg.precompile()'

# update, a synonim of clone_pull and develop
update: forward_compatibility clone_pull_all develop resolve
update: clone_pull_all develop resolve

# resolve the current environment (eg. after manually adding a new package)
resolve:
@julia -e 'using Pkg; Pkg.resolve(); Pkg.activate("."); Pkg.resolve(); Pkg.precompile()'
@julia -e 'using Pkg; Pkg.resolve(); Pkg.precompile()'

# delete local packages that have become obsolete
forward_compatibility:
@julia -e '\
using Pkg;\
for package in ("Equilibrium", "Broker", "ZMQ", "FUSE_GA");\
try; Pkg.activate(); Pkg.rm(package); catch; end;\
try; Pkg.activate("."); Pkg.rm(package); catch; end;\
try; Pkg.activate("./docs"); Pkg.rm(package); catch; end;\
end;\
'
# undo --single-branch clones of git repos
undo_single_branch:
$(foreach package,$(FUSE_PACKAGES_MAKEFILE),cd ../$(package)/; echo `pwd`; git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"; git fetch origin;)
Expand Down Expand Up @@ -442,9 +430,11 @@ endif

# run julia using the Manifest_CI.toml
manifest_ci:
@TEMP_DIR=$$(mktemp -d /var/tmp/manifest_ci.XXXXXX) && echo $$TEMP_DIR &&\
@TEMP_DIR=$$(mktemp -d /var/tmp/manifest_ci.XXXXXX) &&\
echo $$TEMP_DIR &&\
sed "s/git@/https:\\/\\//g" Manifest_CI.toml > $$TEMP_DIR/Manifest.toml && \
cd $$TEMP_DIR && julia -i -e 'using Pkg; Pkg.activate("."); Pkg.instantiate()'
cd $$TEMP_DIR &&\
julia -i -e 'using Pkg; Pkg.activate("."); Pkg.instantiate()'

# remove all Manifest.toml files
rm_manifests:
Expand Down
16 changes: 0 additions & 16 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,23 @@ authors = ["Orso Meneghini <[email protected]>"]
version = "0.1.4"

[deps]
ADAS = "f4a0d185-1024-41e7-8ef7-3196bb2f6549"
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
BoundaryPlasmaModels = "2da5b0d0-c5e5-4f14-9caf-62d0020df410"
CHEASE = "40781a8e-f1bb-11ec-24ef-0f6bc40c1567"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
ClusterManagers = "34f1f09b-3a8b-5176-ab39-66d58a4d544e"
CoordinateConventions = "7204ce3a-f536-43d2-be4a-fbed74e90d86"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
EPEDNN = "e64856f0-3bb8-4376-b4b7-c03396503991"
FXP = "e356478e-5a30-45f6-9775-70cc66e4fbd4"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
FiniteElementHermite = "6ce10167-d368-4c0e-af34-9787cdd175e5"
Fortran90Namelists = "8fb689aa-71ff-4044-8071-0cffc910b57d"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
FuseUtils = "c8e4ee58-0bec-4a6a-b552-9dd24d6374ac"
FusionMaterials = "4c86da02-02c8-4634-8460-96566129f8e0"
GeoInterface = "cf35fbd7-0cd7-5166-be24-54bfbe79505f"
IMAS = "13ead8c1-b7d1-41bb-a6d0-5b8b65ed587a"
IMASDD = "06b86afa-9f21-11ec-2ef8-e51b8960cfc5"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
Expand All @@ -38,9 +32,7 @@ Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
LoggingExtras = "e6f89c97-d47a-5376-807f-9c37f3926c36"
MXHEquilibrium = "8efa4e5a-7b9a-4eec-876e-01d13d5b5d75"
Memoize = "c03570c3-d221-55d1-a50c-7939bbd78826"
MeshTools = "804828d9-b4e9-4eca-b847-748d6c7bafa9"
Metaheuristics = "bcdb8e00-2c21-11e9-3065-2b553b22f898"
MillerExtendedHarmonic = "c82744c2-dc08-461a-8c37-87ab04d0f9b8"
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
NEO = "081d0416-0f87-42c0-8034-5895805e76d8"
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
Expand Down Expand Up @@ -70,27 +62,21 @@ Weave = "44d3d7a6-8a23-5bf8-98c5-b353f8df5ec9"
YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"

[compat]
ADAS = "1"
AbstractTrees = "0.4"
BoundaryPlasmaModels = "1.0"
CHEASE = "1.0"
CSV = "0.10"
ClusterManagers = "0.4"
CoordinateConventions = "1"
DataFrames = "1"
DelimitedFiles = "1"
DifferentialEquations = "7"
EPEDNN = "1"
FXP = "1"
FileIO = "1"
FiniteElementHermite = "1"
Fortran90Namelists = "0.1"
ForwardDiff = "0.10"
FuseUtils = "1.1"
FusionMaterials = "1"
GeoInterface = "1"
IMAS = "1"
IMASDD = "1"
Interpolations = "0.15"
JSON = "0.21"
JpegTurbo = "0.1"
Expand All @@ -99,9 +85,7 @@ LibGEOS = "0.9"
LoggingExtras = "1"
MXHEquilibrium = "1"
Memoize = "0.4"
MeshTools = "1"
Metaheuristics = "3"
MillerExtendedHarmonic = "1"
ModelingToolkit = "9"
NEO = "1"
NLsolve = "4"
Expand Down
1 change: 0 additions & 1 deletion src/actors/current/qed_actor.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import QED
import FiniteElementHermite

#= ======== =#
# ActorQED #
Expand Down
6 changes: 3 additions & 3 deletions src/actors/transport/neoclassical_actor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ function _finalize(actor::ActorNeoclassical)

if par.model == :changhinton
model.identifier.name = "Chang-Hinton"
IMAS.flux_gacode_to_fuse([:ion_energy_flux], actor.flux_solutions, m1d, eqt, cp1d)
IMAS.flux_gacode_to_fuse((:ion_energy_flux,), actor.flux_solutions, m1d, eqt, cp1d)

elseif par.model == :neo
model.identifier.name = "NEO"
IMAS.flux_gacode_to_fuse([:ion_energy_flux, :electron_energy_flux, :electron_particle_flux], actor.flux_solutions, m1d, eqt, cp1d)
IMAS.flux_gacode_to_fuse((:electron_energy_flux, :ion_energy_flux, :electron_particle_flux, :ion_particle_flux, :momentum_flux), actor.flux_solutions, m1d, eqt, cp1d)

elseif par.model == :hirshmansigmar
model.identifier.name = "Hirshman-Sigmar"
IMAS.flux_gacode_to_fuse([:ion_energy_flux, :electron_energy_flux, :electron_particle_flux], actor.flux_solutions, m1d, eqt, cp1d)
IMAS.flux_gacode_to_fuse((:electron_energy_flux, :ion_energy_flux, :electron_particle_flux, :ion_particle_flux), actor.flux_solutions, m1d, eqt, cp1d)
end

return actor
Expand Down
2 changes: 1 addition & 1 deletion src/actors/transport/qlgyro_actor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function _finalize(actor::ActorQLGYRO)
m1d = resize!(model.profiles_1d)
m1d.grid_flux.rho_tor_norm = par.rho_transport

IMAS.flux_gacode_to_fuse([:ion_energy_flux, :electron_energy_flux, :electron_particle_flux, :momentum_flux], actor.flux_solutions, m1d, eqt, cp1d)
IMAS.flux_gacode_to_fuse((:electron_energy_flux, :ion_energy_flux, :electron_particle_flux, :ion_particle_flux, :momentum_flux), actor.flux_solutions, m1d, eqt, cp1d)

return actor
end
Expand Down
2 changes: 1 addition & 1 deletion src/actors/transport/tglf_actor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function _finalize(actor::ActorTGLF)
m1d = resize!(model.profiles_1d)
m1d.grid_flux.rho_tor_norm = par.rho_transport

IMAS.flux_gacode_to_fuse([:ion_energy_flux, :electron_energy_flux, :electron_particle_flux, :momentum_flux], actor.flux_solutions, m1d, eqt, cp1d)
IMAS.flux_gacode_to_fuse((:electron_energy_flux, :ion_energy_flux, :electron_particle_flux, :ion_particle_flux, :momentum_flux), actor.flux_solutions, m1d, eqt, cp1d)

return actor
end
Expand Down
Loading