gs2crmod 0.10.6 → 0.10.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/gs2crmod.gemspec +1 -1
- data/lib/gs2crmod/astrogk/gsl_data.rb +16 -0
- data/test/agk_slab_itg_low_kperp.tgz +0 -0
- data/test/test_gs2crmod.rb +10 -3
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.10.
|
1
|
+
0.10.7
|
data/gs2crmod.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "gs2crmod"
|
8
|
-
s.version = "0.10.
|
8
|
+
s.version = "0.10.7"
|
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"]
|
@@ -9,5 +9,21 @@ class CodeRunner
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
include AstrogkGSLVectors
|
12
|
+
def geometric_factors_gsl_tensor(options)
|
13
|
+
#ops = options.dup; ops.delete :phi
|
14
|
+
#ep ops; gets
|
15
|
+
theta_vec = gsl_vector(:theta, options)
|
16
|
+
factors = GSL::Tensor.alloc(6,theta_vec.size)
|
17
|
+
factors[true, true] = 1.0
|
18
|
+
factors
|
19
|
+
end
|
20
|
+
def correct_3d_options(options)
|
21
|
+
eputs "Info: setting options[:gs2_coordinate_factor] to 1.0 (for slab geometry)"
|
22
|
+
options[:gs2_coordinate_factor] = 1.0
|
23
|
+
#raise "Please specify options[:rho_star]" unless options[:rho_star]
|
24
|
+
options[:rho_star_actual] = 1.0
|
25
|
+
options[:q_actual] = 1.0
|
26
|
+
options[:rhoc_actual] = 1.0
|
27
|
+
end
|
12
28
|
end
|
13
29
|
end
|
Binary file
|
data/test/test_gs2crmod.rb
CHANGED
@@ -179,12 +179,18 @@ class TestAgkAnalysis < Test::Unit::TestCase
|
|
179
179
|
#kit.gnuplot
|
180
180
|
end
|
181
181
|
def test_analysis
|
182
|
-
assert_equal(
|
183
|
-
assert_equal(0.
|
182
|
+
assert_equal(2, @runner.run_list.size)
|
183
|
+
assert_equal(0.04154, @runner.run_list[1].max_growth_rate.round(5))
|
184
184
|
#p @runner.run_list[1].growth_rate_at_ky
|
185
|
-
assert_equal(0.
|
185
|
+
assert_equal(0.04154, @runner.run_list[1].growth_rate_at_ky[0.01].round(5))
|
186
186
|
assert_equal(:Complete, @runner.run_list[1].status)
|
187
187
|
end
|
188
|
+
def test_3d_graphs
|
189
|
+
kit = @runner.run_list[2].graphkit('phi_real_space_surface', {rho_star: 0.1})
|
190
|
+
kit.gnuplot
|
191
|
+
assert_equal([5,5,1], kit.data[0].f.data.shape)
|
192
|
+
#assert_equal(-0.00402, kit.data[0].f.data[2,3,6].round(5))
|
193
|
+
end
|
188
194
|
def teardown
|
189
195
|
FileUtils.rm_rf(tfolder)
|
190
196
|
end
|
@@ -214,6 +220,7 @@ if ENV['AGK_EXEC']
|
|
214
220
|
end
|
215
221
|
def test_submission
|
216
222
|
CodeRunner.submit(C: 'gs2', X: ENV['AGK_EXEC'], D: 'test_gs2crmod_astrogk', n: '4', Y: tfolder, m: 'astrogk')
|
223
|
+
CodeRunner.submit(C: 'gs2', X: ENV['AGK_EXEC'], D: 'test_gs2crmod_astrogk', n: '4', Y: tfolder, m: 'astrogk', p: '{ny: 8, nx: 8, y0: 100, x0: 100, grid_option: "box"}', )
|
217
224
|
|
218
225
|
CodeRunner.status(Y: tfolder)
|
219
226
|
end
|