From f9a4ccee9bcf48c268f437636bec74583561cf11 Mon Sep 17 00:00:00 2001 From: Nicola-Fonzi Date: Tue, 24 Aug 2021 10:10:26 +0200 Subject: [PATCH 1/2] Other suggestions --- SU2_PY/FSI_tools/FSIInterface.py | 2 +- SU2_PY/SU2_Nastran/pysu2_nastran.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/SU2_PY/FSI_tools/FSIInterface.py b/SU2_PY/FSI_tools/FSIInterface.py index 35c91af736c..cd69987760a 100644 --- a/SU2_PY/FSI_tools/FSIInterface.py +++ b/SU2_PY/FSI_tools/FSIInterface.py @@ -1239,7 +1239,7 @@ def interpolateSolidPositionOnFluidMesh(self, FSI_config): if myid == self.rootProcess: for iProc in self.fluidInterfaceProcessors: sendBuff = {} - for key in self.FluidHaloNodeList[iProc].keys(): # The key is the SU2 global + for key in self.FluidHaloNodeList[iProc].keys(): # The keys are the SU2 global globalIndex = self.fluidIndexing[key] # This is the interface global, not the SU2 global DispX = self.fluidInterface_array_DispX_recon[globalIndex] DispY = self.fluidInterface_array_DispY_recon[globalIndex] diff --git a/SU2_PY/SU2_Nastran/pysu2_nastran.py b/SU2_PY/SU2_Nastran/pysu2_nastran.py index 43f4e13e9f7..85e8ce81362 100644 --- a/SU2_PY/SU2_Nastran/pysu2_nastran.py +++ b/SU2_PY/SU2_Nastran/pysu2_nastran.py @@ -855,7 +855,8 @@ def __temporalIteration(self,time): self.a += (1-self.alpha_f)/(1-self.alpha_m)*self.qddot else: if self.ImposedMotionToSet: - if self.Config["RESTART_SOL"] == "NO": # If yes we already set it in the __setRestart function + if self.Config["RESTART_SOL"] == "NO": + # If yes we already set it in the __setRestart function self.timeStartCoupling = time iImposedFunc = 0 for imode in self.Config["IMPOSED_MODES"].keys(): @@ -1004,8 +1005,9 @@ def getNumberOfSolidInterfaceNodes(self, markerID): return len(self.markers[markerID]) - def getVertexGlobalIndex(self, markerID, iVertex): # TODO This solver is serial, thus global=local + def getVertexGlobalIndex(self, markerID, iVertex): + # This solver is serial, thus global=local return self.markers[markerID][iVertex] def getInterfaceNodePosInit(self, markerID, iVertex): @@ -1035,6 +1037,7 @@ def getInterfaceNodeVelNm1(self, markerID, iVertex): def IsAHaloNode(self, markerID, iVertex): + # There are no halo nodes in this solver as it is serial iPoint = self.markers[markerID][iVertex] - halo = False # TODO when in parallel we will need to define this + halo = False return halo From f8205e2d0c070a9f772cdc8339f6929cb944eff5 Mon Sep 17 00:00:00 2001 From: Nicola-Fonzi Date: Tue, 24 Aug 2021 12:03:22 +0200 Subject: [PATCH 2/2] Clarified comment --- SU2_PY/FSI_tools/FSIInterface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SU2_PY/FSI_tools/FSIInterface.py b/SU2_PY/FSI_tools/FSIInterface.py index cd69987760a..d86c82a95b6 100644 --- a/SU2_PY/FSI_tools/FSIInterface.py +++ b/SU2_PY/FSI_tools/FSIInterface.py @@ -1239,8 +1239,8 @@ def interpolateSolidPositionOnFluidMesh(self, FSI_config): if myid == self.rootProcess: for iProc in self.fluidInterfaceProcessors: sendBuff = {} - for key in self.FluidHaloNodeList[iProc].keys(): # The keys are the SU2 global - globalIndex = self.fluidIndexing[key] # This is the interface global, not the SU2 global + for key in self.FluidHaloNodeList[iProc].keys(): # The keys are the SU2 global IDs of the interface nodes + globalIndex = self.fluidIndexing[key] # These are the interface global IDs, not the SU2 global IDs DispX = self.fluidInterface_array_DispX_recon[globalIndex] DispY = self.fluidInterface_array_DispY_recon[globalIndex] DispZ = self.fluidInterface_array_DispZ_recon[globalIndex]