!/* macro.h --- This file contains macro definition
! */
  
#ifndef INCLUDED_MACRO_H

#define INCLUDED_MACRO_H 1

#define _YES 1
#define _NO 0 

#define _LINEAR_FORM 1
#define _3D_FORM 2
  ! use linear form for now
!#define _MEMORY_LAYOUT_ _LINEAR_FORM

  ! decide how to manipulate
#define _1THREAD_1ELEMENT 1
#define _1THREAD_1DEPTHCOLUMN 2  
!!#define _GRID_STRATEGY_ _1THREAD_1ELEMENT
    
  ! 1 = try to put CRUs as all possible "valid" positions
  ! 2 = put CRUs until it reaches the specified NSFU
#define _CRU_UNIFORM 1
#define _CRU_UPTO_NSFU 2
#define _CRU_UNIFORM_WITH_SMALL_RYR 3
!!!#define _ARRANGE_CRU_ _CRU_UPTO_NSFU

  
#define _TESLA  1
#define _FERMI  2
#define _GPU_MODEL_ _FERMI
    

  ! DATA TRACKING MODE
  !   0 = no I/O
  !   1 = testing purpose
  !   2 = (spatial or non-spatial) HDF files;
  !   3 = text files (all)
  !   4,5 = spatial output
  !   6 = write out restart file and the last second
  ! NOTE: restart file is written out in all cases, except _IO_NONE
  !   7 = (non-spatial) multiple datasets/file (time-Vm, Cads, Cajsr...)
  !   8 = (spatial) HDF whole-cell
#define _IO_NONE  0
#define _IO_TEST  1
#define _IO_2_HDF  2
#define _IO_2_ASCII  3
#define _IO_2_SILO_3D 4 
#define _IO_2_SILO_SLICE 5
#define _IO_2_HDF2 7
#define _IO_2_HDF3D 8      
      !!!!example:#define _DATAMODE_  _IO_2_SILO_SLICE
      
      ! COMPUTATIONAL MODE (work for DATAMODE=1)
      !    0 - print nothing, except the simulation
      !   -1 - print ALL (except number 4)
      !    1 - print [Ca_ds], [Ca_jsr], nRo, nLo
      !    2 - print I_dhpr_T (L-type current)
      !    3 - print fraction of channels in each of the 6 L-type state
#define _COMPMODE_  1


  ! Method for PRNG
  ! SARU = generate on GPU directly
  ! MT = generate MT on GPU directly
  ! NOTE: only use SARU for now 
#define _PRNG_SARU 1
#define _PRNG_MT 2
#define _PRNG_MTCPU 3
#define _PRNG_CURAND 4
#define _USE_PRNG_ _PRNG_SARU


      ! perform all data check
      ! (may slow, as data validation is performed)
#define _SAFE_MODE_ _NO

      ! 0 = closed-cell (no ion in/out)
      ! 1 = Voltage-clamp
      ! 2 = Current-clamp
      ! 3 = resting
#define _MODE_CLOSEDCELL 0      
#define _MODE_V_CLAMP 1
#define _MODE_I_CLAMP 2
#define _MODE_RESTING 3      
!#define  _RUNMODE_  _MODE_V_CLAMP

#define _SINGLE 0
#define _PACED 1

      ! 0 = no graphics
      ! 1 = use CUDA/OpenGL (only Fermi)
      ! 2 = use OpenGL
      ! 3 = use VisIt
#define _DISP_NO 0
#define _DISP_CUDA_OPENGL  1
#define _DISP_OPENGL  2
#define _DISP_VISIT    3  
#define _USE_DISPLAY_ _DISP_NO

      ! type 1 = trigger half of the number of the CRUs
      ! type 2 = increase the opening probability  of all CRUs (adjust luminal calcium gating function)
#define _CAFFEINE_TYPE1 1
#define _CAFFEINE_TYPE2 2
#define _TRIGGER_RYR_CRU 3
#define _TRIGGER_RYR_ROGUE 4      
!#define _EMULATE_CONDITION_ _CAFFEINE_TYPE1
      
#define _NEUMANN_COND 2
#define _DIRICHLET_COND 1
#define _ROBIN_COND 3
!#define _BOUNDARY_CONDITION_ _NEUMANN_COND      

#define _V_MYO_TOTAL_REALCELL 1
#define _V_MYO_TOTAL_TESTCELL 2            
#define _V_MYO_GRIDPOINT 3
!#define _MAP_CONCENTRATION_ _V_MYO_GRIDPOINT

#define _0_SMALL_RYRS 1
#define _1_SMALL_RYRS 2
#define _3_SMALL_RYRS 3
#define _6_SMALL_RYRS 4
!#define _ADD_SMALL_RYRS_ _3_SMALL_RYRS
      
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      !!!!!!!!!!!CHECK THESE!!!!!!!!!!!!!!!!!!!!!!!!
      ! scaling will allow testing the code using a smaller number of CaRU
      ! that give results similar to 20,000 CaRU
#define _USE_SCALING_MODE_  _YES
!#define  _RUNMODE_  _MODE_CLOSEDCELL
      !#define  _RUNMODE_  _MODE_RESTING
      !#define  _RUNMODE_  _MODE_V_CLAMP
#define _USE_PRNG_ _PRNG_SARU
#define _DATAMODE_  _IO_2_HDF
      
#define _USE_TESTING_CODE_ _NO
#define _EMULATE_CONDITION_ _NO
#define _DATAMODE_  _IO_2_HDF2
!calculate Ca_ds using approximation formula or not
#define _USE_CaDS_APPROX_ _NO

#define _USE_FLUO_ _NO

      !check
      !1:filename (Makefile)
      !2:output setting (macro.h)
      !3:gpuID (main.f95)
#define _TEST_ORPHAN_CRU_ _NO
#define _TEST_NEW_ORPHAN_CRU_ _NO
#define _USE_TEST_FILE_ _NO
            
#define _USE_LCC_DATA_FROM_CONFIG_ _YES
  ! 0 = use predefined rate constant
  ! 1 = use the value read from config file
#define _USE_RYR_DATA_FROM_CONFIG_ _YES

    ! SPATIAL MODEL            
    !check to simulate a customized cell setting
#define _USE_TRANSPOSE_FORM_ _YES
#define _USE_CUSTOMIZED_CELL_ _YES
#define _GRID_STRATEGY_ _1THREAD_1ELEMENT
#define _MAP_CONCENTRATION_ _V_MYO_GRIDPOINT
#define _ARRANGE_CRU_ _CRU_UNIFORM
#define _BOUNDARY_CONDITION_ _NEUMANN_COND
#define _ADD_SMALL_RYRS_ _0_SMALL_RYRS
#define _MEMORY_LAYOUT_ _LINEAR_FORM            
#define _PRINT_OUT_PLAN_ _NO
#endif 
  !/* INCLUDED_MACRO_H */

