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 | |
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
-rw-r--r-- | lib/sbin/GridFuncStuff.pl | 16 | ||||
-rw-r--r-- | lib/sbin/interface_parser.pl | 23 | ||||
-rw-r--r-- | src/include/cctki_Groups.h | 18 | ||||
-rw-r--r-- | src/main/Groups.c | 18 |
4 files changed, 52 insertions, 23 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"; diff --git a/src/include/cctki_Groups.h b/src/include/cctki_Groups.h index 5fc8c13d..3856faa2 100644 --- a/src/include/cctki_Groups.h +++ b/src/include/cctki_Groups.h @@ -17,14 +17,16 @@ extern "C" { #endif -int CCTK_CreateGroup(const char *gname, const char *thorn, const char *imp, - const char *gtype, - const char *vtype, - const char *gscope, - int dimension, - int ntimelevels, - int n_variables, - ...); +int CCTKi_CreateGroup(const char *gname, const char *thorn, const char *imp, + const char *gtype, + const char *vtype, + const char *gscope, + int dimension, + int ntimelevels, + const char *stype, + const char *size, + int n_variables, + ...); #ifdef __cplusplus } diff --git a/src/main/Groups.c b/src/main/Groups.c index 16dde95b..dc9ce880 100644 --- a/src/main/Groups.c +++ b/src/main/Groups.c @@ -167,14 +167,16 @@ void CCTK_DumpGroupInfo(void) { @endhistory @@*/ -int CCTK_CreateGroup(const char *gname, const char *thorn, const char *imp, - const char *gtype, - const char *vtype, - const char *gscope, - int dimension, - int ntimelevels, - int n_variables, - ...) +int CCTKi_CreateGroup(const char *gname, const char *thorn, const char *imp, + const char *gtype, + const char *vtype, + const char *gscope, + int dimension, + int ntimelevels, + const char *stype, + const char *size, + int n_variables, + ...) { int retval; int groupscope; |