text: //
  // nekRS User Defined File
  //
  
  #include <math.h>
  #include "udf.hpp"
  
  /* UDF Functions */                                                      
  
  void UDF_LoadKernels(nrs_t *nrs)
  {
  }
  
  void UDF_Setup(nrs_t *nrs)
  {
   // set IC
   mesh_t *mesh = nrs->mesh;
   for (int n=0; n<mesh->Np*mesh->Nelements; n++) {
     dfloat x = mesh->x[n];
     dfloat y = mesh->y[n];
     dfloat z = mesh->z[n];
     nrs->U[n+0*nrs->fieldOffset] = sin(x)*cos(y)*cos(z);;
     nrs->U[n+1*nrs->fieldOffset] = -cos(x)*sin(y)*cos(z); 
     nrs->U[n+2*nrs->fieldOffset] = 0; 
   }
  }
  
  void UDF_ExecuteStep(nrs_t *nrs, dfloat time, int tstep)
  {
    if (nrs->isOutputStep) {
      nek_ocopyFrom(time, tstep);
      nek_userchk();
    }
  }
  