gs2crmod 0.5.5 → 0.5.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 +1 -1
- data/gs2crmod.gemspec +2 -2
- data/lib/gs2crmod/gs2.rb +31 -0
- data/lib/gs2crmod/ingen.rb +3 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.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.5.
|
8
|
+
s.version = "0.5.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"]
|
12
|
-
s.date = "
|
12
|
+
s.date = "2013-02-18"
|
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"]
|
data/lib/gs2crmod/gs2.rb
CHANGED
@@ -812,6 +812,37 @@ def actual_number_of_processors
|
|
812
812
|
@nprocs.split('x').map{|n| n.to_i}.inject(1){|ntot, n| ntot*n}
|
813
813
|
end
|
814
814
|
|
815
|
+
alias :anop :actual_number_of_processors
|
816
|
+
|
817
|
+
def approximate_grid_size
|
818
|
+
case @grid_option
|
819
|
+
when "box"
|
820
|
+
(2*(@nx-1)/3+1).to_i * (@naky||(@ny-1)/3+1).to_i * @ntheta * (2 * @ngauss + @ntheta/2).to_i * @negrid * 2 * @nspec
|
821
|
+
else
|
822
|
+
@ntheta * (2 * @ngauss + @ntheta/2).to_i * @negrid * 2 * @nspec
|
823
|
+
end
|
824
|
+
end
|
825
|
+
|
826
|
+
alias :agridsze :approximate_grid_size
|
827
|
+
|
828
|
+
# Gives a guess as to the maximum number of meshpoints which
|
829
|
+
# can be parallelized (i.e. excluding ntheta)
|
830
|
+
#
|
831
|
+
def parallelizable_meshpoints
|
832
|
+
approximate_grid_size / ntheta
|
833
|
+
end
|
834
|
+
|
835
|
+
# Gives a guess as to the maximum number of nodes which can be
|
836
|
+
# can be utilized on the current system
|
837
|
+
#
|
838
|
+
def estimated_nodes
|
839
|
+
parallelizable_meshpoints / max_ppn
|
840
|
+
end
|
841
|
+
|
842
|
+
alias :estnod :estimated_nodes
|
843
|
+
|
844
|
+
|
845
|
+
|
815
846
|
|
816
847
|
def parameter_string
|
817
848
|
return "#{@run_name}.in"
|
data/lib/gs2crmod/ingen.rb
CHANGED
@@ -118,6 +118,9 @@ def ingen
|
|
118
118
|
warning("You have set both ny and naky; naky will override ny.") if @ny and @naky
|
119
119
|
|
120
120
|
error("Boundary options should not be periodic with finite magnetic shear") if @boundary_option == "periodic" and ((@s_hat_input and @s_hat_input.abs > 1.0e-6) or (@shat and @shat.abs > 1.0e-6))
|
121
|
+
|
122
|
+
error("abs(shat) should not be less that 1.0e-6") if @shat and @shat.abs < 1.0e-6
|
123
|
+
error("abs(s_hat_input) should not be less that 1.0e-6") if @s_hat_input and @s_hat_input.abs < 1.0e-6
|
121
124
|
|
122
125
|
# delt
|
123
126
|
|
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.5.
|
4
|
+
version: 0.5.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: coderunner
|