Skip to content

Commit

Permalink
[tex] more plots [spin] make scale configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Dec 15, 2009
1 parent 5503d9d commit 8658c9f
Show file tree
Hide file tree
Showing 7 changed files with 1,652 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plot.pl
Expand Up @@ -25,7 +25,7 @@

my $i = 0;
for my $fn (@files) {
$fn =~ /(energy|alpha|phi)([\d.]+)\.dat/ or die "can't work with file name `$fn'";
$fn =~ /(energy|alpha|phi|scale)([\d.]+)\.dat/ or die "can't work with file name `$fn'";
state $what //= $1;
my $datapoint = $2;
if ($what ne $1) {
Expand Down
12 changes: 10 additions & 2 deletions run.pl
Expand Up @@ -28,9 +28,10 @@
my %defaults = (
-b => 0,
-e => 2.0,
-r => 0.2,
-r => 0.1,
-p => 29,
-n => 21,
-s => 0.5,
);

my %vars = (
Expand All @@ -41,10 +42,17 @@
option => '-r',
format => 'alpha%.4f',
},
scale => {
from => 0,
to => 1.0,
step => 0.02,
option => '-s',
format => 'scale%.4f',
},
phi => {
from => 0,
to => 90,
step => 0.1,
step => 0.2,
format => 'phi%04.1f',
option => '-p',
},
Expand Down
6 changes: 5 additions & 1 deletion spin.cpp
Expand Up @@ -98,6 +98,7 @@ const num g_factor = 20.0;
num global_gauge = 1.0;

num stripe_angle = pi / 4;
num scale = 0.0;

// XXX is the +1 correct?
const num a_sample = width_sample / (num) (Nx + 1);
Expand Down Expand Up @@ -520,11 +521,14 @@ int main (int argc, char** argv) {
int opt;
ofstream *fout = new ofstream();
int n;
while ((opt = getopt(argc, argv, "qr:b:e:o:p:n:")) != -1) {
while ((opt = getopt(argc, argv, "qr:s:b:e:o:p:n:")) != -1) {
switch (opt) {
case 'r':
alpha = atof(optarg);
break;
case 's':
scale = atof(optarg);
break;
case 'b':
Bz = atof(optarg);
break;
Expand Down

0 comments on commit 8658c9f

Please sign in to comment.