text: //
  // nekRS User Defined File
  //
  #include <math.h>
  #include "udf.hpp"
  
  static occa::kernel fillFUKernel; 
  
  void userf(nrs_t *nrs, dfloat time, occa::memory o_U, occa::memory o_FU)
  {
    nrs->linAlg->fill(nrs->Nlocal, DPDZ, o_FUz);
    fillFUKernel(Nlocal, nrs->fieldOffset, nrs->cds->o_S, nrs->o_FU);
  }
  
  void UDF_LoadKernels(nrs_t *nrs)
  {
    fillFUKernel = udfBuildKernel(nrs, "fillFU");
  }
  
  void UDF_Setup(nrs_t *nrs)
  {
    // assign function pointer to drive flow by constant mean pressure gradient
    udf.uEqnSource = &userf;
  }
  
  void UDF_ExecuteStep(nrs_t *nrs, dfloat time, int tstep)
  {
    if (nrs->isOutputStep) {
      nek_ocopyFrom(time, tstep);
      nek_userchk();
    }
  }
  