ianhinder / Kranc

A Mathematica package for generating code for solving time dependent partial differential equations
http://kranccode.org
GNU General Public License v2.0
28 stars 10 forks source link

Kranc's Differencing.h fails to compile if KRANC_DIFF_FUNCTIONS is defined #100

Open rhaas80 opened 10 years ago

rhaas80 commented 10 years ago

the error is not passing the correct number of arguments:

In file included from /mnt/data/rhaas/postdoc/gr/ET_trunk/configs/sim/build/ML_BSSN/ML_BSSN_Advect.cc:14:0:
/mnt/data/rhaas/postdoc/gr/ET_trunk/arrangements/McLachlan/ML_BSSN/src/Differencing.h: In function 'double PDupwindNthfdOrder23_impl(const double*, double, ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t)':
/mnt/data/rhaas/postdoc/gr/ET_trunk/arrangements/McLachlan/ML_BSSN/src/Differencing.h:1043:56: error: too few arguments to function 'double PDupwindNthfdOrder22_impl(const double*, double, ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t)'
   return PDupwindNthfdOrder22_impl(u, pm1o2dz, cdk, cdj);
                                                        ^
/mnt/data/rhaas/postdoc/gr/ET_trunk/arrangements/McLachlan/ML_BSSN/src/Differencing.h:884:18: note: declared here
 static CCTK_REAL PDupwindNthfdOrder22_impl(const CCTK_REAL* restrict const u, const CCTK_REAL pm1o2dy, const ptrdiff_t cdj, const ptrdiff_t cdk, const ptrdiff_t dir1, const ptrdiff_t dir2, const ptrdiff_t dir3)
                  ^

which indeed does not pass any of dir1 -- dir3.

Nothing currently uses KRANC_DIFF_FUNCTIONS however so this is a bug in unused code.

To reproduce disable UseVectors in McLachlan_BSSN.m and add

#define KRANC_DIFF_FUNCTIONS

at the top of arrangements/McLachlan/ML_BSSN/src/Differencing.h once Kranc finishes.

rhaas80 commented 10 years ago

There was ET trac ticket for this: https://trac.einsteintoolkit.org/ticket/1514 . Erik commented.