summaryrefslogtreecommitdiff
path: root/lib/sbin/GridFuncStuff.pl
Commit message (Collapse)AuthorAge
* Don't include <string.h> into auto-generated interface files, since itschnetter2008-01-25
| | | | | | | is not needed. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4450 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed compiler warning about missing prototype for strlen(3) in generated codetradke2006-07-04
| | | | | | | which checks for mixed-dimensional GFs. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4339 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Application of patchswhite2006-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GridFuncStuff bug fix and cleanup http://www.cactuscode.org/old/pipermail/patches/2006-May/000165.html It fixes two minor bugs (that is, bugs that weren't bugging anybody right now). It also includes an overall cleanup of the code, which begain with the first bug fix, and resulted in the discovery of the second bug. The first bug fix was to put in use strict; (According to L. Wall, a Perl file without use strict constitutes a bug.) This resulted in lots of errors about variables needing their scope to be specified. So I did this. At the end, I found that I couldn't fix a certain occurrance of $group. There was no sensible way that it was being set. The code was to produce a warning concerning creating groups with mixed dimensions. See 'warn_mixeddim_gfs'. The Perl code was taking a global value of $group set at build time to be the last group in a loop. However, the offending group is determined at run time in CreateThornGroupInitializers. So the warning message would typically be wrong. Affect code written in bindings/Variables/<thorn>.c Also: Perl 5-ied function calls deleted great wads of commented-out code Testing ------- Ran testsuites on my laptop with Whisky benchmark thornlist. No change was detected in the results. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4315 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Undo changes that prevent more unwanted warnings about unused variables.schnetter2005-09-28
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4155 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Change the names of the internal routine arguments that contain theschnetter2005-09-26
| | | | | | | | | array shapes. They used to have a digit appended to an existing group name, which can clash with another existing group name. The new name has the digit in front, which cannot be a legal group name. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4147 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Introduce macros CCTK_DECLARE and CCTK_DECLARE_INIT which declare orschnetter2005-09-26
| | | | | | | | | | | | | | declare and initialise local variables. They also add the necessary magic to prevent compiler warnings about unused variables. If the compiler supports __attribute__((unused)), then use this. Otherwise, use the existing fallback of taking the variable's address. In Fortran, use the variable's kind as fallback. Use these macros in autogenerated code and in "cctk.h". git-svn-id: http://svn.cactuscode.org/flesh/trunk@4146 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Make some internal macros safer by adding parenthesesschnetter2005-09-25
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4140 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Also check consistency of GHOSTSIZE option in CreateThornGroupInitialisers().tradke2005-08-30
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4115 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Correct typo in commentschnetter2005-06-05
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4074 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Remove support for grid variables of type CCTK_CHARschnetter2005-01-29
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3973 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add missing #include <stddef.h> to autogenerated filesschnetter2005-01-22
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3963 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changed way that variables are automatically 'used' so that we don't getgoodale2005-01-07
| | | | | | | compiler warnings about the restrict qualifier. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3952 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add the restrict qualifier to C/C++ arguments.goodale2004-11-30
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3920 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Cast the Fortran CCTK_ARGUMENTS list elements from void* to theschnetter2004-11-05
| | | | | | | correct type. This is necessary to call Fortran routines from C++. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3900 17b73243-c579-4c4c-a9d2-2d5706c11dac
* More informative warning messages.goodale2004-08-17
| | | | | | | | Patch from Yaakoub. Fixes PR 1818. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3837 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Catch syntax errors in size specifications like in "SIZE=1,2,".tradke2004-04-30
| | | | | | | This closes Cactus/1663: incorrect interface is undetected by CST but produces runtime error. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3679 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changed CCTK_DECLARE_ARGUMENTS and CCTK_DECLARE_PARAMETERS macros so thattradke2004-04-24
| | | | | | | | | | local variables/parameters are now used in their declarations block without requiring separate USE_CCTK_* macros). This closes PR Cactus/1657: CST doesn't ignore braces "{" instring literals. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3677 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Allow global parameters in size declarations of ARRAYs.rideout2003-12-06
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3473 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Allow vector groups of scalars.schnetter2003-11-21
| | | | | | | | | | 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
* Introduce the new Cactus variable type CCTK_INT1.schnetter2003-10-13
| | | | | | | Extend routines to handle the new type. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3431 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Traverse all hashes alphabetically, so that all output files of theschnetter2003-10-07
| | | | | | | | CST stage will be identical. This is necessary at least since perl 5.8.1 to avoid redundant recompilation. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3425 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Operators in expressions are only one character in length.rideout2003-07-15
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3279 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Improved pattern matching in last commit for array SIZE values so that itallen2003-07-07
| | | | | | | doesn't error for DIM 1 git-svn-id: http://svn.cactuscode.org/flesh/trunk@3260 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed error message.allen2003-07-07
| | | | | | | Fixes Cactus/1128 git-svn-id: http://svn.cactuscode.org/flesh/trunk@3257 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Eliminate white space in parameter expressions, so that they arerideout2003-05-23
| | | | | | | | | parsed properly. Fixes Cactus/1520. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3222 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changed the NULL-pointer passing for non-existing or non-allocated gridtradke2003-02-13
| | | | | | | | | | | | | variables from C wrappers to scheduled fortran routines. Now this feature is only enabled in debugging configurations (DEBUG=yes). For other configurations, a pointer to a local dummy variable is passed now as a reference to those variables. This fixes problems with certain fortran compilers (SGI, Hitachi) which may generate conditional load/store ops with a certain optimization level. Such optimizations require fortran data references to be non-NULL. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3142 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Now remove debugging statements accidently left inallen2003-01-26
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3106 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Removed extra comma in CST generated files for vector groupsallen2003-01-26
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3105 17b73243-c579-4c4c-a9d2-2d5706c11dac
* A thorn's CCTKi_BindingsFortranWrapperXXX() routine is now static and definedtradke2003-01-24
| | | | | | | | | | in the CST-generated file "Variables/${thorn}.c" where it is also registered. No "${thorn}_FortranWrapper.c" files are created anymore which should save some compilation time during a rebuild. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3100 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Allow square brackets in expression for size of grid arrays. Fixesrideout2003-01-23
| | | | | | | | | Cactus/1365. Fix spelling of 'arithmetic'. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3097 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changed the definition of the DECLARE_CCTK_<THORN>_CARGUMENTS macros:tradke2002-06-21
| | | | | | | | | | | | | | | | they call the flesh-internal routine CCTKi_VarDataPtr() now to obtain the data pointer for a given variable. This replaces a call to CCTK_VarIndex() which returned an invalid index for non-existing variables and thus was a potential source for a code crash. Calling CCTKi_VarDataPtr() should also be faster than CCTK_VarIndex() and makes the macros a bit shorter. Also cleaned up the other CST generated code a bit, added a grdoc header. You must also update src/main/Groups.c and lib/sbin/GridFuncStuff.pl now and do a 'make <configuration>-clean; make <configuration>-rebuild;'. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2912 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Use CCTK_VarDataPtr() rather than cctk->data[CCTK_VarIndex("some_var")] in thetradke2002-06-17
| | | | | | | | | | | | | DECLARE_CCTK_ARGUMENTS macro. This fixes the problem when the variable didn't exist (because the providing thorn wasn't activated). Now the exanded macro is also slightly shorter than the old definition which makes the preprocessor happy. You must reconfigure Cactus in order to take this change into effect. But there's no urgent need for it. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2908 17b73243-c579-4c4c-a9d2-2d5706c11dac
* TAGS tables for groups.goodale2002-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | You can now do TAGS='foo=... bar=...' in a group definition in your interface.ccl files. The intention is that this can be used to assign tensor types and coordinate systems to gorups. This is implemented as a table, the handle of which you can get by calling CCTK_GroupTagsTable or CCTK_GroupTagsTableI and query using the normal table operators. Note that currently the Util_TableCreateFromString function, which is used to generate the table, doesn't support setting of string members. This will be changed soon. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2845 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Allow array sizes to be set by parameters set from other implementations.goodale2002-04-03
| | | | | | | | | | A thorn's own parameters may be unqualified, shared parameters must be fully qualified. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2688 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Reworked treatment of CCTK_DECLARE macros. Now the C file preprocessortradke2002-03-27
| | | | | | | | | | | | | | | | | | | will put everything up to the closing bracket for a routine into a new block. Also, the USE_CCTK macro is now appended directly to the CCTK_DECLARE macro. There is no need anymore to use CCTK_NO_AUTOUSE_MACRO. Also changed the way how parameters and arguments are used within the USE_CCTK macros: now it's done by "(void) (parameter = 0);" which is better than assigning the address of it to some dummy pointer. This fixes problems where one had to parse for a possible return statement at the end of the routine. This fix closes PR Cactus/949. Also did some perl code optimization and added grdoc headers for files generated by the CST. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2676 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed issue with 'const' pointers used in the bindings code.tradke2001-12-13
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2501 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Allow the length of a vector array can to be an arithmetical combination ofgoodale2001-11-02
| | | | | | | | | parameters. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2445 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Quick hack to shorten names of function arguments.tradke2001-10-18
| | | | | | | This allows ADM_BSSN to compile again on irix systems where the CCTK_FARGUMENTS macro couldn't be expanded anymore by the system's preprocessor. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2412 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Untabified.goodale2001-10-14
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2407 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changing names of internal array size parameters to start with cctkv to preventgoodale2001-10-14
| | | | | | | | | | conflicts with user variables. We should really change to passing in as an array rather than <dim> seperate args. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2406 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changed to allow any combination of parameters andgoodale2001-10-13
| | | | | | | | | | integer constants combined with +,-,/ and *, with parentheses for the sizes of GAs and the length of vector groups. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2404 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Preliminary support for 'vector' Grid Variables -goodale2001-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | defined as <type> <group_name>[<size>] ... as per a normal 1 variable group except with an extra argument. This creates a vector of GVS, with an extra index (the last one for a GA or GF) corresponding to the element in the vector. For scalars this creates an array similar to a DISTRIB=CONSTANT GA. <size> may be either an integer or an integer-valued parameter (which must not be steerable). So, fortran sees REAL foo[param] TYPE=GF DIM=3 as CCTK_REAL foo(nx,ny,nz,param) and in C it should be accessed as foo[CCTK_GFINDEX3D(cctkGH,i,j,k)*l] When we have COMPACT groups you will also be able to make the extra index the first one rather than the last one. Please treat this as volatile until it is documented, and let me know if you are using it. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2393 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Extended CheckArraySizes() to parse SIZE option of ARRAY declarations.tradke2001-09-03
| | | | | | | | | Now this can be a comma-separated list of positive integer constants or parameter names (optionally with an integer constant added/substracted to/from it). git-svn-id: http://svn.cactuscode.org/flesh/trunk@2328 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Adding a "help" argument to the CST_error call to start adding suggested ↵allen2001-08-19
| | | | | | | | | causes for the errors. At the moment the help message is always shown, since I've only added a couple so far. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2307 17b73243-c579-4c4c-a9d2-2d5706c11dac
* More #defines for _CCTK_FARGUMENTS and _CCTK_CARGUMENTSallen2001-07-03
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2262 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Recognize CCTK_COMPLEX8, CCTK_COMPLEX16, and CCTK_COMPLEX32 types in ccl files.tradke2001-06-28
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2257 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changed the USE_CCTK_PARAMETERS and CCTK_USE_ARGUMENTS macros to use atradke2001-06-12
| | | | | | | | 'const void *' dummy pointer for assignments. This should also fix PR Cactus-715. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2227 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Check that array sizes in interface.ccl are parametersallen2001-05-12
| | | | | | | | At the moment this is still crude, only check is that the parameter name is in a thorn, I'm not checking the implementation/thorn name git-svn-id: http://svn.cactuscode.org/flesh/trunk@2177 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Index timelevels in the opposite way, now the current timelevel to work with ↵allen2001-05-10
| | | | | | | | | is always timelevel 0, and the oldest timelevel is indexed CCTK_NumTimeLevelsFromVarI(index) - 1 git-svn-id: http://svn.cactuscode.org/flesh/trunk@2164 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Trap GFs comming from mixed dims.allen2001-05-10
| | | | | | | Need to rebuild to implement this. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2163 17b73243-c579-4c4c-a9d2-2d5706c11dac