[Users] Error in a function

Erik Rodrígo Jiménez Vázquez erjive at ciencias.unam.mx
Tue Sep 8 23:44:37 CDT 2020

Hello everybody,

I'm writing a function to set initial conditions, but I need to use an
interative method and I need to operate over some arrays (grid functions)
that I previously declared in the interface.ccl file.

This is an example of one of the functions that I'm currently writing.

#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
#include "ID.h"

void Initial_Setup(CCTK_ARGUMENTS)


  int index;

  int i,j,k;
  int ierr;

  for (k=0; k<cctk_lsh[2]; k++)
      for (j=0; j<cctk_lsh[1]; j++)
          for (i=0; i<cctk_lsh[0]; i++)
              index = CCTK_GFINDEX3D(cctkGH,i,j,k);

              phi[index] = 1.0;
              pi [index] = 0.0;


where pi and phi are the grid functions previously defined in the
interface.ccl and the header "ID.h" is where I defined the function

When I call the function in the main function and compile it I get

error: type name is not allowed
error: expression must have arithmetic type

these errors are the same for the other functions. All these functions are
not scheduled but the main function is. What is the problem?

Any help will be apreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20200908/1824afec/attachment.html 

More information about the Users mailing list