trinitycrmod 0.3.11 → 0.3.12

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: 75a82ccf0e47a6592c006f56cc4c5ad1b9c5b71a
4
- data.tar.gz: b4e977b1ed7c57843faf3189066ce888c3d7ffb6
3
+ metadata.gz: a84258c4e74cbad84b2cd657f8aea092d9cc7bf4
4
+ data.tar.gz: f1a9bec20a809cf64c63ad0a808edb6ae931e4da
5
5
  SHA512:
6
- metadata.gz: fd8da18810170f5360a344ca02f5c5f2e3d692d1abd3f19d5e66b470d4cbe2abb9f618b6d6e24703941ff29e3b2f32d92a1e6ffe861c856a580a2b8bcb5d6c69
7
- data.tar.gz: 7f89098359613a06789432b60511c304a598edc55e416c3a5b1be5cfcccd62e72978aef1b418e714480336cc5f0b8be0e5c40cb74e3ec989846cbfcd3617730c
6
+ metadata.gz: 14b7f43998e0d4707f6e77a929bcca7395f54a464740b5402c5e5e49a575b4e690e11bc5b6b71f4cea90bba67f1950e7ea68b1c1e34ef4f0a22e5721f7778f14
7
+ data.tar.gz: 687755340f32f4cc6e59925f338c227c400aa20ed4709f39ebf68023d18a1c558a46306eee2c600cb8fe34b79dcbddb56471867945dcdd2b81a1b5968c362243
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.11
1
+ 0.3.12
@@ -18,6 +18,7 @@ class CodeRunner
18
18
 
19
19
  # Use the Run::FortranNamelist tools to process the variable database
20
20
  setup_namelists(@code_module_folder)
21
+ @variables += [:flux_pars]
21
22
  require 'trinitycrmod/output_files'
22
23
  require 'trinitycrmod/graphs'
23
24
  require 'trinitycrmod/trinity_gs2'
@@ -95,6 +96,43 @@ class CodeRunner
95
96
  end
96
97
 
97
98
 
99
+ # Update submission parameters in the normal way then deal with parameters
100
+ # for the flux code. Each flux code will behave differently.
101
+ #
102
+ # * Gs2
103
+ # flux_pars: {nx: 43, delt: {1=> 0.01, 2=>0.05}}
104
+ # will set nx for all runs to be 43, and delt for run 1 to 0.01, delt
105
+ # for run 2 to be 0.05
106
+ def update_submission_parameters(parameters, start_from_defaults=true)
107
+ super(parameters, start_from_defaults)
108
+ if @flux_pars
109
+ @flux_pars.each do |par, val|
110
+ if @flux_option == "gs2"
111
+ if val.kind_of? Hash
112
+ val.each{|n,v| gs2_runs[n].set(par, v)}
113
+ else
114
+ gs2_runs.each{|r| r.set(par, val)}
115
+ end
116
+ end
117
+ end
118
+ end
119
+ self
120
+ end
121
+
122
+ # Override CodeRunner::Run method to deal with flux_pars properly
123
+ # when generating run_name
124
+ def generate_run_name
125
+ @run_name = %[v#@version] + @naming_pars.inject("") do |str, par|
126
+ case par
127
+ when :flux_pars
128
+ str+="_flx_#{send(par).map{|k,v| "#{k}_#{v.to_s[0..8]}"}.join("_")}}"
129
+ else
130
+ str+="_#{par}_#{send(par).to_s[0...8]}"
131
+ end
132
+ end
133
+ @run_name = @run_name.gsub(/\s+/, "_").gsub(/[\/{}]/, '') + "_id_#@id"
134
+ end
135
+
98
136
  # The number of separate flux tube results needed for the jacobian
99
137
  def n_flux_tubes
100
138
  d1 = dflx_stencil_actual - 1
data/trinitycrmod.gemspec CHANGED
@@ -2,11 +2,11 @@
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: trinitycrmod 0.3.11 ruby lib
5
+ # stub: trinitycrmod 0.3.12 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "trinitycrmod"
9
- s.version = "0.3.11"
9
+ s.version = "0.3.12"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trinitycrmod
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.11
4
+ version: 0.3.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edmund Highcock