trinitycrmod 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/trinitycrmod.gemspec +2 -11
- metadata +1 -10
- data/test/gs2_42982/pr08_jet_42982_1d.dat.gz +0 -0
- data/test/gs2_42982/pr08_jet_42982_2d.dat.gz +0 -0
- data/test/gs2_42982/shot42982_jet.in +0 -186
- data/test/gs2_42982/shot42982_jet.trin +0 -57
- data/test/gs2_42982_results/v.tgz +0 -0
- data/test/helper.rb +0 -18
- data/test/ifspppl/test.trin +0 -57
- data/test/ifspppl_results/v/id_1.tgz +0 -0
- data/test/test_trinitycrmod.rb +0 -128
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 166e73d674743e9ef9e75198cd3e9919d2ccff40
|
4
|
+
data.tar.gz: acee71bfe6ab75b2f0c3a5ef1ec7b8e3ef622277
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 756a2ce534bcc19e6301aaeeaf7412645a3b7bbd6d88c835edfa74284b5c4960c61a75fe9d29a1a4fb97ee28fb3c674af09cabca5c70d9abc5089885dcf9b78e
|
7
|
+
data.tar.gz: 762f3bcaf227624ab4e4a4184b402e2688c13072ac4f0a2d00dccb6630a2d114bcf70f831e9a386fdbe23588f8bb4cdc66c305c287c99b5e7a9589e9cd7de840
|
data/Rakefile
CHANGED
@@ -21,6 +21,7 @@ Jeweler::Tasks.new do |gem|
|
|
21
21
|
gem.description = %Q{This module allows Trinity, the Multiscale Gyrokinetic Turbulent Transport solver for Fusion Reactors, to harness the power of CodeRunner, a framework for the automated running and analysis of simulations.}
|
22
22
|
gem.email = "edmundhighcock@sourceforge.net"
|
23
23
|
gem.authors = ["Edmund Highcock"]
|
24
|
+
gem.files.exclude 'test/**/*'
|
24
25
|
# dependencies defined in Gemfile
|
25
26
|
end
|
26
27
|
Jeweler::RubygemsDotOrgTasks.new
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
data/trinitycrmod.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: trinitycrmod 0.3.
|
5
|
+
# stub: trinitycrmod 0.3.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "trinitycrmod"
|
9
|
-
s.version = "0.3.
|
9
|
+
s.version = "0.3.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
@@ -34,15 +34,6 @@ Gem::Specification.new do |s|
|
|
34
34
|
"lib/trinitycrmod/trinity_gs2.rb",
|
35
35
|
"sync_variables/helper.rb",
|
36
36
|
"sync_variables/sync_variables.rb",
|
37
|
-
"test/gs2_42982/pr08_jet_42982_1d.dat.gz",
|
38
|
-
"test/gs2_42982/pr08_jet_42982_2d.dat.gz",
|
39
|
-
"test/gs2_42982/shot42982_jet.in",
|
40
|
-
"test/gs2_42982/shot42982_jet.trin",
|
41
|
-
"test/gs2_42982_results/v.tgz",
|
42
|
-
"test/helper.rb",
|
43
|
-
"test/ifspppl/test.trin",
|
44
|
-
"test/ifspppl_results/v/id_1.tgz",
|
45
|
-
"test/test_trinitycrmod.rb",
|
46
37
|
"trinitycrmod.gemspec"
|
47
38
|
]
|
48
39
|
s.homepage = "http://github.com/edmundhighcock/trinitycrmod"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trinitycrmod
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edmund Highcock
|
@@ -133,15 +133,6 @@ files:
|
|
133
133
|
- lib/trinitycrmod/trinity_gs2.rb
|
134
134
|
- sync_variables/helper.rb
|
135
135
|
- sync_variables/sync_variables.rb
|
136
|
-
- test/gs2_42982/pr08_jet_42982_1d.dat.gz
|
137
|
-
- test/gs2_42982/pr08_jet_42982_2d.dat.gz
|
138
|
-
- test/gs2_42982/shot42982_jet.in
|
139
|
-
- test/gs2_42982/shot42982_jet.trin
|
140
|
-
- test/gs2_42982_results/v.tgz
|
141
|
-
- test/helper.rb
|
142
|
-
- test/ifspppl/test.trin
|
143
|
-
- test/ifspppl_results/v/id_1.tgz
|
144
|
-
- test/test_trinitycrmod.rb
|
145
136
|
- trinitycrmod.gemspec
|
146
137
|
homepage: http://github.com/edmundhighcock/trinitycrmod
|
147
138
|
licenses:
|
Binary file
|
Binary file
|
@@ -1,186 +0,0 @@
|
|
1
|
-
! electrostatic, kinetic electrons
|
2
|
-
|
3
|
-
¶meters
|
4
|
-
beta = 0.0
|
5
|
-
zeff = 1.7
|
6
|
-
/
|
7
|
-
|
8
|
-
&theta_grid_knobs
|
9
|
-
equilibrium_option='eik'
|
10
|
-
/
|
11
|
-
|
12
|
-
&theta_grid_parameters
|
13
|
-
ntheta= 8
|
14
|
-
nperiod= 1
|
15
|
-
|
16
|
-
! commented out parameters specified via Trinity
|
17
|
-
! rhoc = 0.5
|
18
|
-
! Rmaj = 5.0
|
19
|
-
! R_geo = 5.0
|
20
|
-
! qinp = 1.4
|
21
|
-
! shat = 0.8
|
22
|
-
! akappa = 1.0
|
23
|
-
! akappri = 0.0
|
24
|
-
! tri = 0.0
|
25
|
-
! tripri = 0.0
|
26
|
-
! shift = 0.0
|
27
|
-
/
|
28
|
-
|
29
|
-
&theta_grid_eik_knobs
|
30
|
-
itor = 1
|
31
|
-
iflux = 0
|
32
|
-
irho = 2
|
33
|
-
|
34
|
-
ppl_eq = F
|
35
|
-
gen_eq = F
|
36
|
-
|
37
|
-
efit_eq = F
|
38
|
-
local_eq = T
|
39
|
-
|
40
|
-
eqfile = 'dskeq.cdf'
|
41
|
-
equal_arc = T
|
42
|
-
bishop = 4
|
43
|
-
! s_hat_input = 0.8
|
44
|
-
! beta_prime_input = 0.0
|
45
|
-
delrho = 1.e-3
|
46
|
-
isym = 0
|
47
|
-
writelots = F
|
48
|
-
/
|
49
|
-
|
50
|
-
&collisions_knobs
|
51
|
-
collision_model='none'
|
52
|
-
/
|
53
|
-
|
54
|
-
&hyper_knobs
|
55
|
-
hyper_option = 'visc_only'
|
56
|
-
const_amp = .false.
|
57
|
-
isotropic_shear = .false.
|
58
|
-
D_hypervisc = 0.05
|
59
|
-
/
|
60
|
-
|
61
|
-
&species_knobs
|
62
|
-
nspec= 2
|
63
|
-
/
|
64
|
-
|
65
|
-
&species_parameters_1
|
66
|
-
z= 1.0
|
67
|
-
mass= 1.0
|
68
|
-
dens= 1.0
|
69
|
-
temp= 1.0
|
70
|
-
tprim= 4.0
|
71
|
-
fprim= 0.0
|
72
|
-
uprim= 0.0
|
73
|
-
vnewk= 0.0
|
74
|
-
type='ion'
|
75
|
-
/
|
76
|
-
|
77
|
-
&dist_fn_species_knobs_1
|
78
|
-
fexpr= 0.48
|
79
|
-
fexpi= 0.0
|
80
|
-
bakdif= 0.02
|
81
|
-
/
|
82
|
-
|
83
|
-
&species_parameters_2
|
84
|
-
z= -1.0
|
85
|
-
mass= 2.2e-4
|
86
|
-
dens= 1.0
|
87
|
-
temp= 1.0
|
88
|
-
tprim= 4.0
|
89
|
-
fprim= 0.0
|
90
|
-
uprim= 0.0
|
91
|
-
vnewk= 0.0
|
92
|
-
type='electron'
|
93
|
-
/
|
94
|
-
|
95
|
-
&dist_fn_species_knobs_2
|
96
|
-
fexpr= 0.48
|
97
|
-
fexpi= 0.0
|
98
|
-
bakdif= 0.02
|
99
|
-
/
|
100
|
-
|
101
|
-
&dist_fn_knobs
|
102
|
-
adiabatic_option="iphi00=2"
|
103
|
-
gridfac= 1.0
|
104
|
-
boundary_option="linked"
|
105
|
-
/
|
106
|
-
|
107
|
-
&init_g_knobs
|
108
|
-
chop_side = .false.
|
109
|
-
phiinit= 1.e-3
|
110
|
-
phifrac = 0.1
|
111
|
-
zf_init = 0.0
|
112
|
-
ginit_option= "noise"
|
113
|
-
/
|
114
|
-
|
115
|
-
&kt_grids_knobs
|
116
|
-
grid_option='box'
|
117
|
-
/
|
118
|
-
|
119
|
-
&kt_grids_box_parameters
|
120
|
-
! (25-1)/3+1 = 9 ky values
|
121
|
-
ny = 8
|
122
|
-
|
123
|
-
! 2*(40-1)/3 + 1 = 27 kx values
|
124
|
-
nx = 8
|
125
|
-
|
126
|
-
! dky = 1/y0 = 0.1 => ky: 0 -> 0.8
|
127
|
-
y0 = 10.
|
128
|
-
|
129
|
-
! default jtwist calculated in kt_grids to
|
130
|
-
! make box lengths in x and y equal at
|
131
|
-
! outboard midplane
|
132
|
-
! jtwist = 5
|
133
|
-
/
|
134
|
-
|
135
|
-
&le_grids_knobs
|
136
|
-
ngauss = 3
|
137
|
-
negrid = 6
|
138
|
-
vcut= 2.5
|
139
|
-
/
|
140
|
-
|
141
|
-
&knobs
|
142
|
-
wstar_units = .false.
|
143
|
-
fphi = 1.0
|
144
|
-
fapar = 0.0
|
145
|
-
faperp = 0.0
|
146
|
-
delt = 0.01
|
147
|
-
nstep = 60
|
148
|
-
/
|
149
|
-
|
150
|
-
&fields_knobs
|
151
|
-
field_option='implicit'
|
152
|
-
/
|
153
|
-
|
154
|
-
&nonlinear_terms_knobs
|
155
|
-
nonlinear_mode='on'
|
156
|
-
cfl = 0.25
|
157
|
-
/
|
158
|
-
|
159
|
-
&reinit_knobs
|
160
|
-
delt_adj = 2.0
|
161
|
-
delt_minimum = 1.e-6
|
162
|
-
delt_cushion = 10.0
|
163
|
-
/
|
164
|
-
|
165
|
-
&layouts_knobs
|
166
|
-
layout = 'lxyes'
|
167
|
-
local_field_solve = F
|
168
|
-
/
|
169
|
-
|
170
|
-
&gs2_diagnostics_knobs
|
171
|
-
print_flux_line=.false.
|
172
|
-
write_nl_flux = .true.
|
173
|
-
print_line = F
|
174
|
-
write_line = F
|
175
|
-
write_final_moments= T
|
176
|
-
write_avg_moments = .true.
|
177
|
-
write_final_fields=.true.
|
178
|
-
write_verr = F
|
179
|
-
write_gyx = F
|
180
|
-
write_hrate = F
|
181
|
-
write_correlation = T
|
182
|
-
nwrite= 10
|
183
|
-
navg= 40
|
184
|
-
omegatinst = 500.0
|
185
|
-
save_for_restart = .true.
|
186
|
-
/
|
@@ -1,57 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
&geometry
|
5
|
-
geo_option = "iterdb"
|
6
|
-
geo_file = "../../pr08_jet_42982_2d.dat"
|
7
|
-
geo_time = 15.2
|
8
|
-
fluxlabel_option = "aminor"
|
9
|
-
rad_out = 0.85
|
10
|
-
nrad = 5
|
11
|
-
use_external_geo = .false.
|
12
|
-
write_dbinfo = .true.
|
13
|
-
/
|
14
|
-
|
15
|
-
&species
|
16
|
-
species_option = "iterdb"
|
17
|
-
ntspec = 2
|
18
|
-
qi = 1.0
|
19
|
-
mi = 2.5
|
20
|
-
deuterium = 1
|
21
|
-
/
|
22
|
-
|
23
|
-
&time
|
24
|
-
ntstep = 2
|
25
|
-
ntdelt = 0.1
|
26
|
-
impfac = 1.0
|
27
|
-
niter = 1
|
28
|
-
errtol = 0.01
|
29
|
-
errflr = 0.01
|
30
|
-
flrfac = 2.0
|
31
|
-
ntdelt_max = 100.0
|
32
|
-
/
|
33
|
-
|
34
|
-
&fluxes
|
35
|
-
flux_option = "gs2"
|
36
|
-
vtfac = 2.0
|
37
|
-
grad_option = "tigrad"
|
38
|
-
fork_flag = .true.
|
39
|
-
subfolders = .true.
|
40
|
-
/
|
41
|
-
|
42
|
-
&physics
|
43
|
-
include_neo = .true.
|
44
|
-
turb_heat = .false.
|
45
|
-
temp_equil = .true.
|
46
|
-
/
|
47
|
-
|
48
|
-
&sources
|
49
|
-
source_option = "iterdb"
|
50
|
-
write_pwr_profs = .true.
|
51
|
-
include_radiation = .true.
|
52
|
-
include_alphas = .true.
|
53
|
-
/
|
54
|
-
|
55
|
-
&init
|
56
|
-
init_option = "iterdb"
|
57
|
-
/
|
Binary file
|
data/test/helper.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'bundler'
|
3
|
-
begin
|
4
|
-
Bundler.setup(:default, :development)
|
5
|
-
rescue Bundler::BundlerError => e
|
6
|
-
$stderr.puts e.message
|
7
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
-
exit e.status_code
|
9
|
-
end
|
10
|
-
require 'test/unit'
|
11
|
-
require 'shoulda'
|
12
|
-
|
13
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
|
-
require 'coderunner'
|
16
|
-
|
17
|
-
class Test::Unit::TestCase
|
18
|
-
end
|
data/test/ifspppl/test.trin
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
&geometry
|
5
|
-
geo_option = "iterdb"
|
6
|
-
geo_file = "../../../ifspppl/2d.dat"
|
7
|
-
geo_time = 15.2
|
8
|
-
fluxlabel_option = "aminor"
|
9
|
-
rad_out = 0.85
|
10
|
-
nrad = 9
|
11
|
-
use_external_geo = .false.
|
12
|
-
write_dbinfo = .true.
|
13
|
-
/
|
14
|
-
|
15
|
-
&species
|
16
|
-
species_option = "iterdb"
|
17
|
-
ntspec = 2
|
18
|
-
qi = 1.0
|
19
|
-
mi = 2.5
|
20
|
-
deuterium = 1
|
21
|
-
tritium = 2
|
22
|
-
/
|
23
|
-
|
24
|
-
&time
|
25
|
-
ntstep = 200
|
26
|
-
ntdelt = 0.1
|
27
|
-
impfac = 1.0
|
28
|
-
niter = 1
|
29
|
-
errtol = 0.01
|
30
|
-
errflr = 0.01
|
31
|
-
flrfac = 2.0
|
32
|
-
ntdelt_max = 100.0
|
33
|
-
/
|
34
|
-
|
35
|
-
&fluxes
|
36
|
-
flux_option = "ifspppl"
|
37
|
-
vtfac = 2.0
|
38
|
-
grad_option = "tgrads"
|
39
|
-
fork_flag = .false.
|
40
|
-
/
|
41
|
-
|
42
|
-
&physics
|
43
|
-
include_neo = .true.
|
44
|
-
turb_heat = .false.
|
45
|
-
temp_equil = .true.
|
46
|
-
/
|
47
|
-
|
48
|
-
&sources
|
49
|
-
source_option = "iterdb"
|
50
|
-
write_pwr_profs = .true.
|
51
|
-
include_radiation = .true.
|
52
|
-
include_alphas = .true.
|
53
|
-
/
|
54
|
-
|
55
|
-
&init
|
56
|
-
init_option = "iterdb"
|
57
|
-
/
|
Binary file
|
data/test/test_trinitycrmod.rb
DELETED
@@ -1,128 +0,0 @@
|
|
1
|
-
require 'helper'
|
2
|
-
|
3
|
-
class TestTrinitycrmodIFSPPPL < Test::Unit::TestCase
|
4
|
-
def setup
|
5
|
-
@runner = CodeRunner.fetch_runner(Y: 'test/ifspppl', C: 'trinity', X: '/dev/null')
|
6
|
-
end
|
7
|
-
def teardown
|
8
|
-
FileUtils.rm('test/ifspppl/.code_runner_script_defaults.rb')
|
9
|
-
FileUtils.rm('test/ifspppl/.CODE_RUNNER_TEMP_RUN_LIST_CACHE')
|
10
|
-
end
|
11
|
-
def test_basics
|
12
|
-
assert_equal(@runner.run_class, CodeRunner::Trinity)
|
13
|
-
end
|
14
|
-
def test_submit
|
15
|
-
@runner.run_class.make_new_defaults_file("rake_test", "test/ifspppl/test.trin")
|
16
|
-
FileUtils.mv('rake_test_defaults.rb', @runner.run_class.rcp.user_defaults_location)
|
17
|
-
CodeRunner.submit(Y: 'test/ifspppl', T: true, D: 'rake_test')
|
18
|
-
base_hash = @runner.run_class.parse_input_file('test/ifspppl/test.trin')
|
19
|
-
test_hash = @runner.run_class.parse_input_file('test/ifspppl/v/id_1/v_id_1_t.trin')
|
20
|
-
assert_equal(base_hash, test_hash)
|
21
|
-
FileUtils.rm(@runner.run_class.rcp.user_defaults_location + '/rake_test_defaults.rb')
|
22
|
-
FileUtils.rm('test/ifspppl/rake_test_defaults.rb')
|
23
|
-
FileUtils.rm_r('test/ifspppl/v')
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
class TestTrinitycrmodGs2 < Test::Unit::TestCase
|
28
|
-
def setup
|
29
|
-
CodeRunner.setup_run_class('trinity')
|
30
|
-
Dir.chdir('test/gs2_42982'){
|
31
|
-
CodeRunner::Trinity.use_new_defaults_file_with_gs2('rake_test_gs2_42982', 'shot42982_jet.trin', 'shot42982_jet.in')
|
32
|
-
}
|
33
|
-
@runner = CodeRunner.fetch_runner(Y: 'test/gs2_42982', C: 'trinity', X: '/dev/null')
|
34
|
-
system("gunzip test/gs2_42982/pr08_jet_42982_1d.dat.gz -c > test/gs2_42982/pr08_jet_42982_1d.dat")
|
35
|
-
system("gunzip test/gs2_42982/pr08_jet_42982_2d.dat.gz -c > test/gs2_42982/pr08_jet_42982_2d.dat")
|
36
|
-
end
|
37
|
-
def test_submit
|
38
|
-
if ENV['TRINITY_EXEC']
|
39
|
-
CodeRunner.submit(Y: 'test/gs2_42982', X: ENV['TRINITY_EXEC'], n: '8')
|
40
|
-
else
|
41
|
-
CodeRunner.submit(Y: 'test/gs2_42982', T: true, X: '/dev/null', n: '8')
|
42
|
-
end
|
43
|
-
@runner.use_component = :component
|
44
|
-
@runner.recalc_all = true
|
45
|
-
@runner.update
|
46
|
-
CodeRunner.status(Y: 'test/gs2_42982', h: :component, A: true)
|
47
|
-
end
|
48
|
-
def teardown
|
49
|
-
FileUtils.rm(@runner.run_class.rcp.user_defaults_location + '/rake_test_gs2_42982_defaults.rb')
|
50
|
-
FileUtils.rm('test/gs2_42982/rake_test_gs2_42982_defaults.rb')
|
51
|
-
FileUtils.rm('test/gs2_42982/pr08_jet_42982_1d.dat')
|
52
|
-
FileUtils.rm('test/gs2_42982/pr08_jet_42982_2d.dat')
|
53
|
-
FileUtils.rm('test/gs2_42982/.CODE_RUNNER_TEMP_RUN_LIST_CACHE')
|
54
|
-
if ENV['TRINITY_EXEC'] and not FileTest.exist?('test/gs2_42982_results/v.tgz')
|
55
|
-
Dir.chdir('test/gs2_42982'){system("tar -czf v.tgz v/")}
|
56
|
-
FileUtils.mv('test/gs2_42982/v.tgz', 'test/gs2_42982_results/.')
|
57
|
-
end
|
58
|
-
FileUtils.rm_r('test/gs2_42982/v/')
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
class TestTrinitycrmodGs2Analysis < Test::Unit::TestCase
|
63
|
-
def setup
|
64
|
-
Dir.chdir('test/gs2_42982_results/'){system "tar -xzf v.tgz"}
|
65
|
-
@runner = CodeRunner.fetch_runner(Y: 'test/gs2_42982_results', C: 'trinity', A: true)
|
66
|
-
end
|
67
|
-
def test_analysis
|
68
|
-
CodeRunner.status(Y: 'test/gs2_42982_results')
|
69
|
-
CodeRunner.status(Y: 'test/gs2_42982_results', h: :component)
|
70
|
-
end
|
71
|
-
def teardown
|
72
|
-
FileUtils.rm_r('test/gs2_42982_results/v')
|
73
|
-
FileUtils.rm('test/gs2_42982_results/.code_runner_script_defaults.rb')
|
74
|
-
FileUtils.rm('test/gs2_42982_results/.CODE_RUNNER_TEMP_RUN_LIST_CACHE')
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
class TestTrinitycrmodIFSPPPLAnalysis < Test::Unit::TestCase
|
79
|
-
def setup
|
80
|
-
#@runner = CodeRunner.fetch_runner(Y: 'test/ifspppl_results', C: 'trinity', X: '/dev/null')
|
81
|
-
Dir.chdir('test/ifspppl_results/v'){str = "tar -xzf id_1.tgz";system str}
|
82
|
-
@runner = CodeRunner.fetch_runner(Y: 'test/ifspppl_results', C: 'trinity', X: ENV['HOME'] + '/Code/trinity/trunk/trinity', A: true)
|
83
|
-
#@runner.run_class.make_new_defaults_file("rake_test", "test/ifspppl/test.trin")
|
84
|
-
#FileUtils.mv('rake_test_defaults.rb', @runner.run_class.rcp.user_defaults_location)
|
85
|
-
#CodeRunner.submit(Y: 'test/ifspppl_results', D: 'rake_test', n: '1')
|
86
|
-
end
|
87
|
-
def test_analysis
|
88
|
-
CodeRunner.status(Y: 'test/ifspppl_results')
|
89
|
-
assert_equal(@runner.run_list.size, 1)
|
90
|
-
assert_equal(@runner.run_list[1].fusionQ, 0.075658439797815016)
|
91
|
-
list_t = @runner.run_list[1].list(:t)
|
92
|
-
assert_equal(201, list_t.size)
|
93
|
-
assert_equal(0.04375, list_t[10])
|
94
|
-
FileUtils.rm('test/ifspppl_results/.CODE_RUNNER_TEMP_RUN_LIST_CACHE')
|
95
|
-
end
|
96
|
-
def test_graphs
|
97
|
-
kit = @runner.run_list[1].graphkit('ion_temp_prof', {t_index: 2})
|
98
|
-
#kit.gnuplot
|
99
|
-
assert_equal(kit.data[0].class, GraphKit::DataKit)
|
100
|
-
assert_equal(kit.data[0].x.data[0], 0.05)
|
101
|
-
kit = @runner.run_list[1].graphkit('ion_hflux_gb_prof', {t_index: 2})
|
102
|
-
#kit.gnuplot
|
103
|
-
assert_equal(kit.data[0].class, GraphKit::DataKit)
|
104
|
-
assert_equal(8,kit.data[0].y.data.size)
|
105
|
-
assert_equal(kit.data[0].y.data[0], 0.001944)
|
106
|
-
kit = @runner.run_list[1].graphkit('ion_pwr_prof', {t_index: 2})
|
107
|
-
assert_equal(8,kit.data[0].y.data.size)
|
108
|
-
assert_equal(kit.data[0].y.data[0], 0.2412)
|
109
|
-
#kit.gnuplot
|
110
|
-
end
|
111
|
-
|
112
|
-
def test_average_graphs
|
113
|
-
kit = @runner.run_list[1].graphkit('ion_hflux_gb_prof', {t_index: 2})
|
114
|
-
#kit.gnuplot
|
115
|
-
assert_equal(kit.data[0].class, GraphKit::DataKit)
|
116
|
-
assert_equal(kit.data[0].y.data[0], 0.001944)
|
117
|
-
kit = @runner.run_list[1].graphkit('ion_hflux_gb_prof', {t_index: 1})
|
118
|
-
#kit.gnuplot
|
119
|
-
assert_equal(kit.data[0].class, GraphKit::DataKit)
|
120
|
-
assert_equal(kit.data[0].y.data[0], 0.001975)
|
121
|
-
kit = @runner.run_list[1].graphkit('ion_hflux_gb_prof', {t_index: 2, time_average: -1})
|
122
|
-
assert_equal([0.001975, 0.001944].sum/2.0, kit.data[0].y.data[0])
|
123
|
-
end
|
124
|
-
def teardown
|
125
|
-
FileUtils.rm('test/ifspppl_results/.code_runner_script_defaults.rb')
|
126
|
-
FileUtils.rm_r('test/ifspppl_results/v/id_1/')
|
127
|
-
end
|
128
|
-
end
|