Skip to content

Commit

Permalink
Merge pull request #7 from DavidAnderegg/dev
Browse files Browse the repository at this point in the history
fix writing summary file
  • Loading branch information
DavidAnderegg authored Sep 17, 2021
2 parents dfe544f + d4e6207 commit 2e380f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion adflow_util/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '1.3.0'
__version__ = '1.3.1'

from .adflow_util import ADFLOW_UTIL
from .adflow_plot import ADflowData
Expand Down
10 changes: 7 additions & 3 deletions adflow_util/adflow_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ class ADFLOW_UTIL:
def __init__(self, aeroOptions, solverOptions, options=None):
self.aeroOptions = aeroOptions
self.solverOptions = solverOptions
# self.name = name
# self.reset_ap = reset_ap

defaultOptions = {
# The name that is beeing used for the '.out' file and AP
Expand Down Expand Up @@ -94,6 +92,8 @@ def __init__(self, aeroOptions, solverOptions, options=None):

self.CFDSolver = None

self.funcs_data = []

def run(self):
# init stuff
self.check_ap_input()
Expand Down Expand Up @@ -198,8 +198,12 @@ def create_funcs_table(self, funcs, n=0):
header.append('iterTot')
data.append(int(self.CFDSolver.adflow.iteration.itertot))

# add it to the global data array
self.funcs_data.append(data)

# only write header if it is the first line
data_string = tabulate([data], headers=header, floatfmt=".8f") + "\n"
data_string = tabulate(
self.funcs_data, headers=header, floatfmt=".8f") + "\n"
# strip off header if it is not the first run (this is done for
# alignment purposes)
if n > 0:
Expand Down

0 comments on commit 2e380f7

Please sign in to comment.