gs2crmod 0.11.100 → 0.11.101
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.
- checksums.yaml +7 -0
- data/VERSION +1 -1
- data/gs2crmod.gemspec +7 -5
- data/lib/gs2crmod/calculations.rb +4 -0
- data/lib/gs2crmod/gs2.rb +2 -0
- data/lib/gs2crmod/gsl_data_3d.rb +0 -43
- metadata +22 -40
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c7e94515190d1b62a7db69e4c7070e76565330ff
|
4
|
+
data.tar.gz: 58c57e1fee6e4f6c6fc2b00bfa1fdae0c000958d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5c6b3065b8aadf887e06caabc6282f7ee61a44adf933b56a26c833cb354f3b422aba08c2001e275ef1a33b6cd121c53bad44c335a10446fcf99592ace9be8f66
|
7
|
+
data.tar.gz: 77daa27fae195f0471cd329539b55ba750fb03e7b86a74fc1bcae348da12f8971b6921f80f8fc8fe7f7f696a12cf0a954267b480040045658e48d0cecaa9fef5
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.11.
|
1
|
+
0.11.101
|
data/gs2crmod.gemspec
CHANGED
@@ -2,14 +2,17 @@
|
|
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: gs2crmod 0.11.101 ruby lib
|
6
|
+
# stub: ext/extconf.rb
|
5
7
|
|
6
8
|
Gem::Specification.new do |s|
|
7
9
|
s.name = "gs2crmod"
|
8
|
-
s.version = "0.11.
|
10
|
+
s.version = "0.11.101"
|
9
11
|
|
10
12
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
13
|
+
s.require_paths = ["lib"]
|
11
14
|
s.authors = ["Edmund Highcock", "Ferdinand van Wyk"]
|
12
|
-
s.date = "2015-07-
|
15
|
+
s.date = "2015-07-03"
|
13
16
|
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
17
|
s.email = "edmundhighcock@sourceforge.net"
|
15
18
|
s.extensions = ["ext/extconf.rb"]
|
@@ -76,13 +79,12 @@ Gem::Specification.new do |s|
|
|
76
79
|
]
|
77
80
|
s.homepage = "http://gs2crmod.sourceforge.net"
|
78
81
|
s.licenses = ["GSLv3"]
|
79
|
-
s.require_paths = ["lib"]
|
80
82
|
s.required_ruby_version = Gem::Requirement.new(">= 1.9.1")
|
81
|
-
s.rubygems_version = "
|
83
|
+
s.rubygems_version = "2.2.2"
|
82
84
|
s.summary = "Module to allow CodeRunner to run and analyse the GS2 and AstroGK codes."
|
83
85
|
|
84
86
|
if s.respond_to? :specification_version then
|
85
|
-
s.specification_version =
|
87
|
+
s.specification_version = 4
|
86
88
|
|
87
89
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
88
90
|
s.add_runtime_dependency(%q<coderunner>, [">= 0.15.5"])
|
@@ -29,14 +29,18 @@ def calculate_time_averaged_fluxes
|
|
29
29
|
@es_mom_flux_stav = {}
|
30
30
|
@es_heat_flux_stav = {}
|
31
31
|
@es_mom_flux_stav_error = {}
|
32
|
+
@es_mom_flux_stav_std_dev = {}
|
32
33
|
@es_heat_flux_stav_error = {}
|
34
|
+
@es_heat_flux_stav_std_dev = {}
|
33
35
|
|
34
36
|
@nspec.times do |i|
|
35
37
|
species_index = i + 1
|
36
38
|
@es_mom_flux_stav[species_index] = saturated_time_average('es_mom_flux_over_time', {species_index: species_index})
|
37
39
|
@es_heat_flux_stav[species_index] = saturated_time_average('es_heat_flux_over_time', {species_index: species_index})
|
38
40
|
@es_mom_flux_stav_error[species_index] = saturated_time_average_error('es_mom_flux_over_time', {species_index: species_index})
|
41
|
+
@es_mom_flux_stav_std_dev[species_index] = saturated_time_average_std_dev('es_heat_flux_over_time', {species_index: species_index})
|
39
42
|
@es_heat_flux_stav_error[species_index] = saturated_time_average_error('es_heat_flux_over_time', {species_index: species_index})
|
43
|
+
@es_heat_flux_stav_std_dev[species_index] = saturated_time_average_std_dev('es_heat_flux_over_time', {species_index: species_index})
|
40
44
|
end
|
41
45
|
# ep @es_mom_flux_stav, @es_heat_flux_stav
|
42
46
|
end
|
data/lib/gs2crmod/gs2.rb
CHANGED
data/lib/gs2crmod/gsl_data_3d.rb
CHANGED
@@ -640,53 +640,16 @@ class CodeRunner::Gs2
|
|
640
640
|
raise "ly corrected incorrectly #{ly},#{y[-1]},#{y[0]},#{y[-1]-y[0]}" unless (ly-(y[-1] - y[0])).abs / ly.abs < 1.0e-6
|
641
641
|
end
|
642
642
|
|
643
|
-
|
644
|
-
#if options[:xmax]
|
645
|
-
#if options[:xmin]
|
646
|
-
#x = x.subvector(options[:xmin], options[:xmax] - options[:xmin])
|
647
|
-
#else
|
648
|
-
#x = x[options[:xmax]].to_gslv
|
649
|
-
#end
|
650
|
-
#elsif options[:xmin]
|
651
|
-
#x = x[options[:xmin]].to_gslv
|
652
|
-
#end
|
653
|
-
#if options[:ymax]
|
654
|
-
#if options[:ymin]
|
655
|
-
#y = y.subvector(options[:ymin], options[:ymax] - options[:ymin])
|
656
|
-
#else
|
657
|
-
#y = y[options[:ymax]].to_gslv
|
658
|
-
#end
|
659
|
-
#elsif options[:ymin]
|
660
|
-
#y = y[options[:ymin]].to_gslv
|
661
|
-
#end
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
#ep [options, options[:xmin]||0, (options[:xmax]||x.size-1) - (options[:xmin]||0) + 1]
|
666
643
|
x = x.subvector(options[:xmin]||0, (options[:xmax]||x.size-1) - (options[:xmin]||0) + 1).dup # if options[:xout] and options[:xin]
|
667
644
|
y = y.subvector(options[:ymin]||0, (options[:ymax]||y.size-1) - (options[:ymin]||0) + 1).dup # if options[:yout] and options[:yin]
|
668
|
-
###y = y.subvector(options[:ymin], options[:ymax] - options[:ymin] + 1)# if yi = options[:yout] and options[:yin]
|
669
|
-
#
|
670
|
-
###ep 'ncopy', options[:ncopy]
|
671
|
-
#y = y + options[:ncopy] * (y[-1]-y[0]) if options[:ncopy]
|
672
645
|
y = y + options[:ncopy] * ly if options[:ncopy]
|
673
|
-
#ep 'y', y
|
674
|
-
#ep y; gets
|
675
|
-
#ep options; gets
|
676
646
|
theta = gsl_vector('theta', options)
|
677
|
-
#ep theta; gets;
|
678
|
-
#ep 'thsize', @ntheta, theta.size
|
679
647
|
correct_3d_options(options)
|
680
648
|
rhoc = options[:rhoc_actual]
|
681
649
|
q_actual = options[:q_actual]
|
682
650
|
xfac = 1.0 / options[:rho_star_actual]
|
683
651
|
yfac = rhoc / q_actual / options[:rho_star_actual]
|
684
652
|
factors = geometric_factors_gsl_tensor(options)
|
685
|
-
|
686
|
-
#ep ['factors.shape', factors.shape]
|
687
|
-
|
688
|
-
|
689
|
-
|
690
653
|
|
691
654
|
coordinates = GSL::Tensor.alloc(3, y.size, x.size, theta.size)
|
692
655
|
for i in 0...y.size
|
@@ -695,10 +658,8 @@ class CodeRunner::Gs2
|
|
695
658
|
coordinates[0,i,j,k] = factors[0,k] + x[j]/xfac*factors[3,k] # R
|
696
659
|
coordinates[1,i,j,k] = factors[1,k] + x[j]/xfac*factors[4,k] # Z
|
697
660
|
coordinates[2,i,j,k] = y[i] / yfac - factors[2,k] - x[j]/xfac*factors[5,k] # phi
|
698
|
-
#ep [i,j,k], coordinates[0, false, j,k].to_a
|
699
661
|
if gs2f = options[:gs2_coordinate_factor]
|
700
662
|
rgs2 = (x[j]**2 + y[i]**2 )**0.5*(1.0 + 2.0 * Float::EPSILON)
|
701
|
-
#p ['x', x[j], 'y', y[i], 'r', rgs2] if agk?
|
702
663
|
if rgs2 < 1.0e-8
|
703
664
|
phigs2 = 0
|
704
665
|
else
|
@@ -708,13 +669,9 @@ class CodeRunner::Gs2
|
|
708
669
|
coordinates[1,i,j,k] = theta[k] * gs2f + coordinates[1,i,j,k] * (1.0-gs2f)
|
709
670
|
coordinates[2,i,j,k] = phigs2 * gs2f + coordinates[2,i,j,k] * (1.0-gs2f)
|
710
671
|
end
|
711
|
-
|
712
|
-
|
713
|
-
|
714
672
|
end
|
715
673
|
end
|
716
674
|
end
|
717
|
-
#exit
|
718
675
|
case tp = options[:toroidal_projection]
|
719
676
|
when Numeric
|
720
677
|
coordinates[2, false] = tp
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gs2crmod
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
5
|
-
prerelease:
|
4
|
+
version: 0.11.101
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Edmund Highcock
|
@@ -10,60 +9,53 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2015-07-
|
12
|
+
date: 2015-07-03 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: coderunner
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- -
|
18
|
+
- - ">="
|
21
19
|
- !ruby/object:Gem::Version
|
22
20
|
version: 0.15.5
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
|
-
- -
|
25
|
+
- - ">="
|
29
26
|
- !ruby/object:Gem::Version
|
30
27
|
version: 0.15.5
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: rubyhacks
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
|
-
- -
|
32
|
+
- - ">="
|
37
33
|
- !ruby/object:Gem::Version
|
38
34
|
version: 0.1.2
|
39
35
|
type: :runtime
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
|
-
- -
|
39
|
+
- - ">="
|
45
40
|
- !ruby/object:Gem::Version
|
46
41
|
version: 0.1.2
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: ruby-netcdf
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
|
-
- -
|
46
|
+
- - ">="
|
53
47
|
- !ruby/object:Gem::Version
|
54
48
|
version: 0.7.1
|
55
49
|
type: :runtime
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
|
-
- -
|
53
|
+
- - ">="
|
61
54
|
- !ruby/object:Gem::Version
|
62
55
|
version: 0.7.1
|
63
56
|
- !ruby/object:Gem::Dependency
|
64
57
|
name: shoulda
|
65
58
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
59
|
requirements:
|
68
60
|
- - '='
|
69
61
|
- !ruby/object:Gem::Version
|
@@ -71,7 +63,6 @@ dependencies:
|
|
71
63
|
type: :development
|
72
64
|
prerelease: false
|
73
65
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
66
|
requirements:
|
76
67
|
- - '='
|
77
68
|
- !ruby/object:Gem::Version
|
@@ -79,65 +70,57 @@ dependencies:
|
|
79
70
|
- !ruby/object:Gem::Dependency
|
80
71
|
name: rdoc
|
81
72
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
73
|
requirements:
|
84
|
-
- - ~>
|
74
|
+
- - "~>"
|
85
75
|
- !ruby/object:Gem::Version
|
86
76
|
version: '3.12'
|
87
77
|
type: :development
|
88
78
|
prerelease: false
|
89
79
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
80
|
requirements:
|
92
|
-
- - ~>
|
81
|
+
- - "~>"
|
93
82
|
- !ruby/object:Gem::Version
|
94
83
|
version: '3.12'
|
95
84
|
- !ruby/object:Gem::Dependency
|
96
85
|
name: bundler
|
97
86
|
requirement: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
87
|
requirements:
|
100
|
-
- -
|
88
|
+
- - ">"
|
101
89
|
- !ruby/object:Gem::Version
|
102
90
|
version: 1.0.0
|
103
91
|
type: :development
|
104
92
|
prerelease: false
|
105
93
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
94
|
requirements:
|
108
|
-
- -
|
95
|
+
- - ">"
|
109
96
|
- !ruby/object:Gem::Version
|
110
97
|
version: 1.0.0
|
111
98
|
- !ruby/object:Gem::Dependency
|
112
99
|
name: jeweler
|
113
100
|
requirement: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
101
|
requirements:
|
116
|
-
- -
|
102
|
+
- - ">="
|
117
103
|
- !ruby/object:Gem::Version
|
118
104
|
version: 1.8.4
|
119
105
|
type: :development
|
120
106
|
prerelease: false
|
121
107
|
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
108
|
requirements:
|
124
|
-
- -
|
109
|
+
- - ">="
|
125
110
|
- !ruby/object:Gem::Version
|
126
111
|
version: 1.8.4
|
127
112
|
- !ruby/object:Gem::Dependency
|
128
113
|
name: minitest
|
129
114
|
requirement: !ruby/object:Gem::Requirement
|
130
|
-
none: false
|
131
115
|
requirements:
|
132
|
-
- - ~>
|
116
|
+
- - "~>"
|
133
117
|
- !ruby/object:Gem::Version
|
134
118
|
version: '4'
|
135
119
|
type: :development
|
136
120
|
prerelease: false
|
137
121
|
version_requirements: !ruby/object:Gem::Requirement
|
138
|
-
none: false
|
139
122
|
requirements:
|
140
|
-
- - ~>
|
123
|
+
- - "~>"
|
141
124
|
- !ruby/object:Gem::Version
|
142
125
|
version: '4'
|
143
126
|
description: GS2 is a gyrokinetic flux tube initial value turbulence code which can
|
@@ -153,7 +136,7 @@ extra_rdoc_files:
|
|
153
136
|
- README.md
|
154
137
|
- README.rdoc
|
155
138
|
files:
|
156
|
-
- .document
|
139
|
+
- ".document"
|
157
140
|
- Gemfile
|
158
141
|
- LICENSE.txt
|
159
142
|
- README.md
|
@@ -210,26 +193,25 @@ files:
|
|
210
193
|
homepage: http://gs2crmod.sourceforge.net
|
211
194
|
licenses:
|
212
195
|
- GSLv3
|
196
|
+
metadata: {}
|
213
197
|
post_install_message:
|
214
198
|
rdoc_options: []
|
215
199
|
require_paths:
|
216
200
|
- lib
|
217
201
|
required_ruby_version: !ruby/object:Gem::Requirement
|
218
|
-
none: false
|
219
202
|
requirements:
|
220
|
-
- -
|
203
|
+
- - ">="
|
221
204
|
- !ruby/object:Gem::Version
|
222
205
|
version: 1.9.1
|
223
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
224
|
-
none: false
|
225
207
|
requirements:
|
226
|
-
- -
|
208
|
+
- - ">="
|
227
209
|
- !ruby/object:Gem::Version
|
228
210
|
version: '0'
|
229
211
|
requirements: []
|
230
212
|
rubyforge_project:
|
231
|
-
rubygems_version:
|
213
|
+
rubygems_version: 2.2.2
|
232
214
|
signing_key:
|
233
|
-
specification_version:
|
215
|
+
specification_version: 4
|
234
216
|
summary: Module to allow CodeRunner to run and analyse the GS2 and AstroGK codes.
|
235
217
|
test_files: []
|