Skip to content

Commit

Permalink
Merge pull request #741 from MohitKambli/pyclaw-branch
Browse files Browse the repository at this point in the history
Fix #740: file_prefix argument is inconsistently implemented in fileio.ascii.py
  • Loading branch information
mandli authored Dec 26, 2024
2 parents f55b884 + cf07f27 commit cc2a32e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyclaw/fileio/ascii.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def write(solution, frame, path, file_prefix='fort', write_aux=False,
f.write("%s file_format\n" % "ascii")

# Write fort.qxxxx file
file_name = 'fort.q%s' % str(frame).zfill(4)
file_name = '%s.q%s' % (file_prefix,str(frame).zfill(4))
with open(os.path.join(path,file_name),'w') as q_file:
for state in solution.states:
write_patch_header(q_file,state.patch)
Expand All @@ -62,7 +62,7 @@ def write(solution, frame, path, file_prefix='fort', write_aux=False,

# Write fort.auxxxxx file if required
if solution.num_aux > 0 and write_aux:
file_name = 'fort.a%s' % str(frame).zfill(4)
file_name = '%s.a%s' % (file_prefix,str(frame).zfill(4))
with open(os.path.join(path,file_name),'w') as aux_file:
for state in solution.states:
write_patch_header(aux_file,state.patch)
Expand Down

0 comments on commit cc2a32e

Please sign in to comment.