parameters: (self, eaf=0)
docstring: Generate a multigroup GENDF file using the MODER and GROUPR
          modules. This requires that the pendf() method has already been called.
  
          Parameters
          ----------
          eaf : int
              If eaf is 1, simplified processing is performed to be compatible
              with the EAF nuclear library.
docstring_summary: Generate a multigroup GENDF file using the MODER and GROUPR
          modules. This requires that the pendf() method has already been called.
docstring_tokens: Generate a multigroup GENDF file using the MODER and GROUPR modules . This requires that the pendf () method has already been called .
function: def gendf(self, eaf=0):
          """Generate a multigroup GENDF file using the MODER and GROUPR
          modules. This requires that the pendf() method has already been called.
  
          Parameters
          ----------
          eaf : int
              If eaf is 1, simplified processing is performed to be compatible
              with the EAF nuclear library.
  
          """
  
          print(" --- make gendf for " + self.hmat + " ---")
          mycwd = os.getcwd()
          mynjoy = mycwd + '/' + self.execdir + "/xnjoy<file_data"
          if not os.path.isfile(os.path.expandvars(self.evaluation_file)):
              raise PyNjoyError("evaluation file " + self.evaluation_file +
                                " not found")
          os.chdir(self.evaluation_name)
          matsab_inc = 221
          matsab_coh = 0
          if self.scattering_law:
              if self.scattering_mat == 1:
                  matsab_inc = 222
              elif self.scattering_mat == 7:
                  matsab_inc = 225        
                  matsab_coh = 226        
              elif self.scattering_mat == 11:
                  matsab_inc = 228
              elif self.scattering_mat == 26:
                  matsab_inc = 231
                  matsab_coh = 232
              elif self.scattering_mat == 27:
                  matsab_inc = 233
                  matsab_coh = 234
              elif self.scattering_mat == 31:
                  matsab_inc = 229
                  matsab_coh = 230
              elif self.scattering_mat == 37:
                  matsab_inc = 223
                  matsab_coh = 224
              elif self.scattering_mat == 40:
                  matsab_inc = 227
              elif self.scattering_mat == 58:
                  matsab_inc = 235             
                  matsab_coh = 236             
          if self.iwt:
              newiwt = self.iwt
          else:
              newiwt = 4
          if self.dilutions:
              newiwt = -abs(newiwt)
              nbdil = len(self.dilutions)
              if nbdil > 10:
                  raise PyNjoyError("cannot have more than 10 dilutions")
              textdil = ""
              for dil in self.dilutions:
                  textdil += " %E" % dil
          else:
              newiwt = abs(newiwt)
              nbdil = 1
              textdil = "1.0e10"
          nbtmp = len(self.temperatures)
          if nbtmp > 10:
              raise PyNjoyError("cannot have more than 10 temperatures")
          texttmp = ""
          for tmp in self.temperatures:
              texttmp += " %E" % tmp
          htime = time.ctime(time.time())
          self.__dict__.update({"textdil": textdil,
                                "nbdil"  : nbdil,
                                "texttmp": texttmp,
                                "nbtmp"  : nbtmp,
                                "htime"  : htime,
                                "newiwt" : newiwt,
                                "matsab_inc" : matsab_inc,
                                "matsab_coh" : matsab_coh,
                                "autosup": self.autolib[1]})
  
          text_data = ("moder\n20 -21\nmoder\n29 -25\ngroupr"
                       "-21 -25 0 -26\n%(mat)d %(nstr)d %(gstr)d %(newiwt)d "
                       "%(legendre)d %(nbtmp)d %(nbdil)d 1\n'%(hmat)s from "
                       "%(evaluation_name)s at %(htime)s' /\n%(texttmp)s/\n"
                       "%(textdil)s/\n" % self.__dict__)
          if self.dilutions:
              text_data += ("%(autosup)f %(potential)f 20000 / "
                            "Homog. Flux Calc.Param" % self.__dict__)
          if newiwt == 1 or newiwt == -1:
              text_data += self.wght
          elif newiwt == 4 or newiwt == -4:
              text_data += "0.2 0.0253 820.3e3 1.40e6 / iwt=4 parameters"
          for tmp in self.temperatures:
              if eaf == 0:
                  if matsab_coh != 0:
                      text_data += ("3/\n3 %(matsab_inc)d /\n"
                                    "3 %(matsab_coh)d /\n" % self.__dict__)
                  else:
                      text_data += "3/\n3 %(matsab_inc)d /\n" % self.__dict__
              else:
                text_data += "3/\n"
              if self.fission:
                  text_data += "3 452 /\n"
              if self.fission == 2:
                  text_data += "3 455 /\n5 455 /\n"
              if self.gstr != 0:
                  text_data += "16 / photon interaction matrices\n"
              if eaf == 0:
                  if matsab_coh != 0:
                      text_data += ("6 /\n6 %(matsab_inc)d /\n6 "
                                    "%(matsab_coh)d /\n0/\n" % self.__dict__)
                  else:
                      text_data += "6 /\n6 %(matsab_inc)d /\n0/\n" % self.__dict__
              else:
                  text_data += "6 /\n0/\n"
          text_data += "0/\nmoder\n-26 30\nstop"
          file_data = open("file_data",'w')
          file_data.write(text_data)
          file_data.close()
          os.system("ln -s " + self.evaluation_file + " tape20")
          os.system("ln -s pendf" + self.hmat + " tape29")
          os.system(mynjoy)
          os.system("mv file_data file_data_gendf" + self.hmat)
          os.system("mv tape30 gendf" + self.hmat)
          os.system("mv output out_gendf_" + self.hmat)
          os.system("chmod 644 out_gendf_" + self.hmat)
          for file_name in os.listdir(os.getcwd()):
              if file_name[:4] == 'tape':
                  os.remove(file_name)
          os.chdir(mycwd)
function_tokens: def gendf ( self , eaf = 0 ) : print ( " --- make gendf for " + self . hmat + " ---" ) mycwd = os . getcwd ( ) mynjoy = mycwd + '/' + self . execdir + "/xnjoy<file_data" if not os . path . isfile ( os . path . expandvars ( self . evaluation_file ) ) : raise PyNjoyError ( "evaluation file " + self . evaluation_file + " not found" ) os . chdir ( self . evaluation_name ) matsab_inc = 221 matsab_coh = 0 if self . scattering_law : if self . scattering_mat == 1 : matsab_inc = 222 elif self . scattering_mat == 7 : matsab_inc = 225 matsab_coh = 226 elif self . scattering_mat == 11 : matsab_inc = 228 elif self . scattering_mat == 26 : matsab_inc = 231 matsab_coh = 232 elif self . scattering_mat == 27 : matsab_inc = 233 matsab_coh = 234 elif self . scattering_mat == 31 : matsab_inc = 229 matsab_coh = 230 elif self . scattering_mat == 37 : matsab_inc = 223 matsab_coh = 224 elif self . scattering_mat == 40 : matsab_inc = 227 elif self . scattering_mat == 58 : matsab_inc = 235 matsab_coh = 236 if self . iwt : newiwt = self . iwt else : newiwt = 4 if self . dilutions : newiwt = - abs ( newiwt ) nbdil = len ( self . dilutions ) if nbdil > 10 : raise PyNjoyError ( "cannot have more than 10 dilutions" ) textdil = "" for dil in self . dilutions : textdil += " %E" % dil else : newiwt = abs ( newiwt ) nbdil = 1 textdil = "1.0e10" nbtmp = len ( self . temperatures ) if nbtmp > 10 : raise PyNjoyError ( "cannot have more than 10 temperatures" ) texttmp = "" for tmp in self . temperatures : texttmp += " %E" % tmp htime = time . ctime ( time . time ( ) ) self . __dict__ . update ( { "textdil" : textdil , "nbdil" : nbdil , "texttmp" : texttmp , "nbtmp" : nbtmp , "htime" : htime , "newiwt" : newiwt , "matsab_inc" : matsab_inc , "matsab_coh" : matsab_coh , "autosup" : self . autolib [ 1 ] } ) text_data = ( "moder\n20 -21\nmoder\n29 -25\ngroupr" "-21 -25 0 -26\n%(mat)d %(nstr)d %(gstr)d %(newiwt)d " "%(legendre)d %(nbtmp)d %(nbdil)d 1\n'%(hmat)s from " "%(evaluation_name)s at %(htime)s' /\n%(texttmp)s/\n" "%(textdil)s/\n" % self . __dict__ ) if self . dilutions : text_data += ( "%(autosup)f %(potential)f 20000 / " "Homog. Flux Calc.Param" % self . __dict__ ) if newiwt == 1 or newiwt == - 1 : text_data += self . wght elif newiwt == 4 or newiwt == - 4 : text_data += "0.2 0.0253 820.3e3 1.40e6 / iwt=4 parameters" for tmp in self . temperatures : if eaf == 0 : if matsab_coh != 0 : text_data += ( "3/\n3 %(matsab_inc)d /\n" "3 %(matsab_coh)d /\n" % self . __dict__ ) else : text_data += "3/\n3 %(matsab_inc)d /\n" % self . __dict__ else : text_data += "3/\n" if self . fission : text_data += "3 452 /\n" if self . fission == 2 : text_data += "3 455 /\n5 455 /\n" if self . gstr != 0 : text_data += "16 / photon interaction matrices\n" if eaf == 0 : if matsab_coh != 0 : text_data += ( "6 /\n6 %(matsab_inc)d /\n6 " "%(matsab_coh)d /\n0/\n" % self . __dict__ ) else : text_data += "6 /\n6 %(matsab_inc)d /\n0/\n" % self . __dict__ else : text_data += "6 /\n0/\n" text_data += "0/\nmoder\n-26 30\nstop" file_data = open ( "file_data" , 'w' ) file_data . write ( text_data ) file_data . close ( ) os . system ( "ln -s " + self . evaluation_file + " tape20" ) os . system ( "ln -s pendf" + self . hmat + " tape29" ) os . system ( mynjoy ) os . system ( "mv file_data file_data_gendf" + self . hmat ) os . system ( "mv tape30 gendf" + self . hmat ) os . system ( "mv output out_gendf_" + self . hmat ) os . system ( "chmod 644 out_gendf_" + self . hmat ) for file_name in os . listdir ( os . getcwd ( ) ) : if file_name [ : 4 ] == 'tape' : os . remove ( file_name ) os . chdir ( mycwd )