From d41830f9ffdd5f6e4f54698840c400f8d9aa86c0 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Fri, 4 Oct 2024 19:14:49 +0000 Subject: [PATCH] build based on 6bb4fbc --- dev/.documenter-siteinfo.json | 2 +- dev/index.html | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 60df441..1b752a3 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-10-04T19:03:14","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-10-04T19:14:46","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index 6c6c3fa..5835e57 100644 --- a/dev/index.html +++ b/dev/index.html @@ -9,18 +9,18 @@ fort_tol::Float64=1e-6, b2_parameters::Tuple{String, String, String, String,}=("", "", "", ""), load_bb::Bool=false, -)::IMASdd.dd

Main function of the module. Takes in a geometry file and an (optional) output file (either b2time or b2fstate) and a grid_ggd description in the form of a Dict or filename to equivalent YAML file. Additionally, EIRENE fort files can be provided as tuple of 3 filenames consisting fort.33, fort.34, and fort.35 files. The grids in these files are matched with SOLPS grid with a tolerance of fort_tol (defaults to 1e-6). Further settings can be loaded from b2.*.parameters files and equilibrium files.

source

The main solps2imas feature can be called to load everything. However, some special cases may demand only subsets of the data. In these cases, it is possible to call subcomponents of the SOLPS to IMAS data transfer feature by using these functions:

SOLPS2imas.load_summary_data!Function
load_summary_data!(
+)::IMASdd.dd

Main function of the module. Takes in a geometry file and an (optional) output file (either b2time or b2fstate) and a grid_ggd description in the form of a Dict or filename to equivalent YAML file. Additionally, EIRENE fort files can be provided as tuple of 3 filenames consisting fort.33, fort.34, and fort.35 files. The grids in these files are matched with SOLPS grid with a tolerance of fort_tol (defaults to 1e-6). Further settings can be loaded from b2.*.parameters files and equilibrium files.

source

The main solps2imas feature can be called to load everything. However, some special cases may demand only subsets of the data. In these cases, it is possible to call subcomponents of the SOLPS to IMAS data transfer feature by using these functions:

SOLPS2imas.load_summary_data!Function
load_summary_data!(
     ids::IMASdd.dd,
     b2_parameters::Tuple{String, String, String, String}=("", "", "", "");
-)

Loads high level shot summary data into the summary IDS after reading and interpreting SOLPS input files, such as b2.*.parameters.

source

Parsing tools

This module uses some parsing functions which can be used standalone as well

SOLPS2imas.read_b2_outputFunction
read_b2_output(filename::String)::Dict{String, Dict{String, Any}}

Read final state b2 output file (b2fstate or b2time.nc) or b2fgmtry file and return a dictionary with structure: Dict("dim" => Dict{String, Any}, "data" => Dict{String, Any}) where "dim" contains the dimensions of the data and "data" contains the data itself, with keys corresponding to the field names.

Supported SOLPS files as input via filename:

  • b2fstate
  • b2fstati
  • b2time.nc
  • b2fgmtry
source
SOLPS2imas.read_b2mn_outputFunction
read_b2mn_output(filename::String)::Dict{String, Any}

Read b2mn output file and store the quantities in a dictionary.

Supported SOLPS files as input via filename:

  • b2mn.dat
source
SOLPS2imas.read_b2time_outputFunction
read_b2time_output(filename::String)::Dict{String, Dict{String, Any}}

Read time dependent b2 output file and return a dictionary with structure: Dict("dim" => Dict{String, Any}, "data" => Dict{String, Any}) where "dim" contains the dimensions of the data and "data" contains the data itself, with keys corresponding to the field names.

Supported SOLPS files as input via filename:

  • b2time.nc
source

SOLPS Mesh Tools

SOLPS2imas.xytocFunction
xytoc(ix::Int, iy::Int; nx::Int)::Int

Converts SOLPS indices for crx, cry (ix, iy) that go from 1:nx, 1:ny into the linear index ic used in IMAS for corresponding cells.

source
SOLPS2imas.ctoxyFunction
ctoxy(ic::Int; nx::Int)::Tuple{Int, Int}

Inverse of xytoc.

source
SOLPS2imas.data_xytocFunction
data_xytoc(data::Matrix{Float64}; nx::Int)::Vector{Float64}

Flattens 2d data given on cell indices ix, iy into 1d data on linear index ic. ic is calculated using xytoc function. Data is assumed to have dimensions (ny, nx) where ny is not required in this conversion.

source
SOLPS2imas.search_pointFunction
search_point(
+)

Loads high level shot summary data into the summary IDS after reading and interpreting SOLPS input files, such as b2.*.parameters.

source

Parsing tools

This module uses some parsing functions which can be used standalone as well

SOLPS2imas.read_b2_outputFunction
read_b2_output(filename::String)::Dict{String, Dict{String, Any}}

Read final state b2 output file (b2fstate or b2time.nc) or b2fgmtry file and return a dictionary with structure: Dict("dim" => Dict{String, Any}, "data" => Dict{String, Any}) where "dim" contains the dimensions of the data and "data" contains the data itself, with keys corresponding to the field names.

Supported SOLPS files as input via filename:

  • b2fstate
  • b2fstati
  • b2time.nc
  • b2fgmtry
source
SOLPS2imas.read_b2mn_outputFunction
read_b2mn_output(filename::String)::Dict{String, Any}

Read b2mn output file and store the quantities in a dictionary.

Supported SOLPS files as input via filename:

  • b2mn.dat
source
SOLPS2imas.read_b2time_outputFunction
read_b2time_output(filename::String)::Dict{String, Dict{String, Any}}

Read time dependent b2 output file and return a dictionary with structure: Dict("dim" => Dict{String, Any}, "data" => Dict{String, Any}) where "dim" contains the dimensions of the data and "data" contains the data itself, with keys corresponding to the field names.

Supported SOLPS files as input via filename:

  • b2time.nc
source

SOLPS Mesh Tools

SOLPS2imas.xytocFunction
xytoc(ix::Int, iy::Int; nx::Int)::Int

Converts SOLPS indices for crx, cry (ix, iy) that go from 1:nx, 1:ny into the linear index ic used in IMAS for corresponding cells.

source
SOLPS2imas.ctoxyFunction
ctoxy(ic::Int; nx::Int)::Tuple{Int, Int}

Inverse of xytoc.

source
SOLPS2imas.data_xytocFunction
data_xytoc(data::Matrix{Float64}; nx::Int)::Vector{Float64}

Flattens 2d data given on cell indices ix, iy into 1d data on linear index ic. ic is calculated using xytoc function. Data is assumed to have dimensions (ny, nx) where ny is not required in this conversion.

source
SOLPS2imas.search_pointFunction
search_point(
     nodes::IMASdd.IDSvector{IMASdd.edge_profiles__grid_ggd___space___objects_per_dimension___object{T}},
     r::Real,
     z::Real;
     tol::Float64=0.0,
-)::Int where {T}

Search if a point (r, z) is present in the nodes array. Here nodes is generally available in ids.edge_profiles.grid_ggd[:].space[:].objects_per_dimension[1].object

If the point is not found, the function returns 0.

source
SOLPS2imas.search_edgesFunction
search_edges(
+)::Int where {T}

Search if a point (r, z) is present in the nodes array. Here nodes is generally available in ids.edge_profiles.grid_ggd[:].space[:].objects_per_dimension[1].object

If the point is not found, the function returns 0.

source
SOLPS2imas.search_edgesFunction
search_edges(
     edges::IMASdd.IDSvector{IMASdd.edge_profiles__grid_ggd___space___objects_per_dimension___object{T}},
     edge_nodes::Array{Int, 1}
-)::Int where {T}

Search if an edge with nodes as edge_nodes already exists in the edges array. edges is generally available in ids.edge_profiles.grid_ggd[:].space[:].objects_per_dimension[2].object

If the edge is not found, the function returns 0.

source
SOLPS2imas.distance_between_nodesFunction
distance_between_nodes(nodes::edges_nodes_type, node_inds::Array{Int, 1})

Return distance between two nodes with indices node_inds in nodes array. nodes is generally available in ids.edge_profiles.grid_ggd[:].space[:].objects_per_dimension[1].object.

source
SOLPS2imas.neighbour_indsFunction
neighbour_inds(
+)::Int where {T}

Search if an edge with nodes as edge_nodes already exists in the edges array. edges is generally available in ids.edge_profiles.grid_ggd[:].space[:].objects_per_dimension[2].object

If the edge is not found, the function returns 0.

source
SOLPS2imas.distance_between_nodesFunction
distance_between_nodes(nodes::edges_nodes_type, node_inds::Array{Int, 1})

Return distance between two nodes with indices node_inds in nodes array. nodes is generally available in ids.edge_profiles.grid_ggd[:].space[:].objects_per_dimension[1].object.

source
SOLPS2imas.neighbour_indsFunction
neighbour_inds(
     ic::Int;
     nx::Int,
     ny::Int,
@@ -28,16 +28,16 @@
     rightcut::Int,
     topcut::Int,
     bottomcut::Int,
-)::Vector{Int}

(deprecated function)

Returns indices of neighbours of cell with linear index ic. This function uses the SOLPS grid generation algorithm to determine the neighbours. However, SOLPS geometry file actually provides the neighbor indices directly. Thus, this function is not used in the code anywhere but is kept here for reference.

source
SOLPS2imas.get_neighbour_indsFunction
get_neighbour_inds(
+)::Vector{Int}

(deprecated function)

Returns indices of neighbours of cell with linear index ic. This function uses the SOLPS grid generation algorithm to determine the neighbours. However, SOLPS geometry file actually provides the neighbor indices directly. Thus, this function is not used in the code anywhere but is kept here for reference.

source
SOLPS2imas.get_neighbour_indsFunction
get_neighbour_inds(
     ic::Int,
     gmtry::Dict{String, Dict{String, Any}},
     it::Int,
-)::Vector{Int}

Returns indices of neighbours of cell with linear index ic. This function uses the parsed SOLPS geometry file to determine the neighbours by using matrices named as leftix, rightix, topix, bottomix, leftiy, rightiy, topiy, and bottomiy.

source
SOLPS2imas.attach_neightbours!Function
attach_neightbours!(
+)::Vector{Int}

Returns indices of neighbours of cell with linear index ic. This function uses the parsed SOLPS geometry file to determine the neighbours by using matrices named as leftix, rightix, topix, bottomix, leftiy, rightiy, topiy, and bottomiy.

source
SOLPS2imas.attach_neightbours!Function
attach_neightbours!(
     cells::IMASdd.IDSvector{IMASdd.edge_profiles__grid_ggd___space___objects_per_dimension___object{T}},
     edges::IMASdd.IDSvector{IMASdd.edge_profiles__grid_ggd___space___objects_per_dimension___object{T}},
     gmtry::Dict{String, Dict{String, Any}},
     it::Int,
-) where {T}

This function attaches neighbours to each boundary of each cell and each boundary of each edge using the parsed SOLPS geometry file.

source

Subset Identification Tools

These functions provide a way to identify if a linear cell index in SOLPS notation belongs to a grid subset.

SOLPS2imas.in_coreFunction

in_core(; ix, iy, topcut, bottomcut, leftcut, rightcut)::Bool

Returns true if cell indexed ix, iy lie inside the core.

source
SOLPS2imas.in_solFunction
in_sol(; iy, topcut, kwargs...)::Bool

Returns true if cell indexed ix, iy lie inside the SOL.

source
SOLPS2imas.in_idrFunction
in_idr(; ix, iy, topcut, bottomcut, leftcut, kwargs...)::Bool

Returns true if cell indexed ix, iy lie inside the inner divertor region.

source
SOLPS2imas.in_odrFunction
in_odr(; ix, iy, topcut, bottomcut, rightcut, kwargs...)::Bool

Returns true if cell indexed ix, iy lie inside the outer divertor region.

source
SOLPS2imas.is_x_alignedFunction
is_x_aligned(;boundary_ind)::Bool

x_aligned edges will have odd boundary_ind based on chosen order of numbering them.

source
SOLPS2imas.is_y_alignedFunction
is_y_aligned(; boundary_ind)::Bool

y_aligned edges will have even boundary_ind based on chosen order of numbering them.

source
SOLPS2imas.is_core_cutFunction
is_core_cut(;
+) where {T}

This function attaches neighbours to each boundary of each cell and each boundary of each edge using the parsed SOLPS geometry file.

source

Subset Identification Tools

These functions provide a way to identify if a linear cell index in SOLPS notation belongs to a grid subset.

SOLPS2imas.in_coreFunction

in_core(; ix, iy, topcut, bottomcut, leftcut, rightcut)::Bool

Returns true if cell indexed ix, iy lie inside the core.

source
SOLPS2imas.in_solFunction
in_sol(; iy, topcut, kwargs...)::Bool

Returns true if cell indexed ix, iy lie inside the SOL.

source
SOLPS2imas.in_idrFunction
in_idr(; ix, iy, topcut, bottomcut, leftcut, kwargs...)::Bool

Returns true if cell indexed ix, iy lie inside the inner divertor region.

source
SOLPS2imas.in_odrFunction
in_odr(; ix, iy, topcut, bottomcut, rightcut, kwargs...)::Bool

Returns true if cell indexed ix, iy lie inside the outer divertor region.

source
SOLPS2imas.is_x_alignedFunction
is_x_aligned(;boundary_ind)::Bool

x_aligned edges will have odd boundary_ind based on chosen order of numbering them.

source
SOLPS2imas.is_y_alignedFunction
is_y_aligned(; boundary_ind)::Bool

y_aligned edges will have even boundary_ind based on chosen order of numbering them.

source
SOLPS2imas.is_core_cutFunction
is_core_cut(;
     ix,
     iy,
     cells,
@@ -47,7 +47,7 @@
     bottomcut,
     leftcut,
     rightcut,
-)::Bool

Returns true if boundary_ind of a cell at ix, iy is on core_cut (Y-aliged edge).

source
SOLPS2imas.is_pfr_cutFunction
is_pfr_cut(;
+)::Bool

Returns true if boundary_ind of a cell at ix, iy is on core_cut (Y-aliged edge).

source
SOLPS2imas.is_pfr_cutFunction
is_pfr_cut(;
     ix,
     iy,
     cells,
@@ -57,13 +57,13 @@
     bottomcut,
     leftcut,
     rightcut,
-)::Bool

Returns true if boundary_ind of a cell at ix, iy is on core_cut (y-aliged edge).

source
SOLPS2imas.is_outer_throatFunction
is_outer_throat(; ix, iy, boundary_ind, topcut, rightcut, kwargs...)::Bool

Returns true if boundary_ind of a cell at ix, iy is on outer throat.

source
SOLPS2imas.is_inner_throatFunction
is_inner_throat(; ix, iy, boundary_ind, topcut, leftcut, kwargs...)::Bool

Returns true if boundary_ind of a cell at ix, iy is on outer throat.

source
SOLPS2imas.is_outer_midplaneFunction
is_outer_midplane(; ix, jxa, boundary_ind)

Returns true if boundary_ind of a cell at ix, iy is on outer midplane.

source
SOLPS2imas.is_inner_midplaneFunction
is_inner_midplane(; ix, jxa, boundary_ind)

Returns true if boundary_ind of a cell at ix, iy is on outer midplane.

source
SOLPS2imas.is_outer_targetFunction
is_outer_target(; ix, nx, boundary_ind)

Returns true if boundary_ind of a cell at ix, iy is on outer target.

source
SOLPS2imas.is_inner_targetFunction
is_inner_target(; ix, boundary_ind, kwargs...)::Bool

Returns true if boundary_ind of a cell at ix, iy is on inner target.

source
SOLPS2imas.is_core_boundaryFunction
is_core_boundary(;
+)::Bool

Returns true if boundary_ind of a cell at ix, iy is on core_cut (y-aliged edge).

source
SOLPS2imas.is_outer_throatFunction
is_outer_throat(; ix, iy, boundary_ind, topcut, rightcut, kwargs...)::Bool

Returns true if boundary_ind of a cell at ix, iy is on outer throat.

source
SOLPS2imas.is_inner_throatFunction
is_inner_throat(; ix, iy, boundary_ind, topcut, leftcut, kwargs...)::Bool

Returns true if boundary_ind of a cell at ix, iy is on outer throat.

source
SOLPS2imas.is_outer_midplaneFunction
is_outer_midplane(; ix, jxa, boundary_ind)

Returns true if boundary_ind of a cell at ix, iy is on outer midplane.

source
SOLPS2imas.is_inner_midplaneFunction
is_inner_midplane(; ix, jxa, boundary_ind)

Returns true if boundary_ind of a cell at ix, iy is on outer midplane.

source
SOLPS2imas.is_outer_targetFunction
is_outer_target(; ix, nx, boundary_ind)

Returns true if boundary_ind of a cell at ix, iy is on outer target.

source
SOLPS2imas.is_inner_targetFunction
is_inner_target(; ix, boundary_ind, kwargs...)::Bool

Returns true if boundary_ind of a cell at ix, iy is on inner target.

source
SOLPS2imas.is_core_boundaryFunction
is_core_boundary(;
 ix,
 iy,
 boundary_ind,
 bottomcut,
 leftcut,
 rightcut,
-kwargs...,

)

Returns true if boundary_ind of a cell at ix, iy is on core boundary (central blank spot boundary).

source
SOLPS2imas.is_separatrixFunction
is_separatrix(; iy, boundary_ind, topcut, kwargs...)::Bool

Returns true if boundary_ind of a cell at ix, iy is on separatrix.

source
SOLPS2imas.get_xpoint_nodesFunction
get_xpoint_nodes(
+kwargs...,

)

Returns true if boundary_ind of a cell at ix, iy is on core boundary (central blank spot boundary).

source
SOLPS2imas.is_separatrixFunction
is_separatrix(; iy, boundary_ind, topcut, kwargs...)::Bool

Returns true if boundary_ind of a cell at ix, iy is on separatrix.

source
SOLPS2imas.get_xpoint_nodesFunction
get_xpoint_nodes(
     gmtry::Dict{String, Dict{String, Any}},
-)::Vector{Vector{Vector{Float64}}}

Limited to finding first x-point for now. Returns x-point (r, z) for each time index of grid_ggd for the first x-point only. Thus second index correspond to the rank of x-point which is always 1 from output of this function for now.

source
+)::Vector{Vector{Vector{Float64}}}

Limited to finding first x-point for now. Returns x-point (r, z) for each time index of grid_ggd for the first x-point only. Thus second index correspond to the rank of x-point which is always 1 from output of this function for now.

source