gs2crmod 0.11.86 → 0.11.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.document +0 -0
- data/Gemfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +0 -0
- data/README.rdoc +0 -0
- data/Rakefile +0 -0
- data/VERSION +1 -1
- data/ext/extconf.rb +0 -0
- data/ext/gs2crmod_ext.c +0 -0
- data/gs2crmod.gemspec +2 -2
- data/include/gs2crmod_ext.h +0 -0
- data/lib/gs2crmod/astrogk/astrogk.rb +0 -0
- data/lib/gs2crmod/astrogk/calculations.rb +0 -0
- data/lib/gs2crmod/astrogk/check_convergence.rb +0 -0
- data/lib/gs2crmod/astrogk/deleted_variables.rb +0 -0
- data/lib/gs2crmod/astrogk/graphs.rb +0 -0
- data/lib/gs2crmod/astrogk/gsl_data.rb +0 -0
- data/lib/gs2crmod/astrogk/gsl_tools.rb +0 -0
- data/lib/gs2crmod/astrogk/ingen.rb +0 -0
- data/lib/gs2crmod/astrogk/input_file_tools.rb +0 -0
- data/lib/gs2crmod/astrogk/namelist_tools.rb +0 -0
- data/lib/gs2crmod/astrogk/namelists.rb +0 -0
- data/lib/gs2crmod/astrogk/properties.rb +0 -0
- data/lib/gs2crmod/astrogk/species_dependent_namelists.rb +0 -0
- data/lib/gs2crmod/astrogk/test_gs2.rb +0 -0
- data/lib/gs2crmod/astrogk.rb +0 -0
- data/lib/gs2crmod/calculations.rb +0 -0
- data/lib/gs2crmod/check_convergence.rb +0 -0
- data/lib/gs2crmod/cyclone_defaults.rb +0 -0
- data/lib/gs2crmod/deleted_variables.rb +0 -0
- data/lib/gs2crmod/graphs.rb +3 -3
- data/lib/gs2crmod/graphs_rdoc.rb +0 -0
- data/lib/gs2crmod/gs2.rb +3 -1
- data/lib/gs2crmod/gsl_data.rb +14 -18
- data/lib/gs2crmod/gsl_data_3d.rb +0 -0
- data/lib/gs2crmod/gsl_tools.rb +0 -0
- data/lib/gs2crmod/ingen.rb +0 -0
- data/lib/gs2crmod/namelists.rb +0 -0
- data/lib/gs2crmod/properties.rb +0 -0
- data/lib/gs2crmod/read_netcdf.rb +0 -0
- data/lib/gs2crmod/species_dependent_namelists.rb +0 -0
- data/lib/gs2crmod/spectrogk/deleted_variables.rb +0 -0
- data/lib/gs2crmod/spectrogk/namelists.rb +0 -0
- data/lib/gs2crmod/spectrogk.rb +0 -0
- data/lib/gs2crmod/test_gs2.rb +0 -0
- data/lib/gs2crmod.rb +0 -0
- data/lib/gs2crmod_extension.rb +0 -0
- data/sync_mediawiki/helper.rb +0 -0
- data/sync_mediawiki/sync_mediawiki.rb +0 -0
- data/sync_variables/copy_help.rb +0 -0
- data/sync_variables/helper.rb +0 -0
- data/sync_variables/sync_variables.rb +0 -0
- data/sync_variables_sgk/helper.rb +0 -0
- data/sync_variables_sgk/sync_variables_sgk.rb +0 -0
- metadata +2 -2
data/.document
CHANGED
|
File without changes
|
data/Gemfile
CHANGED
|
File without changes
|
data/LICENSE.txt
CHANGED
|
File without changes
|
data/README.md
CHANGED
|
File without changes
|
data/README.rdoc
CHANGED
|
File without changes
|
data/Rakefile
CHANGED
|
File without changes
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.11.
|
|
1
|
+
0.11.87
|
data/ext/extconf.rb
CHANGED
|
File without changes
|
data/ext/gs2crmod_ext.c
CHANGED
|
File without changes
|
data/gs2crmod.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = "gs2crmod"
|
|
8
|
-
s.version = "0.11.
|
|
8
|
+
s.version = "0.11.87"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Edmund Highcock", "Ferdinand van Wyk"]
|
|
12
|
-
s.date = "2015-
|
|
12
|
+
s.date = "2015-02-12"
|
|
13
13
|
s.description = "GS2 is a gyrokinetic flux tube initial value turbulence code which can be used for fusion or astrophysical plasmas. CodeRunner is a framework for the automated running and analysis of large simulations. This module allows GS2 (and its sister code AstroGK) to harness the power of the CodeRunner framework."
|
|
14
14
|
s.email = "edmundhighcock@sourceforge.net"
|
|
15
15
|
s.extensions = ["ext/extconf.rb"]
|
data/include/gs2crmod_ext.h
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/gs2crmod/astrogk.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/gs2crmod/graphs.rb
CHANGED
|
@@ -58,7 +58,7 @@ def auto_axiskits(name, options)
|
|
|
58
58
|
'es_mom_flux_over_time' => ["#{species_type((options[:species_index] or 1)).capitalize} Momentum Flux", '', 1],
|
|
59
59
|
'es_part_flux_over_time' => ["#{species_type((options[:species_index] or 1)).capitalize} Particle Flux", '', 1],
|
|
60
60
|
'zonal_spectrum' => ["Zonal spectrum at t = #{sprintf("%.3f" ,(options[:t] or list(:t)[options[:t_index]] or list(:t).values.max))}", '', 1],
|
|
61
|
-
'
|
|
61
|
+
'zf_velocity_over_x' => ['Zonal Flow Velocity', "", 1],
|
|
62
62
|
'mean_flow_velocity_over_x' => ['Mean Flow Velocity', "", 1]
|
|
63
63
|
}
|
|
64
64
|
return hash[name]
|
|
@@ -2419,7 +2419,7 @@ module GraphKits
|
|
|
2419
2419
|
end
|
|
2420
2420
|
end
|
|
2421
2421
|
|
|
2422
|
-
def
|
|
2422
|
+
def zf_velocity_vs_x_graphkit(options={})
|
|
2423
2423
|
case options[:command]
|
|
2424
2424
|
when :help
|
|
2425
2425
|
return "zonal_flow_velocity_vs_x: Graph of the zonal flow velocity kxfac*IFT(i k_x phi). kxfac = (qinp/rhoc)*grho(rhoc)."
|
|
@@ -2427,7 +2427,7 @@ module GraphKits
|
|
|
2427
2427
|
return [:t, :t_index, :theta_index, :kxfac, :add_mean_flow]
|
|
2428
2428
|
else
|
|
2429
2429
|
options[:ky_index]=0
|
|
2430
|
-
kit = GraphKit.autocreate({x: axiskit('x', options), y: axiskit("
|
|
2430
|
+
kit = GraphKit.autocreate({x: axiskit('x', options), y: axiskit("zf_velocity_over_x", options)})
|
|
2431
2431
|
if options[:add_mean_flow]
|
|
2432
2432
|
kit.data[0].y.data += mean_flow_velocity_over_x_gsl_vector(options)
|
|
2433
2433
|
end
|
data/lib/gs2crmod/graphs_rdoc.rb
CHANGED
|
File without changes
|
data/lib/gs2crmod/gs2.rb
CHANGED
|
@@ -1252,7 +1252,7 @@ folder = File.dirname(File.expand_path(__FILE__)) # i.e. the directory this file
|
|
|
1252
1252
|
def latex_graphs
|
|
1253
1253
|
#will have a different set of graphs to look at depending on whether linear or nonlinear
|
|
1254
1254
|
if @nonlinear_mode == "off"
|
|
1255
|
-
#make up a list of graphs that are to be included. The order of the arguments is [code to generate graphkit, LaTeX description
|
|
1255
|
+
#make up a list of graphs that are to be included. The order of the arguments is [code to generate graphkit, LaTeX description]
|
|
1256
1256
|
graphs = [
|
|
1257
1257
|
#[(kit = phi2_by_mode_vs_time({kx_index:1, ky_index:1}); kit.xlabel=%[TEST]; kit.gp.term = "post eps color enhanced size 3.5in,2.33in"; kit.gp.output = "test.eps"; kit), "This is a test graph written into a \LaTeX file. \n\n \\myfigure{test.eps}"]
|
|
1258
1258
|
[(kit = phi2tot_vs_time_graphkit; kit.data[0].title=""; kit.gp.logscale="y"; kit.file_name = "phi2tot.eps"; kit), "Total $\\phi^2$ versus time."],
|
|
@@ -1277,6 +1277,8 @@ folder = File.dirname(File.expand_path(__FILE__)) # i.e. the directory this file
|
|
|
1277
1277
|
[(kit = es_mom_flux_vs_time_graphkit(species_index:1); kit.file_name = "es_mom_flux_1_vs_time.eps"; kit), "Momentum flux for species 1 as a function of time."],
|
|
1278
1278
|
if @nspec > 1 then [(kit = es_mom_flux_vs_time_graphkit(species_index:2); kit.file_name = "es_mom_flux_2_vs_time.eps"; kit), "Momentum flux for species 2 as a function of time."] end,
|
|
1279
1279
|
[(kit = zonal_spectrum_graphkit; kit.gp.logscale="y"; kit.file_name = "zonal_spectrum.eps"; kit), "Zonal spectrum at the final time step."],
|
|
1280
|
+
if @write_eigenfunc == ".true." then [(kit = zf_velocity_vs_x_graphkit(theta_index:get_list_of(:theta).length/2); kit.file_name = "zonal_flow_velocity_vs_x.eps"; kit), "Zonal flow velocity avg over time versus x."] end,
|
|
1281
|
+
if @write_eigenfunc == ".true." and @g_exb then [(kit = zf_velocity_vs_x_graphkit(theta_index:get_list_of(:theta).length/2, add_mean_flow:true); kit.file_name = "zonal_flow_velocity_vs_x_with_mean_flow.eps"; kit), "Zonal flow velocity with mean flow added avg over time versus x."] end,
|
|
1280
1282
|
].compact
|
|
1281
1283
|
end
|
|
1282
1284
|
|
data/lib/gs2crmod/gsl_data.rb
CHANGED
|
@@ -1037,16 +1037,23 @@ module GSLVectors
|
|
|
1037
1037
|
|
|
1038
1038
|
#This function returns the zonal flow velocity as a function of x (the radial coordinate).
|
|
1039
1039
|
#This is v_ZF = kxfac*IFT(i k_x phi_imag), where kxfac = (qinp/rhoc)*grho(rhoc).
|
|
1040
|
-
def
|
|
1040
|
+
def zf_velocity_over_x_gsl_vector(options)
|
|
1041
1041
|
Dir.chdir(@directory) do
|
|
1042
1042
|
raise CRFatal.new("Need to specify a theta_index.") unless options[:theta_index]
|
|
1043
1043
|
raise CRFatal.new("Need either qinp or pk and epsl specified in order to calculate kxfac.
|
|
1044
1044
|
If using numerical equil use the option :kxfac to override calculation.") unless @qinp or (@pk and @epsl or options[:kxfac])
|
|
1045
|
-
phi = gsl_vector_complex('phi_zonal', options)
|
|
1046
1045
|
|
|
1047
1046
|
kx = gsl_vector(:kx).to_box_order
|
|
1048
1047
|
_x = gsl_vector(:x)
|
|
1049
1048
|
grho = gsl_vector('grho')[options[:theta_index]]
|
|
1049
|
+
|
|
1050
|
+
phi = GSL::Vector.alloc(kx.size)
|
|
1051
|
+
for it in 0...gsl_vector(:t).size
|
|
1052
|
+
options[:t_index] = it
|
|
1053
|
+
phi += gsl_vector_complex('phi_zonal', options)
|
|
1054
|
+
end
|
|
1055
|
+
phi /= gsl_vector(:t).size
|
|
1056
|
+
|
|
1050
1057
|
if @qinp
|
|
1051
1058
|
kxfac = (@qinp/@rhoc)*grho
|
|
1052
1059
|
elsif @pk and @epsl
|
|
@@ -1164,25 +1171,14 @@ module GSLVectorComplexes
|
|
|
1164
1171
|
#and time index if write_phi_over_time was enabled during the simulation
|
|
1165
1172
|
def phi_zonal_gsl_vector_complex(options)
|
|
1166
1173
|
Dir.chdir(@directory) do
|
|
1167
|
-
|
|
1168
|
-
#extra option required is t_index
|
|
1169
|
-
raise CRFatal.new("write_phi_over_time is not enabled so this function won't work") unless @write_phi_over_time
|
|
1170
|
-
|
|
1174
|
+
raise CRFatal.new("write_eigenfunc is not enabled so this function won't work") unless @write_eigenfunc
|
|
1171
1175
|
options.convert_to_index(self, :t)
|
|
1172
|
-
a = netcdf_file.var('
|
|
1173
|
-
'start' => [0,
|
|
1174
|
-
'end' => [-1
|
|
1176
|
+
a = netcdf_file.var('phi0').get({
|
|
1177
|
+
'start' => [0,0,0, options[:t_index] - 1],
|
|
1178
|
+
'end' => [-1,-1,0, options[:t_index] - 1]
|
|
1175
1179
|
})
|
|
1176
|
-
vector = GSL::Vector::Complex.alloc(GSL::Vector.alloc(a[0,0
|
|
1180
|
+
vector = GSL::Vector::Complex.alloc(GSL::Vector.alloc(a[0,0..-1,0,0]), GSL::Vector.alloc(a[1,0..-1,0,0]))
|
|
1177
1181
|
return vector
|
|
1178
|
-
else
|
|
1179
|
-
a = netcdf_file.var('phi').get({
|
|
1180
|
-
'start' => [0, options[:theta_index], 0, 0],
|
|
1181
|
-
'end' => [-1, options[:theta_index], -1, 0]
|
|
1182
|
-
})
|
|
1183
|
-
vector = GSL::Vector::Complex.alloc(GSL::Vector.alloc(a[0,0,0..-1,0]), GSL::Vector.alloc(a[1,0,0..-1,0]))
|
|
1184
|
-
return vector
|
|
1185
|
-
end
|
|
1186
1182
|
end
|
|
1187
1183
|
end
|
|
1188
1184
|
|
data/lib/gs2crmod/gsl_data_3d.rb
CHANGED
|
File without changes
|
data/lib/gs2crmod/gsl_tools.rb
CHANGED
|
File without changes
|
data/lib/gs2crmod/ingen.rb
CHANGED
|
File without changes
|
data/lib/gs2crmod/namelists.rb
CHANGED
|
File without changes
|
data/lib/gs2crmod/properties.rb
CHANGED
|
File without changes
|
data/lib/gs2crmod/read_netcdf.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/gs2crmod/spectrogk.rb
CHANGED
|
File without changes
|
data/lib/gs2crmod/test_gs2.rb
CHANGED
|
File without changes
|
data/lib/gs2crmod.rb
CHANGED
|
File without changes
|
data/lib/gs2crmod_extension.rb
CHANGED
|
File without changes
|
data/sync_mediawiki/helper.rb
CHANGED
|
File without changes
|
|
File without changes
|
data/sync_variables/copy_help.rb
CHANGED
|
File without changes
|
data/sync_variables/helper.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gs2crmod
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.11.
|
|
4
|
+
version: 0.11.87
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2015-
|
|
13
|
+
date: 2015-02-12 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: coderunner
|