gs2crmod 0.11.9 → 0.11.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/VERSION +1 -1
- data/gs2crmod.gemspec +6 -6
- data/lib/gs2crmod/gs2.rb +35 -23
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48b18c72924c4dd3c4a6903e056fd3f5596f05c0
|
4
|
+
data.tar.gz: 8bb10587ad049adcff94c5e66b02f8d6f2a5552a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26ff9056f6278bb6e8339d75f404353741b313873cbb26764dec6d5848afcde00ed28d9db92e8d800b05a82903a8412bf5dd33c4ce21e5faa6b2b3c501b4d71d
|
7
|
+
data.tar.gz: b829f9656c0d81b5c04226645b774bc6d0954615488f425356f94ae7ef5df98dd7466e5b0be7813230db1f2f56debdc527e7e6e8f7690aff784eef1b7657811c
|
data/Gemfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
2
|
# Add dependencies required to use your gem here.
|
3
3
|
# Example:
|
4
|
-
gem "coderunner", ">= 0.
|
4
|
+
gem "coderunner", ">= 0.14.0"
|
5
5
|
gem "rubyhacks", ">= 0.1.2"
|
6
6
|
# It seems necessary to have the following line un-commented on some systems but commented out on other systems:
|
7
7
|
gem "ruby-netcdf", ">= 0.6.6.1"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.11.
|
1
|
+
0.11.11
|
data/gs2crmod.gemspec
CHANGED
@@ -2,17 +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.
|
5
|
+
# stub: gs2crmod 0.11.11 ruby lib
|
6
6
|
# stub: ext/extconf.rb
|
7
7
|
|
8
8
|
Gem::Specification.new do |s|
|
9
9
|
s.name = "gs2crmod"
|
10
|
-
s.version = "0.11.
|
10
|
+
s.version = "0.11.11"
|
11
11
|
|
12
12
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
13
13
|
s.require_paths = ["lib"]
|
14
14
|
s.authors = ["Edmund Highcock", "Ferdinand van Wyk"]
|
15
|
-
s.date = "2014-
|
15
|
+
s.date = "2014-02-04"
|
16
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."
|
17
17
|
s.email = "edmundhighcock@sourceforge.net"
|
18
18
|
s.extensions = ["ext/extconf.rb"]
|
@@ -93,7 +93,7 @@ Gem::Specification.new do |s|
|
|
93
93
|
s.specification_version = 4
|
94
94
|
|
95
95
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
96
|
-
s.add_runtime_dependency(%q<coderunner>, [">= 0.
|
96
|
+
s.add_runtime_dependency(%q<coderunner>, [">= 0.14.0"])
|
97
97
|
s.add_runtime_dependency(%q<rubyhacks>, [">= 0.1.2"])
|
98
98
|
s.add_runtime_dependency(%q<ruby-netcdf>, [">= 0.6.6.1"])
|
99
99
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
@@ -101,7 +101,7 @@ Gem::Specification.new do |s|
|
|
101
101
|
s.add_development_dependency(%q<bundler>, ["> 1.0.0"])
|
102
102
|
s.add_development_dependency(%q<jeweler>, [">= 1.8.4"])
|
103
103
|
else
|
104
|
-
s.add_dependency(%q<coderunner>, [">= 0.
|
104
|
+
s.add_dependency(%q<coderunner>, [">= 0.14.0"])
|
105
105
|
s.add_dependency(%q<rubyhacks>, [">= 0.1.2"])
|
106
106
|
s.add_dependency(%q<ruby-netcdf>, [">= 0.6.6.1"])
|
107
107
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
@@ -110,7 +110,7 @@ Gem::Specification.new do |s|
|
|
110
110
|
s.add_dependency(%q<jeweler>, [">= 1.8.4"])
|
111
111
|
end
|
112
112
|
else
|
113
|
-
s.add_dependency(%q<coderunner>, [">= 0.
|
113
|
+
s.add_dependency(%q<coderunner>, [">= 0.14.0"])
|
114
114
|
s.add_dependency(%q<rubyhacks>, [">= 0.1.2"])
|
115
115
|
s.add_dependency(%q<ruby-netcdf>, [">= 0.6.6.1"])
|
116
116
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
data/lib/gs2crmod/gs2.rb
CHANGED
@@ -299,9 +299,9 @@ end
|
|
299
299
|
|
300
300
|
#
|
301
301
|
|
302
|
-
def
|
303
|
-
@
|
304
|
-
logf(:
|
302
|
+
def generate_component_runs
|
303
|
+
@component_runs = []
|
304
|
+
logf(:generate_component_runs)
|
305
305
|
return if @grid_option == "single" and @scan_type == "none"
|
306
306
|
begin
|
307
307
|
list(:ky) # This will fail unless the run has output the netcdf file
|
@@ -315,13 +315,13 @@ def generate_phantom_runs
|
|
315
315
|
# raise CRFatal.new("no @ky_list") unless @ky_list
|
316
316
|
# log list(:ky)
|
317
317
|
list(:ky).each do |id, ky|
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
log @runner.
|
318
|
+
component_run = create_component #self.dup
|
319
|
+
component_run.ky = ky
|
320
|
+
component_run.gamma_r = @growth_rates[ky]
|
321
|
+
component_run.gamma_i = @real_frequencies[ky]
|
322
|
+
log @runner.component_ids
|
323
323
|
# log('@runner.class', @runner.class)
|
324
|
-
# @runner.
|
324
|
+
# @runner.add_component_run(component_run)
|
325
325
|
end
|
326
326
|
elsif (not gryfx?) and @scan_type and @scan_type != "none"
|
327
327
|
t = gsl_vector('t')
|
@@ -330,14 +330,14 @@ def generate_phantom_runs
|
|
330
330
|
start = 0
|
331
331
|
for i in 0...t.size
|
332
332
|
if scan_vals[i] != current
|
333
|
-
|
334
|
-
|
335
|
-
#ep 'scan_index_window',
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
333
|
+
component = create_component
|
334
|
+
component.scan_index_window = [start+1, i] #remember indexes are elements + 1
|
335
|
+
#ep 'scan_index_window', component.scan_index_window
|
336
|
+
component.scan_parameter_value = current
|
337
|
+
component.growth_rate_at_ky = nil
|
338
|
+
component.growth_rate_at_kx = nil
|
339
|
+
component.growth_rate_at_ky_at_kx = nil
|
340
|
+
component.calculate_results
|
341
341
|
current = scan_vals[i]
|
342
342
|
start = i
|
343
343
|
end
|
@@ -659,7 +659,13 @@ def get_status
|
|
659
659
|
elsif @nonlinear_mode == "on" or !@omegatol or @omegatol < 0.0 or (@exit_when_converged and @exit_when_converged.fortran_false?)
|
660
660
|
eputs 'No omegatol'
|
661
661
|
if FileTest.exist?(@run_name + ".out.nc")
|
662
|
-
|
662
|
+
#p ['pwd', Dir.pwd, netcdf_file, netcdf_file.dim('t'), netcdf_file.dims]
|
663
|
+
if netcdf_file.dim('t').length > 0
|
664
|
+
get_completed_timesteps
|
665
|
+
else
|
666
|
+
@status = :Failed
|
667
|
+
return
|
668
|
+
end
|
663
669
|
else
|
664
670
|
eputs "Warning: no netcdf file #@run_name.out.nc"
|
665
671
|
@status = :Failed
|
@@ -667,7 +673,7 @@ def get_status
|
|
667
673
|
end
|
668
674
|
#ep "completed_timesteps", @completed_timesteps
|
669
675
|
eputs "#{percent_complete}% of Timesteps Complete"
|
670
|
-
if percent_complete
|
676
|
+
if percent_complete >= 100.0
|
671
677
|
@status = :Complete
|
672
678
|
elsif percent_complete > 5 and FileUtils.tail(output_file, 200) =~ /total from timer is/
|
673
679
|
@status = :Complete
|
@@ -767,7 +773,7 @@ def recheck
|
|
767
773
|
end
|
768
774
|
|
769
775
|
|
770
|
-
def generate_input_file
|
776
|
+
def generate_input_file(&block)
|
771
777
|
raise CRFatal("No Input Module File Given or Module Corrupted") unless methods.include? (:input_file_text)
|
772
778
|
run_namelist_backwards_compatibility
|
773
779
|
if @restart_id
|
@@ -808,9 +814,15 @@ def generate_input_file
|
|
808
814
|
set_nprocs
|
809
815
|
|
810
816
|
|
811
|
-
|
812
|
-
|
813
|
-
|
817
|
+
if block
|
818
|
+
##### Allow the user to define their own pre-flight checks and changes
|
819
|
+
instance_eval(&block)
|
820
|
+
else
|
821
|
+
######### Check for errors and inconsistencies
|
822
|
+
ingen
|
823
|
+
#########
|
824
|
+
end
|
825
|
+
|
814
826
|
|
815
827
|
write_input_file
|
816
828
|
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.11.
|
4
|
+
version: 0.11.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edmund Highcock
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-02-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: coderunner
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.
|
20
|
+
version: 0.14.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.
|
27
|
+
version: 0.14.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rubyhacks
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|