diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-02-16 14:59:09 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-02-16 14:59:09 +0000 |
commit | b7a8832c1f9c2392e12a515d00222b0582e68848 (patch) | |
tree | b1fbaa6c34b71117625bcd292d1a471e0ce900d2 /lib/sbin/create_fortran_stuff.pl | |
parent | d434a6f0f401d2880b1cc327ee57aae08266fa81 (diff) |
Order all parameters in common blocks and structures as real, pointer, int .
Note this may cause problems with single precision runs on T3Es or alphas.
Possibly we should have seperate blocks/structures for each type of parameter.
Made sure public parameters are initialised.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@286 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/create_fortran_stuff.pl')
-rw-r--r-- | lib/sbin/create_fortran_stuff.pl | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/lib/sbin/create_fortran_stuff.pl b/lib/sbin/create_fortran_stuff.pl index 430e5402..a0e32a48 100644 --- a/lib/sbin/create_fortran_stuff.pl +++ b/lib/sbin/create_fortran_stuff.pl @@ -130,13 +130,12 @@ sub CreateFortranCommonDeclaration # Create the data - $definition_front = "COMMON /$common_block/"; - $definition = ""; + $definition = "COMMON /$common_block/"; $sepchar = ""; $n = 0; - foreach $parameter (keys %parameters) + foreach $parameter (order_params(scalar(keys %parameters), %parameters,%parameter_database)) { $type = $parameter_database{"\U$parameters{$parameter} $parameter\E type"}; @@ -153,36 +152,21 @@ sub CreateFortranCommonDeclaration push(@data, $line); - # Make up the common block declaration, putting - # strings at the start to avoid misalignment if($aliases == 0) { - if ($type_string =~ /CCTK_STRING/) - { - $definition = "$parameter$sepchar$definition"; - } - else - { - $definition .= "$sepchar$parameter"; - } + $definition .= "$sepchar$parameter"; } else { - if ($type_string =~ /CCTK_STRING/) - { - $definition = "$alias_names[$n]$sepchar$definition"; - } - else - { - $definition .= "$sepchar$alias_names[$n]"; - } + $definition .= "$sepchar$alias_names[$n]"; } + $sepchar = ","; $n++; } - push(@data, $definition_front.$definition); + push(@data, $definition); return @data; } |