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

Check that derivatives are only taken of grid functions #134

Open ianhinder opened 8 years ago

ianhinder commented 8 years ago

Currently, if the user tries to take a derivative of a shorthand, this results in a compile-time error. This should be a Kranc-time error.

/Users/comerduncan/Cactus/arrangements/Cosmology/CT_BrillAnalytic/src/CT_BrillAnalyticCoefficients.cc:220:84: error: 'sqrtdetg' was not declared in this scope
     const CCTK_REAL PDstandardNth1sqrtdetg CCTK_ATTRIBUTE_UNUSED = PDstandardNth1(&sqrtdetg[index]);

(This error happens because derivatives are computed before shorthands are declared in the C++ source file)