gs2crmod 0.6.0 → 0.6.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/Rakefile +31 -1
- data/VERSION +1 -1
- data/gs2crmod.gemspec +1 -1
- data/lib/gs2crmod/graphs.rb +5 -5
- metadata +1 -1
data/Rakefile
CHANGED
|
@@ -28,9 +28,39 @@ Jeweler::Tasks.new do |gem|
|
|
|
28
28
|
end
|
|
29
29
|
Jeweler::RubygemsDotOrgTasks.new
|
|
30
30
|
|
|
31
|
+
require 'rake/clean'
|
|
32
|
+
|
|
33
|
+
NAME = 'gs2crmod'
|
|
34
|
+
|
|
35
|
+
# rule to build the extension: this says
|
|
36
|
+
# that the extension should be rebuilt
|
|
37
|
+
# after any change to the files in ext
|
|
38
|
+
file "lib/#{NAME}_ext.so" =>
|
|
39
|
+
Dir.glob("ext/*{.rb,.c}") do
|
|
40
|
+
Dir.chdir("ext") do
|
|
41
|
+
# this does essentially the same thing
|
|
42
|
+
# as what RubyGems does
|
|
43
|
+
ruby "extconf.rb"
|
|
44
|
+
sh "make"
|
|
45
|
+
end
|
|
46
|
+
cp "ext/#{NAME}_ext.so", "lib/#{NAME}_ext.so"
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# make the :test task depend on the shared
|
|
50
|
+
# object, so it will be built automatically
|
|
51
|
+
# before running the tests
|
|
52
|
+
task :test => "lib/#{NAME}_ext.so"
|
|
53
|
+
|
|
54
|
+
# use 'rake clean' and 'rake clobber' to
|
|
55
|
+
# easily delete generated files
|
|
56
|
+
CLEAN.include('ext/**/*{.o,.log,.so}')
|
|
57
|
+
CLEAN.include('ext/**/Makefile')
|
|
58
|
+
CLOBBER.include('lib/**/*.so')
|
|
59
|
+
CLOBBER.include('lib/*.so')
|
|
60
|
+
|
|
31
61
|
require 'rake/testtask'
|
|
32
62
|
Rake::TestTask.new(:test) do |test|
|
|
33
|
-
test.libs << 'lib' << 'test'
|
|
63
|
+
test.libs << 'lib' << 'test' << 'ext'
|
|
34
64
|
test.pattern = 'test/**/test_*.rb'
|
|
35
65
|
test.verbose = true
|
|
36
66
|
end
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.6.
|
|
1
|
+
0.6.1
|
data/gs2crmod.gemspec
CHANGED
data/lib/gs2crmod/graphs.rb
CHANGED
|
@@ -340,14 +340,14 @@ module GraphKits
|
|
|
340
340
|
|
|
341
341
|
alias :eigenfunction_graphkit :efn_graphkit
|
|
342
342
|
|
|
343
|
-
def
|
|
343
|
+
def es_heat_flux_vs_ky_vs_kx_graphkit(options={})
|
|
344
344
|
case options[:command]
|
|
345
345
|
when :help
|
|
346
346
|
return "Graph of electrostatic contribution to heat flux at a given time vs kx and ky"
|
|
347
347
|
when :options
|
|
348
348
|
return [:with]
|
|
349
349
|
else
|
|
350
|
-
zaxis = axiskit('
|
|
350
|
+
zaxis = axiskit('es_heat_flux_over_ky_over_kx', options)
|
|
351
351
|
zaxis.data = zaxis.data.transpose
|
|
352
352
|
kit = GraphKit.autocreate({y: axiskit('ky', options), x: axiskit('kx', options), z: zaxis})
|
|
353
353
|
kit.title = "Heat flux"
|
|
@@ -357,7 +357,7 @@ module GraphKits
|
|
|
357
357
|
end
|
|
358
358
|
end
|
|
359
359
|
|
|
360
|
-
def
|
|
360
|
+
def es_heat_vs_ky_graphkit(options={})
|
|
361
361
|
case options[:command]
|
|
362
362
|
when :help
|
|
363
363
|
return "Heat flux vs ky"
|
|
@@ -368,7 +368,7 @@ module GraphKits
|
|
|
368
368
|
end
|
|
369
369
|
end
|
|
370
370
|
|
|
371
|
-
def
|
|
371
|
+
def es_heat_vs_kxy_graphkit(options={})
|
|
372
372
|
case options[:command]
|
|
373
373
|
when :help
|
|
374
374
|
return "Heat flux vs options[:direction] (kx or ky)"
|
|
@@ -376,7 +376,7 @@ module GraphKits
|
|
|
376
376
|
return [:ky_index, :species_index]
|
|
377
377
|
else
|
|
378
378
|
kxy = options[:direction]||options[:kxy]
|
|
379
|
-
kit = GraphKit.autocreate({x: axiskit(kxy.to_s, options), y: axiskit("
|
|
379
|
+
kit = GraphKit.autocreate({x: axiskit(kxy.to_s, options), y: axiskit("es_flux_vs_#{kxy}", options)})
|
|
380
380
|
kit.title = "Heat flux vs #{kxy} for species #{options[:species_index]}"
|
|
381
381
|
kit.file_name = options[:graphkit_name] + options[:t_index].to_s
|
|
382
382
|
kit.data[0].with = 'lp'
|