gs2crmod 0.12.0 → 0.12.1

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.0
1
+ 0.12.1
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.0"
8
+ s.version = "0.12.1"
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-07-28"
12
+ s.date = "2015-08-05"
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"]
@@ -1029,10 +1029,10 @@ module GSLVectors
1029
1029
  GSL::Vector.indgen(ysize, 0, ly/ysize)
1030
1030
  end
1031
1031
 
1032
- #This function reads in the 'grho' variable from the netcdf file.
1033
- def grho_gsl_vector(options)
1034
- grho = GSL::Vector.alloc(netcdf_file.var('grho').get('start' => [0], 'end' => [-1]).to_a)
1035
- return grho
1032
+ #This function reads in the 'drhodpsi' variable from the netcdf file.
1033
+ def drhodpsi_gsl_vector(options)
1034
+ drhodpsi = netcdf_file.var('drhodpsi').get()[0]
1035
+ return drhodpsi
1036
1036
  end
1037
1037
 
1038
1038
  #This function returns the zonal flow velocity as a function of x (the radial coordinate).
@@ -1043,7 +1043,7 @@ module GSLVectors
1043
1043
  If using numerical equil use the option :kxfac to override calculation.") unless @qinp or (@pk and @epsl or options[:kxfac])
1044
1044
 
1045
1045
  kx = gsl_vector(:kx).to_box_order
1046
- grho = gsl_vector('grho')[get_list_of(:theta).length/2]
1046
+ drhodpsi = gsl_vector('drhodpsi')
1047
1047
 
1048
1048
  phi = GSL::Vector.alloc(kx.size)
1049
1049
  for it in 0...gsl_vector(:t).size
@@ -1053,9 +1053,9 @@ module GSLVectors
1053
1053
  phi /= gsl_vector(:t).size
1054
1054
 
1055
1055
  if @qinp
1056
- kxfac = (@qinp/@rhoc)*grho
1056
+ kxfac = (@qinp/@rhoc)/drhodpsi
1057
1057
  elsif @pk and @epsl
1058
- kxfac = (@epsl/@pk)*grho
1058
+ kxfac = (@epsl/@pk)/drhodpsi
1059
1059
  elsif options[:kxfac]
1060
1060
  kxfac = options[:kxfac]
1061
1061
  else
@@ -1064,7 +1064,7 @@ module GSLVectors
1064
1064
 
1065
1065
  vec_zf_vel = GSL::Vector.alloc(kx.size)
1066
1066
  #Take imaginary part since i k_x will lead to imaginary part being real
1067
- vec_zf_vel = kxfac*(phi*kx).backward.imag
1067
+ vec_zf_vel = 0.5*kxfac*(phi*kx).backward.imag
1068
1068
  return vec_zf_vel
1069
1069
  end
1070
1070
  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.12.0
4
+ version: 0.12.1
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-07-28 00:00:00.000000000 Z
13
+ date: 2015-08-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: coderunner