gs2crmod 0.11.54 → 0.11.55

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2eb9d6fb9a9758873a9505f2ae4a0b79faba7dd
4
- data.tar.gz: 3e4dabc80ff423a5f462771507044a52fcfe645c
3
+ metadata.gz: c31f9f94d4ee877354ea333dc090790a3d3d40ac
4
+ data.tar.gz: aceb9deb1003065b4fb3941dd19568689c36c6f5
5
5
  SHA512:
6
- metadata.gz: 042f232939af386c2ffe039d6b2dae56f395a6a7320426bf017ad6cf13f64926834003625c5e5a18114c8d47a6df673ce8db976af2f70c8e6df9059864875a97
7
- data.tar.gz: e024d89c3ed82ec640f121f54846150d6e4a1a8ee8236197f85b86b2a0e748da5dae9def77006f4bcd56a752397aeeed0f3154d16e87151135a8809eab1e15de
6
+ metadata.gz: 8b11926703a4627d36891b5289baa606257da618c26d2945744224611c259efc80fc9c1b58a53efa5ebcff1409055f9dfd1b2f8c56afe919e90aed3d87754930
7
+ data.tar.gz: a04cbd4bba9223f25b3d5dbec7fe1170bdbef6e2e4058780a39f5b1b021a54c859ab16008a46df18aac1a40fb07ad6d005bbe08c86ff6d98c654a23aa58f2e42
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.54
1
+ 0.11.55
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.54 ruby lib
5
+ # stub: gs2crmod 0.11.55 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.54"
10
+ s.version = "0.11.55"
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-07-09"
15
+ s.date = "2014-07-22"
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"]
data/lib/gs2crmod/gs2.rb CHANGED
@@ -378,7 +378,7 @@ def get_time
378
378
  end
379
379
 
380
380
  def get_completed_timesteps
381
- #raise CRFatal.new("Couldn't find outfile #{@run_name}.out") unless FileTest.exist?(@run_name + ".out")
381
+ #raise CRFatal.new("Couldn't find outfile #{@run_name}.out") unless FileTest.exist?(@run_name + ".out")
382
382
  #p 'try to get completed_timesteps', Dir.pwd, 'nwrite', @nwrite, 'delt', @delt
383
383
  @completed_timesteps = (list(:t).size - 1) * (@nwrite || 1)
384
384
  #p 'tried to get completed_timesteps'
@@ -437,9 +437,9 @@ def print_out_line
437
437
  name += " (res: #@restart_id)" if @restart_id
438
438
  name += " real_id: #@real_id" if @real_id
439
439
  beginning = sprintf("%2d:%d %-60s %1s:%2.1f(%s) %3s%1s %1s", @id, @job_no, name, @status.to_s[0,1], @run_time.to_f / 60.0, @nprocs.to_s, percent_complete, "%", @converged.to_s)
440
- if @ky
440
+ if @ky
441
441
  beginning += sprintf("%3s %4s %4s", @ky, @growth_rates[@ky], @real_frequencies[@ky])
442
- elsif @nonlinear_mode == "off"
442
+ elsif @nonlinear_mode == "off"
443
443
  beginning += sprintf("%3s %4s %4s",
444
444
  @fastest_growing_mode, @max_growth_rate,
445
445
  @freq_of_max_growth_rate)
@@ -194,89 +194,111 @@ def old_smart_graphkit(options)
194
194
  end
195
195
 
196
196
  def hyperviscosity_graphkit(options)
197
- raise "This only works for spectrogk" unless spectrogk?
198
- options[:modify_variable] = Proc.new do |varname, narray, dimhash|
199
- #dimnames = dimhash.keys
200
- shape = narray.shape
201
- if varname == "gnew2_ta"
202
- #p dimhash
203
- #p dimhash['Y']
204
- ky = dimhash['Y'].to_a.to_gslv
205
- kx = dimhash['X'].to_a.to_gslv
206
- shape = narray.shape
207
- for ig in 0...shape[0]
208
- for it in 0...shape[1]
209
- for ik in 0...shape[2]
210
- for il in 0...shape[3]
211
- for ie in 0...shape[4]
212
- for is in 0...shape[5]
213
- narray[ig,it,ik,il,ie,is]*=(ky[ik]**2.0 + kx[it]**2.0)**(2*@nexp)*@d_hypervisc
214
- end
215
- end
216
- end
217
- end
218
- end
219
- end
220
- end
221
- narray
222
- end
223
- options[:graphkit_name] = 'cdf_gnew2_ta'
224
- kit = smart_graphkit(options)
197
+ case options[:command]
198
+ when :help
199
+ "Plot of the effect of hyperviscosity"
200
+ when :options
201
+ return []
202
+ else
203
+ raise "This only works for spectrogk" unless spectrogk?
204
+ options[:modify_variable] = Proc.new do |varname, narray, dimhash|
205
+ #dimnames = dimhash.keys
206
+ shape = narray.shape
207
+ if varname == "gnew2_ta"
208
+ #p dimhash
209
+ #p dimhash['Y']
210
+ ky = dimhash['Y'].to_a.to_gslv
211
+ kx = dimhash['X'].to_a.to_gslv
212
+ shape = narray.shape
213
+ for ig in 0...shape[0]
214
+ for it in 0...shape[1]
215
+ for ik in 0...shape[2]
216
+ for il in 0...shape[3]
217
+ for ie in 0...shape[4]
218
+ for is in 0...shape[5]
219
+ narray[ig,it,ik,il,ie,is]*=(ky[ik]**2.0 + kx[it]**2.0)**(2*@nexp)*@d_hypervisc
220
+ end
221
+ end
222
+ end
223
+ end
224
+ end
225
+ end
226
+ end
227
+ narray
228
+ end
229
+ options[:graphkit_name] = 'cdf_gnew2_ta'
230
+ return smart_graphkit(options)
231
+ end
225
232
  end
226
233
  def hypercoll_graphkit(options)
227
- raise "This only works for spectrogk" unless spectrogk?
228
- options[:modify_variable] = Proc.new do |varname, narray, dimhash|
229
- #dimnames = dimhash.keys
230
- p varname, dimhash
231
- if varname == "gnew2_ta"
232
- shape = narray.shape
233
- m = dimhash['m']
234
- mmax = new_netcdf_file.var('hermite').get.to_a.size - 1
235
- p 'shape',shape
236
- for ig in 0...shape[0]
237
- for it in 0...shape[1]
238
- for ik in 0...shape[2]
239
- for il in 0...shape[3]
240
- for ie in 0...shape[4]
241
- for is in 0...shape[5]
242
- narray[ig,it,ik,il,ie,is]*=send(:nu_h_ + (is+1).to_sym)*(m[il]/mmax)**send(:nexp_h_ + (is+1).to_sym)
243
- end
244
- end
245
- end
246
- end
247
- end
248
- end
249
- end
250
- narray
251
- end
252
- options[:graphkit_name] = 'cdf_gnew2_ta'
253
- kit = smart_graphkit(options)
234
+ case options[:command]
235
+ when :help
236
+ "Plot of the effect of hypercollisions"
237
+ when :options
238
+ return []
239
+ else
240
+ raise "This only works for spectrogk" unless spectrogk?
241
+ options[:modify_variable] = Proc.new do |varname, narray, dimhash|
242
+ #dimnames = dimhash.keys
243
+ p varname, dimhash
244
+ if varname == "gnew2_ta"
245
+ shape = narray.shape
246
+ m = dimhash['m']
247
+ mmax = new_netcdf_file.var('hermite').get.to_a.size - 1
248
+ p 'shape',shape
249
+ for ig in 0...shape[0]
250
+ for it in 0...shape[1]
251
+ for ik in 0...shape[2]
252
+ for il in 0...shape[3]
253
+ for ie in 0...shape[4]
254
+ for is in 0...shape[5]
255
+ narray[ig,it,ik,il,ie,is]*=send(:nu_h_ + (is+1).to_sym)*(m[il]/mmax)**send(:nexp_h_ + (is+1).to_sym)
256
+ end
257
+ end
258
+ end
259
+ end
260
+ end
261
+ end
262
+ end
263
+ narray
264
+ end
265
+ options[:graphkit_name] = 'cdf_gnew2_ta'
266
+ return smart_graphkit(options)
267
+ end
254
268
  end
255
269
  def lenardbern_graphkit(options)
256
- raise "This only works for spectrogk" unless spectrogk?
257
- options[:modify_variable] = Proc.new do |varname, narray, dimhash|
258
- #dimnames = dimhash.keys
259
- if varname == "gnew2_ta"
260
- m = dimhash['m']
261
- shape = narray.shape
262
- for ig in 0...shape[0]
263
- for it in 0...shape[1]
264
- for ik in 0...shape[2]
265
- for il in 0...shape[3]
266
- for ie in 0...shape[4]
267
- for is in 0...shape[5]
268
- narray[ig,it,ik,il,ie,is]*=send(:nu_ + (is+1).to_sym)*m[il]
269
- end
270
- end
271
- end
272
- end
273
- end
274
- end
275
- end
276
- narray
277
- end
278
- options[:graphkit_name] = 'cdf_gnew2_ta'
279
- kit = smart_graphkit(options)
270
+ case options[:command]
271
+ when :help
272
+ "Plot of the effect of Lenard Bernstein collisions"
273
+ when :options
274
+ return []
275
+ else
276
+ raise "This only works for spectrogk" unless spectrogk?
277
+ options[:modify_variable] = Proc.new do |varname, narray, dimhash|
278
+ #dimnames = dimhash.keys
279
+ if varname == "gnew2_ta"
280
+ m = dimhash['m']
281
+ shape = narray.shape
282
+ for ig in 0...shape[0]
283
+ for it in 0...shape[1]
284
+ for ik in 0...shape[2]
285
+ for il in 0...shape[3]
286
+ for ie in 0...shape[4]
287
+ for is in 0...shape[5]
288
+ narray[ig,it,ik,il,ie,is]*=send(:nu_ + (is+1).to_sym)*m[il]
289
+ end
290
+ end
291
+ end
292
+ end
293
+ end
294
+ end
295
+ end
296
+ narray
297
+ end
298
+ options[:graphkit_name] = 'cdf_gnew2_ta'
299
+ kit = smart_graphkit(options)
300
+ return kit
301
+ end
280
302
  end
281
303
 
282
304
 
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.54
4
+ version: 0.11.55
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-07-09 00:00:00.000000000 Z
12
+ date: 2014-07-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: coderunner