Skip to content

Commit

Permalink
Merge pull request #44 from ProjectTorreyPines/inttype
Browse files Browse the repository at this point in the history
Change Int64 to Int
  • Loading branch information
anchal-physics authored Jul 24, 2024
2 parents d5320ae + fa6bd74 commit c658584
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/SOLPS2IMAS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ solps_var_to_imas = YAML_load_file("$(@__DIR__)/solps_var_to_imas.yml")
val_obj(
ggd::IMASDD.edge_profiles__ggd,
var::String,
grid_ggd_index::Int64;
gsi_ch::Dict{Int64, Int64}=Dict{Int64, Int64}(),
grid_ggd_index::Int;
gsi_ch::Dict{Int, Int}=Dict{Int, Int}(),
)
Given SOLPS variable name (var), returns pair of parent object and property name
Expand All @@ -57,8 +57,8 @@ a dictionary gsi_ch.
function val_obj(
ggd::IMASDD.edge_profiles__ggd,
var::String,
grid_ggd_index::Int64;
gsi_ch::Dict{Int64, Int64}=Dict{Int64, Int64}(),
grid_ggd_index::Int;
gsi_ch::Dict{Int, Int}=Dict{Int, Int}(),
)
if var keys(solps_var_to_imas)
return nothing, nothing
Expand All @@ -77,7 +77,7 @@ function val_obj(
resize!(parent, length(parent) + 1)
parent = parent[end]
else
ind = parse(Int64, ind_str)
ind = parse(Int, ind_str)
if length(parent) < ind
resize!(parent, ind)
end
Expand Down Expand Up @@ -291,15 +291,15 @@ function solps2imas(
# edges[i].nodes = [0, 0]
# resize!(edges[i].boundary, 2)
# for bnd ∈ edges[i].boundary
# bnd.neighbours = Int64[]
# bnd.neighbours = Int[]
# end
# end
# Initialize nodes and boundaries for cells
for i 1:(ncell)
cells[i].nodes = [0, 0, 0, 0]
resize!(cells[i].boundary, 4)
for bnd cells[i].boundary
bnd.neighbours = Int64[]
bnd.neighbours = Int[]
end
end

Expand Down Expand Up @@ -346,7 +346,7 @@ function solps2imas(
edges[edge_ind].nodes = edge_nodes
resize!(edges[edge_ind].boundary, 2)
for bnd edges[edge_ind].boundary
bnd.neighbours = Int64[]
bnd.neighbours = Int[]
end
for (ii, edge_bnd) enumerate(edges[edge_ind].boundary)
edge_bnd.index = edge_nodes[ii]
Expand Down Expand Up @@ -554,7 +554,7 @@ function solps2imas(
end # End of setting up space
end

gsi_ch = Dict{Int64, Int64}()
gsi_ch = Dict{Int, Int}()
if fort != ("", "", "")
grid_ggd = ids.edge_profiles.grid_ggd[1]
space = grid_ggd.space[1]
Expand Down Expand Up @@ -629,7 +629,7 @@ function solps2imas(
fnodeXnodeY = collect(skipmissing(vec(f33'))) * 1e-2 # cm to m
fnodeX = fnodeXnodeY[1:fnnodes]
fnodeY = fnodeXnodeY[fnnodes+1:end]
fnode_inds = Array{Int64}(undef, fnnodes)
fnode_inds = Array{Int}(undef, fnnodes)
for fnind 1:fnnodes
i_existing = search_point(
nodes,
Expand All @@ -652,7 +652,7 @@ function solps2imas(
f34 = readdlm(fort[2])
fntria = f34[1, 1]
fntriIndNodes = f34[2:end, :]
fntri_inds = Array{Int64}(undef, fntria)
fntri_inds = Array{Int}(undef, fntria)
for fntri 1:fntria
resize!(cells, length(cells) + 1)
this_cell_ind = length(cells)
Expand Down Expand Up @@ -696,7 +696,7 @@ function solps2imas(
if f35[ii, neigh_col_ind] != 0
bnd.neighbours = [fntri_inds[f35[ii, neigh_col_ind]]]
else
bnd.neighbours = Int64[]
bnd.neighbours = Int[]
end
end
if f35[ii, 11] != -1 && f35[ii, 12] != -1
Expand Down

0 comments on commit c658584

Please sign in to comment.