summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-03-30 17:16:41 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-03-30 17:16:41 +0000
commit468e43bc8431d700aa5b4d0a60aa1bcb0148744a (patch)
treec2809eb6bbb89e296d5087e6e43e7153c25c6d8e
parent6c284ef861b2b9b65ae9057fd8ee56c11a5914a2 (diff)
Changing names of 'hidden' parameters - i.e. unwanted parameters from
shared implementations. These names are now unique only within this header file, rather than globally. This fixes the rather nasty problem of whenever you added or removed a thorn which has a restricted parameter, every thorn which shared a parameter from any other thorn could potentially be rebuilt ! Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1504 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r--lib/sbin/create_fortran_stuff.pl13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/sbin/create_fortran_stuff.pl b/lib/sbin/create_fortran_stuff.pl
index e7b1d74e..1966c876 100644
--- a/lib/sbin/create_fortran_stuff.pl
+++ b/lib/sbin/create_fortran_stuff.pl
@@ -8,8 +8,6 @@
# @enddesc
#@@*/
-$BindingsAliasNum = 0;
-
sub CreateFortranThornParameterBindings
{
my($thorn, $rhparameter_db, $rhinterface_db) = @_;
@@ -19,6 +17,7 @@ sub CreateFortranThornParameterBindings
my(@data);
my(@file);
my(%alias_names);
+ my(%num_aliases);
push(@file, "#define DECLARE_CCTK_PARAMETERS \\");
@@ -64,6 +63,12 @@ sub CreateFortranThornParameterBindings
}
# Parameters from friends
+
+ # This number can be local to each thorn - it doesn't matter if
+ # members of a common block get different names in different
+ # thorns, especially if the variable isn't being used !
+ $num_aliases = 0;
+
foreach $friend (split(" ",$rhparameter_db->{"\U$thorn\E SHARES implementations"}))
{
@@ -85,8 +90,8 @@ sub CreateFortranThornParameterBindings
}
else
{
- $alias_names{$parameter} = "CCTKH".$BindingAliasNum;
- $BindingAliasNum++;
+ $alias_names{$parameter} = "CCTKH".$num_aliases;
+ $num_aliases++;
}
}