\lstdefinelanguage{fino}{
morekeywords={
      FINO_PROBLEM,
      BAKE,
      HEAT,
      SHAKE,
      MODAL,
      BREAK,
      ELASTIC,
      HEAT_AXISYMMETRIC,
      PLANE_STRESS,
      PLANE_STRAIN,
      ELASTIC_AXISYMMETRIC,
      DIMENSIONS,
      DEGREES,
      SYMMETRY_AXIS,
      MESH,
      N_EIGEN,
      SOLUTION,
      SOLUTIONS,
      SOLUTION_NAMES,
      UNKNOWNS,
      UNKNOWN,
      FINO_SOLVER,
      ROUTINE,
      KSP_TYPE,
      PC_TYPE,
      SET_NEAR_NULLSPACE,
      SET_NEAR_NULL_SPACE,
      DO_NOT_SET_BLOCK_SIZE,
      SET_BLOCK_SIZE,
      GRADIENT_EVALUATION,
      GRADIENT_JACOBIAN_THRESHOLD,
      PROGRESS_ASCII,
      SHMEM_PROGRESS_BUILD,
      PROGRESS_BUILD_SHMEM,
      SHMEM_PROGRESS_SOLVE,
      PROGRESS_SOLVE_SHMEM,
      SHMEM_MEMORY,
      MEMORY_USAGE_SHMEM,
      FINO_STEP,
      JUST_BUILD,
      JUST_SOLVE,
      DUMP_FILE_PATH,
      FINO_LINEARIZE,
      PHYSICAL_ENTITY,
      START_POINT,
      END_POINT,
      FILE,
      FILE_PATH,
      TOTAL,
      M,
      MB,
      PEAK,
      FINO_DEBUG,
      MATRICES_ASCII,
      MATRICES_ASCII_STRUCTURE,
      MATRICES_PETSC_BINARY,
      MATRICES_PETSC_COMPRESSED_BINARY,
      MATRICES_PETSC_ASCII,
      MATRICES_PETSC_OCTAVE,
      MATRICES_PETSC_DENSE,
      MATRICES_X,
      MATRICES_SNG,
      MATRICES_SNG_STRUCT,
      MATRICES_SIZE,
      MATRICES_X_SIZE,
      MATRICES_STRIDE,
      INCLUDE_INPUT,
      LOAD_PLUGIN,
      DEFAULT_ARGUMENT_VALUE,
      INCLUDE,
      FROM,
      TO,
      ABORT,
      IMPLICIT,
      DO_NOT_EVALUATE_AT_PARSE_TIME,
      TIME_PATH,
      INITIAL_CONDITIONS_MODE,
      LOAD_ROUTINE,
      VAR,
      CONST,
      ALIAS,
      IS,
      AS,
      VECTOR,
      SIZE,
      DATA,
      FUNCTION_DATA,
      MATRIX,
      ROWS,
      COLS,
      FUNCTION,
      NODES,
      CELLS,
      VECTOR_DATA,
      VECTORS,
      COLUMNS,
      INTERPOLATION,
      INTERPOLATION_THRESHOLD,
      SHEPARD_RADIUS,
      SHEPARD_EXPONENT,
      SIZES,
      X_INCREASES_FIRST,
      OUTPUT_FILE,
      INPUT_FILE,
      MODE,
      INPUT,
      OUTPUT,
      OPEN,
      DO_NOT_OPEN,
      CLOSE,
      IF,
      ELSE,
      ENDIF,
      SEMAPHORE,
      SEM,
      READ,
      WRITE,
      SHM,
      SHM_OBJECT,
      ASCII_FILE_PATH,
      BINARY_FILE_PATH,
      ASCII_FILE,
      BINARY_FILE,
      IGNORE_NULL,
      PRINT,
      NONEWLINE,
      SEP,
      SEPARATOR,
      NOSEP,
      HEADER,
      STRING,
      TEXT,
      PRINT_FUNCTION,
      MIN,
      MAX,
      STEP,
      NSTEPS,
      FORMAT,
      PRINT_VECTOR,
      VERTICAL,
      HORIZONTAL,
      ELEMS_PER_LINE,
      SOLVE,
      RESIDUALS,
      GUESS,
      METHOD,
      EPSABS,
      EPSREL,
      MAX_ITER,
      VERBOSE,
      M4,
      INPUT_FILE_PATH,
      OUTPUT_FILE_PATH,
      MACRO,
      SHELL,
      CALL,
      HISTORY,
      PARAMETRIC,
      TYPE,
      OUTER_STEPS,
      MAX_DAUGHTERS,
      OFFSET,
      ADIABATIC,
      FIT,
      VIA,
      GRADIENT,
      RANGE_MIN,
      RANGE_MAX,
      DELTAEPSREL,
      DELTAEPSABS,
      DO_NOT_RERUN,
      NORERUN,
      RERUN,
      MINIMIZE,
      OPTIMIZE,
      SIMAN_EFUNC,
      ALGORITHM,
      PHASE_SPACE,
      DIFFERENTIAL,
      NAME,
      STRUCTURED,
      ORDERING,
      SCALE_FACTOR,
      OFFSET_X,
      OFFSET_Y,
      OFFSET_Z,
      NCELLS_X,
      NCELLS_Y,
      NCELLS_Z,
      LENGTH_X,
      LENGTH_Y,
      LENGTH_Z,
      DELTA_X,
      DELTA_Y,
      DELTA_Z,
      READ_DATA,
      READ_FUNCTION,
      MESH_MAIN,
      MESH_POST,
      NOMESH,
      NO_MESH,
      NO_PHYSICAL_NAMES,
      MESH_INTEGRATE,
      EXPRESSION,
      EXPR,
      OVER,
      RESULT,
      GAUSS_POINTS,
      MESH_FILL_VECTOR,
      MESH_FIND_MAX,
      I_MAX,
      INDEX,
      X_MAX,
      Y_MAX,
      Z_MAX,
      ID,
      MATERIAL,
      BOUNDARY,
      BC,
      INCREMENTAL,
      PHYSICAL_PROPERTY,
      NONE,
      ALLOWED,
      AS_PROVIDED,
      FROM_VARIABLES,
      FROM_DERIVATIVES,
      WAIT,
      POST,
      SKIP_STEP,
      SKIP_STATIC_STEP,
      SKIP_TIME,
      SKIP_HEADER_STEP,
      MAX_ITER,
      TOL,
      GRADTOL,
},
morekeywords={[2]
},
morekeywords={[3]
      available_memory,
      available_memory_0,
      cells,
      cells_0,
      displ_max,
      displ_max_0,
      displ_max_x,
      displ_max_x_0,
      displ_max_y,
      displ_max_y_0,
      displ_max_z,
      displ_max_z_0,
      done,
      done_0,
      done_outer,
      done_outer_0,
      done_static,
      done_static_0,
      done_transient,
      done_transient_0,
      dont_quit,
      dont_quit_0,
      dont_report,
      dont_report_0,
      dt,
      dt_0,
      elements,
      elements_0,
      end_time,
      end_time_0,
      eps,
      eps_0,
      fino_abstol,
      fino_abstol_0,
      fino_dirichlet_diagonal,
      fino_dirichlet_diagonal_0,
      fino_divtol,
      fino_divtol_0,
      fino_gamg_threshold,
      fino_gamg_threshold_0,
      fino_iterations,
      fino_iterations_0,
      fino_max_iterations,
      fino_max_iterations_0,
      fino_penalty_weight,
      fino_penalty_weight_0,
      fino_reltol,
      fino_reltol_0,
      fino_residual_norm,
      fino_residual_norm_0,
      flops_petsc,
      flops_petsc_0,
      i,
      i_0,
      infinite,
      infinite_0,
      in_outer_initial,
      in_outer_initial_0,
      in_static,
      in_static_0,
      in_static_first,
      in_static_first_0,
      in_static_last,
      in_static_last_0,
      in_transient,
      in_transient_0,
      in_transient_first,
      in_transient_first_0,
      in_transient_last,
      in_transient_last_0,
      j,
      j_0,
      lambda,
      lambda_0,
      max_dt,
      max_dt_0,
      memory_usage_global,
      memory_usage_global_0,
      memory_usage_petsc,
      memory_usage_petsc_0,
      min_dt,
      min_dt_0,
      ncores,
      ncores_0,
      nodes,
      nodes_0,
      nx,
      nx_0,
      ny,
      ny_0,
      nz,
      nz_0,
      on_gsl_error,
      on_gsl_error_0,
      on_ida_error,
      on_ida_error_0,
      on_nan,
      on_nan_0,
      pi,
      pi_0,
      pid,
      pid_0,
      quit,
      quit_0,
      realtime_scale,
      realtime_scale_0,
      rel_error,
      rel_error_0,
      report,
      report_0,
      sigma_max,
      sigma_max_0,
      sigma_max_x,
      sigma_max_x_0,
      sigma_max_y,
      sigma_max_y_0,
      sigma_max_z,
      sigma_max_z_0,
      static_steps,
      static_steps_0,
      step_inner,
      step_inner_0,
      step_outer,
      step_outer_0,
      step_static,
      step_static_0,
      step_transient,
      step_transient_0,
      t,
      t_0,
      time_cpu_build,
      time_cpu_build_0,
      time_cpu_solve,
      time_cpu_solve_0,
      time_cpu_stress,
      time_cpu_stress_0,
      time_cpu_total,
      time_cpu_total_0,
      time_petsc_build,
      time_petsc_build_0,
      time_petsc_solve,
      time_petsc_solve_0,
      time_petsc_stress,
      time_petsc_stress_0,
      time_petsc_total,
      time_petsc_total_0,
      time_wall_build,
      time_wall_build_0,
      time_wall_solve,
      time_wall_solve_0,
      time_wall_stress,
      time_wall_stress_0,
      time_wall_total,
      time_wall_total_0,
      T_max,
      T_max_0,
      T_min,
      T_min_0,
      U,
      U_0,
      u_at_displ_max,
      u_at_displ_max_0,
      u_at_sigma_max,
      u_at_sigma_max_0,
      V,
      V_0,
      v_at_displ_max,
      v_at_displ_max_0,
      v_at_sigma_max,
      v_at_sigma_max_0,
      W,
      W_0,
      w_at_displ_max,
      w_at_displ_max_0,
      w_at_sigma_max,
      w_at_sigma_max_0,
      x,
      x_0,
      y,
      y_0,
      z,
      z_0,
      zero,
      zero_0,
},
morekeywords={[4]
      abs,
      acos,
      asin,
      atan,
      atan2,
      builtindecl.h,
      ceil,
      clock,
      cos,
      cosh,
      d_dt,
      deadband,
      derivative,
      equal,
      exp,
      expint1,
      expint2,
      expint3,
      expintn,
      floor,
      func_min,
      gauss_kronrod,
      gauss_legendre,
      heaviside,
      if,
      integral,
      integral_dt,
      integral_euler_dt,
      is_even,
      is_in_interval,
      is_odd,
      j0,
      lag,
      lag_bilinear,
      lag_euler,
      last,
      limit,
      limit_dt,
      log,
      mark_max,
      mark_min,
      max,
      min,
      mod,
      not,
      prod,
      random,
      random_gauss,
      root,
      round,
      sawtooth_wave,
      sgn,
      sin,
      sinh,
      sqrt,
      square_wave,
      sum,
      tan,
      tanh,
      threshold_max,
      threshold_min,
      triangular_wave,
      vecdot,
      vecmax,
      vecmaxindex,
      vecmin,
      vecminindex,
      vecnorm,
      vecsize,
      vecsum,
},
sensitive=true,
morecomment=[l]{\#},
morestring=[b]\",
}
