gs2crmod 0.12.5 → 0.12.6

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.12.5
1
+ 0.12.6
data/gs2crmod.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "gs2crmod"
8
- s.version = "0.12.5"
8
+ s.version = "0.12.6"
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"]
12
- s.date = "2015-08-18"
12
+ s.date = "2015-08-27"
13
13
  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
14
  s.email = "edmundhighcock@sourceforge.net"
15
15
  s.extensions = ["ext/extconf.rb"]
@@ -445,7 +445,7 @@ def calculate_transient_amplifications
445
445
  phi2_vec = gsl_vector("phi2_by_#{kxy}_over_time", {kxy=>value})
446
446
  transient_amplifications[value] = calculate_transient_amplification(phi2_vec)
447
447
  (eputs "\n\n----------\nIn #@run_name:\n\nphi2_by_#{kxy}_over_time is all NaN; unable to calculate growth rate\n----------\n\n"; transient_amplifications[value] = -1; next) if transient_amplifications[value].to_s == "NaN"
448
- if @g_exb_start_timestep
448
+ if @g_exb and @g_exb > 0.0 and @g_exb_start_timestep
449
449
  @max_transient_amplification_index_at_ky[value] =
450
450
  (@g_exb_start_timestep/@nwrite).to_i +
451
451
  phi2_vec[(@g_exb_start_timestep/@nwrite).to_i...-1].max_index
@@ -658,11 +658,12 @@ alias :ctehfa :calculate_transient_es_heat_flux_amplifications
658
658
 
659
659
 
660
660
  def calculate_transient_amplification(vector, options={})
661
- if @g_exb_start_timestep
661
+ if @g_exb and @g_exb > 0.0 and @g_exb_start_timestep
662
662
  return GSL::Sf::log(vector[(@g_exb_start_timestep/@nwrite).to_i...-1].max /
663
663
  vector[(@g_exb_start_timestep/@nwrite).to_i])/2
664
664
  else
665
- eputs "Warning: set g_exb_start_timestep to calculate transient amplifications."
665
+ eputs "Warning: Transient amplification not calculated since g_exb and "\
666
+ "g_exb_start_timestep not set."
666
667
  return 0
667
668
  end
668
669
  end
@@ -1040,7 +1040,7 @@ module GSLVectors
1040
1040
  def zf_velocity_over_x_gsl_vector(options)
1041
1041
  Dir.chdir(@directory) do
1042
1042
  raise CRFatal.new("Need either qinp or pk and epsl specified in order to calculate kxfac.
1043
- If using numerical equil use the option :kxfac to override calculation.") unless @qinp or (@pk and @epsl or options[:kxfac])
1043
+ If using numerical equil use the option :kxfac to override calculation.") unless @qinp or (@pk and @eps) or options[:kxfac]
1044
1044
 
1045
1045
  kx = gsl_vector(:kx).to_box_order
1046
1046
  drhodpsi = gsl_vector('drhodpsi')
@@ -1058,8 +1058,6 @@ module GSLVectors
1058
1058
  kxfac = (@epsl/@pk)/drhodpsi
1059
1059
  elsif options[:kxfac]
1060
1060
  kxfac = options[:kxfac]
1061
- else
1062
- raise 'Error: Need qinp or pk and epsl to calculate kxfac'
1063
1061
  end
1064
1062
 
1065
1063
  vec_zf_vel = GSL::Vector.alloc(kx.size)
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.12.5
4
+ version: 0.12.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-08-18 00:00:00.000000000 Z
13
+ date: 2015-08-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: coderunner