export MKL_NUM_THREADS=1
cat >chease_namelist << 'EOF'
***
***
***
***
 &EQDATA
  AFBS = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  AFBS2 = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  AP = 0.300, 0.400, 0.210, 0, 0.210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  AP = 0.300, 0.400, 0.120, 0, 0.120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  APLACE = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  AP2 = 0.100, 0.500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  ASPCT = 0.370,
  AT = 0.160, 1, 1, -1.100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  AT2 = 0.100, 0.500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  AT3 = 0.100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  AT4 = 0, 0.500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  AWIDTH = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  BEANS = 0,
  BPLACE = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  BSFRAC = 0.500,
  BWIDTH = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  CETA = 0,
  CFBAL = 1,
  CPLACE = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  CPRESS = 1,
  CSSPEC = 0.400,
  CURRT = 0.010,
  CWIDTH = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  DELTA = 0,
  DPLACE = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  DWIDTH = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  ELONG = 1,
  EPLACE = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  ETAEI = 1.500,
  EWIDTH = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  EPSLON = 1.000E-10,
  PANGLE = 0,
  PREDGE = 0,
  PSISCL = 1,
  QSPEC = 1,
  QPLACE = 1, 2, 0, 0, 0, 0, 0, 0, 0, 0,
  QWIDTH = 0.003, 6.000E-4, 5.000E-4, 0, 0, 0, 0, 0, 0, 0,
  RNU = 0,
  RZION = 1,
  R0 = 1.031,
  RZ0 = 9.182E-15,
  SGMA = 0,
  SOLPDA = 0.600,
  SOLPDB = 0,
  SOLPDC = 0,
  SOLPDD = 0,
  SOLPDE = 0,
  THETA0 = 0,
  TRIANG = 0,
  TRIPLT = 0,
  XI = 0,
  NBLC0 = 1,
  NBLOPT = 0,
  NBSFUN = 1,
  NBSOPT = 0,
  NBSTRP = 1,
  NCHI = 150,
  NCSCAL = 3,
  NDIFPS = 0,
  NDIFT = 0,
  NEGP = -1,
  NER = 1,
  NFUNC = 2,
  NIDEAL=5,
  NIPR = 1,
  NISO = 120,
  NMESHA = 0,
  NMESHB = 0,
  NMESHC = 0,
  NMESHD = 0,
  NMESHE = 0,
  NMGAUS = 4,
  nplot=1,
  NPOIDA = 0,
  NPOIDB = 0,
  NPOIDC = 0,
  NPOIDD = 0,
  NPOIDE = 0,
  NPOIDQ = 2,
  NPP = 1,
  NPPFUN = 2,
  NPPR = 30,
  NPSI = 150,
  NRSCAL = 0,
  NS = 120,
  NSOUR = 2,
  NSTTP = 2,
  NSURF = 2,
  NT = 120,
  NTMF0 = 1,
  NTNOVA = 32,
  NTURN = 10,
  nrbox=101,
  nzbox=101,
  spitzer=1.,
  snumber=1000000,
  slimit=3000,
 /
 &NEWRUN
 /
EOF
./chease
#exit
cat > datainxtor << 'EOF'
 &NLDATA
  eqonly=.f.,
  cpulimiter=.f.,
  linear = .f.,
  ideal = .f.,
  transport = .t.,
  etacon = .f.,
  freeslip = .t.,
  etajpol0 = .f.,
  heatsource = .t.,
  etavariable = .f.,
  convecteta = .f.,
  wstari = .f.,
  wstare = .f.,
  specalpha = .t.,
  readmat=.f.,
  restart = .f.,
  density = .f.,
  rodsource = .t.,
  rodvariable = .f.,
  temperature = .f.,
  neoclassic = .f.,
  torrotation = .f.,
  bootstrap = .f.,
  rosenbluth = .f.,
  hinton = .f.,
  rodtransp = .f.,
  sauter = .t.,
  spitzer=.t.
  splitlu=.f.,
  nustare = .t.,
  poinc=.t.,
  testsip=.t.,
  ohmicheatsource=.f.,
  chiperpconst=.f.,
  precond=3,
  currentlim=.f.,ramptime=30000.,
  snumber = 1000000,
  slimit = 3000,
  prmlimit = 2.000E-5,
  prm = 5.000E-6,
  axeprm = 0,
  chipar = 10.,
  chiperp = 1.000E-5,
  atomicnumber = 2,
  axedensity = 3.000E19,
  charge = 1.602E-19,
  rialpha = 0.050,
  rodabyrod0 = 0.950,
  muneoclassic = 0.010,
  tortime = 0.100,
  torscale = 1,
  nts = 100000,
  nts = 2000,
  nres = 1,
  dt = 10.,
  dtini = 10.,
  dtinires = 10.,
  dtinichi = 10.,
  dtinirod = 10.,
  gamma = 1.667,
  r0 = 2.703,
  ictype=9,
  ngrowth=50,
  iplot=100,
  dtmax=10.,
  dtmin=0.,
  epsnonlin=1.e-4,
 /
EOF
./xtor < datainxtor

<!-- Copyright 2024 SPC-EPFL -->
<!--  -->
<!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
<!-- you may not use this file except in compliance with the License. -->
<!-- You may obtain a copy of the License at -->
<!--  -->
<!--     http://www.apache.org/licenses/LICENSE-2.0 -->
<!--  -->
<!-- Unless required by applicable law or agreed to in writing, software -->
<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
<!-- See the License for the specific language governing permissions and -->
<!-- limitations under the License. -->
<!-- ********************************************************************** -->
