ligs= LoadLig(fic)
for ilg, lig in enumerate(ligs):
if lig.startswith('PERFORM_CUTHILL_MCKEE'):
ligs[ilg]=ligs[ilg].replace('.true.','.false.')
# Test if already processed
for lig in ligs:
if 'ADD_SPRING_TO_STACEY' in lig:
print('----> '+fic+' already processed to r19804')
return
#
a1='ADD_SPRING_TO_STACEY = .true.\n'
#--------------------------------------------------------------------------
# Add new parameters
#
for ilg, lig in enumerate(ligs):
if lig.startswith('absorbing_conditions'):
ligs.insert(ilg+1,a1)
#
move(fic,fic+'.before_update_to_r19804')
#
fm = open(fic,'w')
fm.writelines(ligs)
fm.close()
#
print('xxxxx------> '+fic+' processed to r19804')
return
Because I saw the bug code in the unresolved-bugs file
------------------------------------------------------------------------------
def ProcessParfile_r19804(fic):
Open the file and get all lines from Par_file
------------------------------------------------------------------------------