diff options
author | schnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-11-21 15:27:25 +0000 |
---|---|---|
committer | schnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-11-21 15:27:25 +0000 |
commit | a78302e02db75eefebcaea943239ec48099c556e (patch) | |
tree | 67328e853b33fda8b98b400a39c5601c26d3c1e5 /lib/sbin/GridFuncStuff.pl | |
parent | d214164831555d2307ac1c6b9bd53bee8f6f84f4 (diff) |
Allow vector groups of scalars.
Allow vector groups with more than one declared variable.
Much of this patch consists of removing special case code for scalars.
Scalars are now almost everywhere treated as rank 0 arrays.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3465 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/GridFuncStuff.pl')
-rw-r--r-- | lib/sbin/GridFuncStuff.pl | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/lib/sbin/GridFuncStuff.pl b/lib/sbin/GridFuncStuff.pl index e83985ad..80fc511a 100644 --- a/lib/sbin/GridFuncStuff.pl +++ b/lib/sbin/GridFuncStuff.pl @@ -349,7 +349,7 @@ sub GetThornArguments my $vararraysize = $rhinterface_db->{"\U$thorn GROUP $group\E VARARRAY_SIZE"}; my $compactgroup = $rhinterface_db->{"\U$thorn GROUP $group\E COMPACT"}; - if($gtype eq 'GF' || $gtype eq 'ARRAY') + if($gtype eq 'GF' || $gtype eq 'ARRAY' || ($gtype eq 'SCALAR' && defined($vararraysize))) { $type .= ' ('; @@ -1078,29 +1078,25 @@ sub CreateThornGroupInitialisers { # Check that the size is allowed. &CheckArraySizes($rhinterface_db->{"\U$thorn GROUP $group\E VARARRAY_SIZE"},$thorn,$rhparameter_db,$rhinterface_db); - # Flag Cactus that it is a vector group. - $line = ' -1'; + # Pass in the size of the GV array, which may be a valid parameter expression + $line = ' "' + . $rhinterface_db->{"\U$thorn GROUP $group\E VARARRAY_SIZE"} + . '",'; + push(@data, $line); } else { - $line = ' ' . scalar(@variables); + $line = ' NULL,'; + push(@data, $line); } + $line = ' ' . scalar(@variables); + foreach $variable (@variables) { $line .= ",\n \"$variable\""; } - # Pass in the size of the GV array, which may be a valid parameter expression - if(defined($rhinterface_db->{"\U$thorn GROUP $group\E VARARRAY_SIZE"})) - { - $line .= ','; - push(@data, $line); - $line = ' "'; - $line .= $rhinterface_db->{"\U$thorn GROUP $group\E VARARRAY_SIZE"}; - $line .= '"'; - } - $line .= ') == 1)'; push(@data, $line); |