Skip to content

Commit 7cb8ad2

Browse files
author
Nicola-Fonzi
committed
Suggestions from reviewer
1 parent 634858f commit 7cb8ad2

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

SU2_PY/FSI_tools/FSI_config.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,23 +124,19 @@ def applyDefaults(self):
124124

125125
if "MAPPING_MODES" not in self._ConfigContent:
126126
self._ConfigContent["MAPPING_MODES"] = "NO"
127-
print("WARNING: MAPPING_MODES keyword was not found in the configuration file of the interface, setting to NO")
127+
print("MAPPING_MODES keyword was not found in the configuration file of the interface, setting to NO")
128128

129129
if "IMPOSED_MOTION" not in self._ConfigContent:
130130
self._ConfigContent["IMPOSED_MOTION"] = "NO"
131-
print("WARNING: IMPOSED_MOTION keyword was not found in the configuration file of the interface, setting to NO")
131+
print("IMPOSED_MOTION keyword was not found in the configuration file of the interface, setting to NO")
132132

133133
if self._ConfigContent["IMPOSED_MOTION"] == "YES":
134134
if self._ConfigContent["AITKEN_RELAX"] != "STATIC" or self._ConfigContent["AITKEN_PARAM"] != 1.0:
135-
print("WARNING: Setting the Aitken parameter as static and equal to 1 for IMPOSED solver")
136-
self._ConfigContent["AITKEN_RELAX"] = "STATIC"
137-
self._ConfigContent["AITKEN_PARAM"] = 1.0
135+
raise Exception("When imposing motion, the Aitken parameter must be static and equal to 1")
138136

139137
if self._ConfigContent["RESTART_SOL"] == "YES":
140138
if self._ConfigContent["TIME_TRESHOLD"] != -1:
141-
print("WARNING: Setting the time threshold to -1 for immediate coupling when using restart")
142-
self._ConfigContent["TIME_TRESHOLD"] = -1
139+
raise Exception("When restarting a simulation, the time threshold must be -1 for immediate coupling")
143140

144141
if self._ConfigContent["MAPPING_MODES"] == "YES" and self._ConfigContent["CSD_SOLVER"]!="NATIVE":
145-
self._ConfigContent["CSD_SOLVER"]="NATIVE"
146-
print("WARNING: It has been requested to map modes, but the native solver was not selected. It is being selected automatically")
142+
raise Exception("Mapping modes only works with the native solver")

SU2_PY/fsi_computation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def main():
5757
(options, args)=parser.parse_args()
5858

5959
if options.with_MPI:
60-
from mpi4py import MPI # MPI is initialized from now by python and can be continued in C++ !
60+
from mpi4py import MPI # MPI is initialized from now by python and can be continued in C++
6161
comm = MPI.COMM_WORLD
6262
myid = comm.Get_rank()
6363
numberPart = comm.Get_size()
@@ -112,7 +112,7 @@ def main():
112112
if have_MPI:
113113
comm.barrier()
114114

115-
# --- Initialize the solid solver --- # (!! for now we are using only serial solid solvers)
115+
# --- Initialize the solid solver --- #
116116
# Serial solvers
117117
if CSD_Solver in ["NATIVE"]:
118118
if myid == rootProcess:
@@ -127,6 +127,7 @@ def main():
127127
else:
128128
SolidSolver = None
129129
# Parallel solvers
130+
# For now we are only using serial solvers
130131
else:
131132
raise Exception('\n Invalid solid solver option')
132133

0 commit comments

Comments
 (0)