diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-11-09 11:37:42 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-11-09 11:37:42 +0000 |
commit | d8c1e42d838a8d98e7b45dda4a8035f7c7fbd1f9 (patch) | |
tree | 23b861b212db4704cd2bbaa074e6695281825324 /lib/sbin | |
parent | aa4a5d1c94397a4ce44679e4a0f0a5ad43e56bfc (diff) |
Added stagger and array size to CCTK_CreateGroup and renamed it CCTKi_...
since it should only be used by the perl-generated code.
IMPORTANT NOTE: You will need to do a -rebuild after this update.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1145 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin')
-rw-r--r-- | lib/sbin/GridFuncStuff.pl | 16 | ||||
-rw-r--r-- | lib/sbin/interface_parser.pl | 23 |
2 files changed, 32 insertions, 7 deletions
diff --git a/lib/sbin/GridFuncStuff.pl b/lib/sbin/GridFuncStuff.pl index 6aa14c27..c7a0ab27 100644 --- a/lib/sbin/GridFuncStuff.pl +++ b/lib/sbin/GridFuncStuff.pl @@ -1199,13 +1199,15 @@ sub CreateThornGroupInitialisers { @variables = split(" ", $rhinterface_db->{"\U$thorn GROUP $group\E"}); - $line = " CCTK_CreateGroup(\"\U$group\",\"$thorn\",\"$imp\",\n" - . " \"" . $rhinterface_db->{"\U$thorn GROUP $group\E GTYPE"} . "\",\n" - . " \"" . $rhinterface_db->{"\U$thorn GROUP $group\E VTYPE"} . "\",\n" - . " \"" . $block . "\",\n" - . " " . $rhinterface_db->{"\U$thorn GROUP $group\E DIM"} . ",\n" - . " " . $rhinterface_db->{"\U$thorn GROUP $group\E TIMELEVELS"} . ",\n" - . " ". scalar(@variables); + $line = " CCTKi_CreateGroup(\"\U$group\",\"$thorn\",\"$imp\",\n" + . " \"" . $rhinterface_db->{"\U$thorn GROUP $group\E GTYPE"} . "\",\n" + . " \"" . $rhinterface_db->{"\U$thorn GROUP $group\E VTYPE"} . "\",\n" + . " \"" . $block . "\",\n" + . " " . $rhinterface_db->{"\U$thorn GROUP $group\E DIM"} . ",\n" + . " " . $rhinterface_db->{"\U$thorn GROUP $group\E TIMELEVELS"} . ",\n" + . " \"" . $rhinterface_db->{"\U$thorn GROUP $group\E STYPE"} . "\",\n" + . " \"" . $rhinterface_db->{"\U$thorn GROUP $group\E SIZE"} . "\",\n" + . " ". scalar(@variables); foreach $variable (@variables) { $line .= ",\n \"$variable\""; diff --git a/lib/sbin/interface_parser.pl b/lib/sbin/interface_parser.pl index b68ca32b..b9c88138 100644 --- a/lib/sbin/interface_parser.pl +++ b/lib/sbin/interface_parser.pl @@ -482,6 +482,25 @@ sub check_interface_consistency $attributes{"TIMELEVELS"} = $interface_data{"\U$thorn GROUP $group\E TIMELEVELS"}; } + # Check the size array sizes are consustent. + if($attributes{"SIZE"}) + { + if($attributes{"SIZE"} ne $interface_data{"\U$thorn GROUP $group\E SIZE"}) + { + if(!$n_errors) + { + print STDERR "Inconsistent implementations of $implementation\n"; + print STDERR " Implemented by thorns " . join(" ", @thorns) . "\n"; + } + print STDERR " Group $group has inconsistent size.\n"; + $n_errors++; + } + } + else + { + $attributes{"SIZE"} = $interface_data{"\U$thorn GROUP $group\E SIZE"}; + } + # Check the dimensions are consistant if($attributes{"DIM"} && $attributes{"GTYPE"} ne "SCALAR") { @@ -648,6 +667,10 @@ sub parse_interface_ccl { $interface_db{"\U$thorn GROUP $current_group\E TIMELEVELS"} = "\U$options{$option}\E"; } + elsif($option =~ m:SIZE:i) + { + $interface_db{"\U$thorn GROUP $current_group\E SIZE"} = "\U$options{$option}\E"; + } else { $message = "Unknown option $option in group $current_group of thorn $thorn"; |