Skip to content

Commit cc2a32e

Browse files
authored
Merge pull request #741 from MohitKambli/pyclaw-branch
Fix #740: file_prefix argument is inconsistently implemented in fileio.ascii.py
2 parents f55b884 + cf07f27 commit cc2a32e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pyclaw/fileio/ascii.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def write(solution, frame, path, file_prefix='fort', write_aux=False,
5050
f.write("%s file_format\n" % "ascii")
5151

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

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

0 commit comments

Comments
 (0)