From 719745448f7c6dacac56ce0d9e818183cbed05b2 Mon Sep 17 00:00:00 2001 From: tfei Date: Wed, 20 Jan 2021 01:15:01 -0500 Subject: [PATCH] add gravity center in readVABSOutHomo function --- io/iovabs.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/io/iovabs.py b/io/iovabs.py index 5841bd3..0d9a1f8 100644 --- a/io/iovabs.py +++ b/io/iovabs.py @@ -310,7 +310,7 @@ def readVABSOutHomo(fn, scrnout=True): float(linesRead[ln + 3].split()[-1]), float(linesRead[ln + 4].split()[-1]) ]) - #gc has not been added in "sg.py" yet. + sm.gc = gc if 'tc' in keywordsIndex.keys(): ln = keywordsIndex['tc'] @@ -343,7 +343,10 @@ def readVABSOutHomo(fn, scrnout=True): #old dic method to save mass center # sm.eff_props[1]['mass']['masscenter'] = utl.textToMatrix(linesRead[ln + 3:ln + 9]) except KeyError: - sm.mass_mc = sm.mass_origin + if scrnout: + print('No mass center matrix found.') + else: + pass #check whether the analysis is Vlasov or timoshenko #Read stiffness matrix and compliance matrix