1
# Copyright 2010 by Vincent Fourmond
3
# This small script generates the data files used for ctioga2's tests
4
# based on reading data files.
6
# This file can be distributed under the same terms as ctioga2 itself.
8
File.open("3d-data.dat",'w') do |f|
11
x = 3 * (i - nb/2)/(nb/2 * 1.0)
13
y = 3 * (j - nb/2)/(nb/2 * 1.0)
14
f.puts "#{x}\t#{y}\t#{(x**2 + y**2) * Math.exp(-x**2 - y**2)}"