#!/usr/bin/env python3

#--------------------------------------------------------------------------
#  nbigen_global ... invoke with "from nbigen_global import *"
#  these are quantities shared amongst the components of nbigen
#
#  array dimensioning

nbi_initdims = []         # defined before nbi code control input is given
nbi_dimdflts = []         # default values of dimensions
nbi_initlims = []         # max values of the above (where applicable) or 0
nbi_finaldims = []        # defined after nbi code control input is given
nbi_alldims = []          # union of the above

nbi_allnames = []         # list of *all* names found
nbi_pllinfo = []          # pll output (mpi_reduce data) mgmt

nbi_udim_dict = {}        # dictionary of user settable init-dimensions

io_suffix = "0"

ialloc_start = 0
ialloc2_start = 0
ialloctr_start = 0
ialloctrz_start = 0
ialloctre_start = 0
ireallocm_start = 0
iallocm_start = 0

#--------------------------------------------------------------------------
#  output files -- write generic header lines

f_nbidim = open("nbi_dimensions_mod.f90","w")
f_nbicom = open("nbi_com_mod.f90","w")

f_nbityp = open("nbi_types.f90","w")
f_nbipst = open("nbi_pstypes.f90","w")
f_nbilst = open("nbi_lost_ptcl_mod.f90","w")
f_cxnrm = open("cxnrm.f90","w")
f_nbizone = open("nbi_expand_track_zone.f90","w")

f_nbinit = open("nbi_init.f90","w")
f_nbiset = open("nbi_set.f90","w")
f_nbiget = open("nbi_get.f90","w")
f_update = open("nbi_update.f90","w")

f_alloc =  open("nbi_alloc.f90","w")
f_alloc2 = open("nbi_alloc2.f90","w")
f_alloctr = open("nbi_alloc_track.f90","w")
f_alloctrz = open("nbi_alloc_track_zone.f90","w")
f_alloclst = open("nbi_alloc_lost.f90","w")
f_allocm = open("nbi_alloc_minb.f90","w")
f_reallocm = open("nbi_realloc_minb.f90","w")
f_dalloc = open("nbi_dalloc.f90","w")
f_spltexpnd = open("nbi_spltexpnd.f90","w")
f_allocsplt = open("nbi_alloc_splt.f90","w")
f_dallocsplt = open("nbi_dalloc_splt.f90","w")
f_dalloctr = open("nbi_dalloc_track.f90","w")
f_dalloctrz = open("nbi_dalloc_track_zone.f90","w")
f_dalloclst = open("nbi_dalloc_lost.f90","w")

f_statio = open("nbi_state_io.f90","w")
f_inp_io = open("nbi_inputs_io.f90","w")
f_out_io = open("nbo_outputs_io.f90","w")
f_asciio = open("nbi_ascii_io.f90","w")

f_pcopy = open("nbi_pcopy.f90","w")
f_wrdpt = open("nbi_wrdeptrk.f90","w")

f_nboget = open("nbo_get.f90","w")
f_nboclr = open("nbo_clear.f90","w")
f_nboldx = open("nbo_load.f90","w")
f_nboldxf = open("nbo_load_frantic.f90","w")

f_bcast = open("nbi_bcast.f90","w")
f_bcast_st = open("nbi_state_bcast.f90","w")
f_bcast_st_get = open("nbi_state_bcast_get.f90","w")

f_help = open("nubeam.hlp","w")
tmpfile_help1 = "nubeam_hlp1.tmp"
tmpfile_help2 = "nubeam_hlp2.tmp"
tmpfile_help3 = "nubeam_hlp3.tmp"
tmpfile_help4 = "nubeam_hlp4.tmp"
f_help1 = open(tmpfile_help1,"w")
f_help2 = open(tmpfile_help2,"w")
f_help3 = open(tmpfile_help3,"w")
f_help4 = open(tmpfile_help4,"w")
#--------------------------------------------------------------------------
