gs2crmod 0.11.71 → 0.11.72

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.71
1
+ 0.11.72
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.11.71"
8
+ s.version = "0.11.72"
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 = "2014-09-04"
12
+ s.date = "2014-09-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"]
@@ -180,6 +180,7 @@ GRAPHKIT_OPTIONS_HELP = {
180
180
  thetamin: "The (0-based) index of the minimum value of theta to include in the plot",
181
181
  theta_index: "integer, index of theta at which to plot (e.g. theta_index: 20)",
182
182
  kxfac: "float, overrides calculation of kxfac in zonal flow velocity function",
183
+ add_mean_flow: "bool, Adds mean flow to zonal flow velocity",
183
184
  ncopies: " The number of periodic copies of the flux tube to include",
184
185
  torphi_values: "An array of two values of the toroidal angle. The graph will be plotted in between those two values with poloidal cross sections at either end",
185
186
  magnify: " The magnification factor of the small section. It can take any value greater than or equal to 1",
@@ -2372,10 +2373,13 @@ module GraphKits
2372
2373
  when :help
2373
2374
  return "zonal_flow_velocity_vs_x: Graph of the zonal flow velocity kxfac*IFT(i k_x phi). kxfac = (qinp/rhoc)*grho(rhoc)."
2374
2375
  when :options
2375
- return [:t, :t_index, :theta_index, :kxfac]
2376
+ return [:t, :t_index, :theta_index, :kxfac, :add_mean_flow]
2376
2377
  else
2377
2378
  options[:ky_index]=0
2378
2379
  kit = GraphKit.autocreate({x: axiskit('x', options), y: axiskit("zonal_flow_velocity_over_x", options)})
2380
+ if options[:add_mean_flow]
2381
+ kit.data[0].y.data += mean_flow_velocity_over_x_gsl_vector(options)
2382
+ end
2379
2383
  kit.title = "Zonal Flow Velocity versus x"
2380
2384
  kit.file_name = options[:graphkit_name] + options[:t_index].to_s
2381
2385
  kit.data[0].with = 'lp'
@@ -1021,7 +1021,7 @@ module GSLVectors
1021
1021
 
1022
1022
  vec_zf_vel = GSL::Vector.alloc(kx.size)
1023
1023
  #Take imaginary part since i k_x will lead to imaginary part being real
1024
- vec_zf_vel = kxfac*(phi*kx).backward.imag*kx.size
1024
+ vec_zf_vel = kxfac*(phi*kx).backward.imag
1025
1025
  return vec_zf_vel
1026
1026
  end
1027
1027
  end
@@ -1031,7 +1031,7 @@ module GSLVectors
1031
1031
  #at the middle of the box.
1032
1032
  def mean_flow_velocity_over_x_gsl_vector(options)
1033
1033
  Dir.chdir(@directory) do
1034
- raise CRFatal.new("Need to have g_exb > 0 to have a mean flow.") unless @g_exb > 0
1034
+ raise CRFatal.new("Need to have g_exb > 0 to have a mean flow.") unless @g_exb
1035
1035
  x = gsl_vector(:x)
1036
1036
 
1037
1037
  vec_exb_vel = GSL::Vector.alloc(x.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.11.71
4
+ version: 0.11.72
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: 2014-09-04 00:00:00.000000000 Z
13
+ date: 2014-09-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: coderunner