@@ -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,23 +112,24 @@ def main():
112112 if have_MPI :
113113 comm .barrier ()
114114
115- # --- Initialize the solid solver --- # (!! for now we are using only serial solid solvers)
116- if myid == rootProcess :
117- print ("\n " )
118- print (" Initializing solid solver " .center (80 ,"*" ))
119- if CSD_Solver == 'AEROELASTIC' :
120- from SU2_Nastran import pysu2_nastran
121- SolidSolver = pysu2_nastran .Solver (CSD_ConFile ,False )
122- elif CSD_Solver == 'IMPOSED' :
123- from SU2_Nastran import pysu2_nastran
124- SolidSolver = pysu2_nastran .Solver (CSD_ConFile ,True )
125- elif CSD_Solver == 'MAPPING' :
126- from SU2_Nastran import pysu2_nastran
127- SolidSolver = pysu2_nastran .Solver (CSD_ConFile ,True )
115+ # --- Initialize the solid solver --- #
116+ # Serial solvers
117+ if CSD_Solver in ["NATIVE" ]:
118+ if myid == rootProcess :
119+ print ("\n " )
120+ print (" Initializing solid solver " .center (80 ,"*" ))
121+ if CSD_Solver == 'NATIVE' :
122+ from SU2_Nastran import pysu2_nastran
123+ if FSI_config ["IMPOSED_MOTION" ] == "NO" :
124+ SolidSolver = pysu2_nastran .Solver (CSD_ConFile ,False )
125+ else :
126+ SolidSolver = pysu2_nastran .Solver (CSD_ConFile ,True )
128127 else :
129- print ("\n Invalid solid solver option" )
128+ SolidSolver = None
129+ # Parallel solvers
130+ # For now we are only using serial solvers
130131 else :
131- SolidSolver = None
132+ raise Exception ( ' \n Invalid solid solver option' )
132133
133134 if have_MPI :
134135 comm .barrier ()
@@ -158,7 +159,7 @@ def main():
158159 if have_MPI :
159160 comm .barrier ()
160161
161- if CSD_Solver != "MAPPING " :
162+ if FSI_config [ "MAPPING_MODES" ] == "NO " :
162163 # --- Launch a steady or unsteady FSI computation --- #
163164 if FSI_config ['TIME_MARCHING' ] == "YES" :
164165 try :
0 commit comments