gs2crmod 0.5.17 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/gs2crmod.gemspec +2 -2
- data/lib/gs2crmod/graphs.rb +32 -2
- data/lib/gs2crmod/gs2.rb +2 -1
- data/test/helper.rb +1 -1
- data/test/test_gs2crmod.rb +9 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.6.0
|
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.
|
8
|
+
s.version = "0.6.0"
|
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 = "2013-06-
|
12
|
+
s.date = "2013-06-21"
|
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/lib/gs2crmod/graphs.rb
CHANGED
@@ -33,6 +33,7 @@ def auto_axiskits(name, options)
|
|
33
33
|
'spectrum_over_kx' => ["Spectrum at t = #{sprintf("%.3f" ,(options[:t] or list(:t)[options[:t_index]] or list(:t).values.max))}", '', 1],
|
34
34
|
'zonal_spectrum' => ["Zonal spectrum at t = #{sprintf("%.3f" ,(options[:t] or list(:t)[options[:t_index]] or list(:t).values.max))}", '', 1],
|
35
35
|
'spectrum_over_ky' => ["Spectrum at t = #{sprintf("%.3f" ,(options[:t] or list(:t)[options[:t_index]] or list(:t).values.max))}", '', 1],
|
36
|
+
'es_heat_over_ky' => ["Heat Flux at t = #{sprintf("%.3f" ,(options[:t] or list(:t)[options[:t_index]] or list(:t).values.max))}", 'Q_gB', 1],
|
36
37
|
'growth_rate_over_ky_over_kx' => ["Growth Rate", "v_th#{species_letter}/a", 2],
|
37
38
|
'es_heat_flux_over_ky_over_kx' => ["Heat flux at t = #{sprintf("%.3f" ,(options[:t] or list(:t)[options[:t_index]] or list(:t).values.max))}", '', 2],
|
38
39
|
'spectrum_over_kpar' => ["Spectrum at t = #{sprintf("%.3f" ,(options[:t] or list(:t)[options[:t_index]] or list(:t).values.max))}", '', 1],
|
@@ -339,14 +340,14 @@ module GraphKits
|
|
339
340
|
|
340
341
|
alias :eigenfunction_graphkit :efn_graphkit
|
341
342
|
|
342
|
-
def
|
343
|
+
def es_heat_vs_ky_vs_kx_graphkit(options={})
|
343
344
|
case options[:command]
|
344
345
|
when :help
|
345
346
|
return "Graph of electrostatic contribution to heat flux at a given time vs kx and ky"
|
346
347
|
when :options
|
347
348
|
return [:with]
|
348
349
|
else
|
349
|
-
zaxis = axiskit('
|
350
|
+
zaxis = axiskit('es_heat_over_ky_over_kx', options)
|
350
351
|
zaxis.data = zaxis.data.transpose
|
351
352
|
kit = GraphKit.autocreate({y: axiskit('ky', options), x: axiskit('kx', options), z: zaxis})
|
352
353
|
kit.title = "Heat flux"
|
@@ -356,6 +357,35 @@ module GraphKits
|
|
356
357
|
end
|
357
358
|
end
|
358
359
|
|
360
|
+
def es_heat_flux_vs_ky_graphkit(options={})
|
361
|
+
case options[:command]
|
362
|
+
when :help
|
363
|
+
return "Heat flux vs ky"
|
364
|
+
when :options
|
365
|
+
return [:ky_index, :species_index]
|
366
|
+
else
|
367
|
+
return es_heat_flux_vs_kxy_graphkit(options.absorb({direction: :ky}))
|
368
|
+
end
|
369
|
+
end
|
370
|
+
|
371
|
+
def es_heat_flux_vs_kxy_graphkit(options={})
|
372
|
+
case options[:command]
|
373
|
+
when :help
|
374
|
+
return "Heat flux vs options[:direction] (kx or ky)"
|
375
|
+
when :options
|
376
|
+
return [:ky_index, :species_index]
|
377
|
+
else
|
378
|
+
kxy = options[:direction]||options[:kxy]
|
379
|
+
kit = GraphKit.autocreate({x: axiskit(kxy.to_s, options), y: axiskit("es_heat_flux_vs_#{kxy}", options)})
|
380
|
+
kit.title = "Heat flux vs #{kxy} for species #{options[:species_index]}"
|
381
|
+
kit.file_name = options[:graphkit_name] + options[:t_index].to_s
|
382
|
+
kit.data[0].with = 'lp'
|
383
|
+
#kit.ylabel = "Phi^2 #{kxy}^2"
|
384
|
+
kit.pointsize = 2.0
|
385
|
+
end
|
386
|
+
end
|
387
|
+
|
388
|
+
|
359
389
|
def es_heat_flux_vs_time_graphkit(options={})
|
360
390
|
case options[:command]
|
361
391
|
when :help
|
data/lib/gs2crmod/gs2.rb
CHANGED
@@ -52,7 +52,8 @@ class CodeRunner
|
|
52
52
|
|
53
53
|
class Gs2 < Run::FortranNamelist
|
54
54
|
|
55
|
-
GS2_CRMOD_VERSION = Version.new(Gem.loaded_specs['gs2crmod'].version.to_s)
|
55
|
+
#GS2_CRMOD_VERSION = Version.new(Gem.loaded_specs['gs2crmod'].version.to_s)
|
56
|
+
GS2_CRMOD_VERSION = Version.new('0.5.0')
|
56
57
|
|
57
58
|
|
58
59
|
def agk?
|
data/test/helper.rb
CHANGED
data/test/test_gs2crmod.rb
CHANGED
@@ -1,7 +1,14 @@
|
|
1
1
|
require 'helper'
|
2
2
|
|
3
3
|
class TestGs2crmod < Test::Unit::TestCase
|
4
|
-
|
5
|
-
|
4
|
+
def setup
|
5
|
+
@runner = CodeRunner.fetch_runner(Y: 'test/slab_itg', C: 'gs2', X: '/dev/null')
|
6
|
+
end
|
7
|
+
def teardown
|
8
|
+
FileUtils.rm('test/slab_itg/.code_runner_script_defaults.rb')
|
9
|
+
FileUtils.rm('test/slab_itg/.CODE_RUNNER_TEMP_RUN_LIST_CACHE')
|
10
|
+
end
|
11
|
+
def test_basics
|
12
|
+
assert_equal(@runner.run_class, CodeRunner::Gs2)
|
6
13
|
end
|
7
14
|
end
|
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.
|
4
|
+
version: 0.6.0
|
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: 2013-06-
|
13
|
+
date: 2013-06-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: coderunner
|