Changeset 26407
- Timestamp:
- 08/23/21 18:05:43 (4 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/matice.py
r26391 r26407 137 137 WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'thermal_exchange_velocity', 'format', 'Double') 138 138 # NOTE: We first have to check if we have a NumPy array here 139 if (((np.shape(self.rheology_B)[0] == md.mesh.numberofvertices) or (np.shape(self.rheology_B)[0] == md.mesh.numberofvertices + 1)) or ((len(np.shape(self.rheology_B)) == 2) and (np.shape(self.rheology_B)[0] == md.mesh.numberofelements) and (np.shape(self.rheology_B)[1] > 1))):139 if np.size(self.rheology_B)==1 or (((np.shape(self.rheology_B)[0] == md.mesh.numberofvertices) or (np.shape(self.rheology_B)[0] == md.mesh.numberofvertices + 1)) or ((len(np.shape(self.rheology_B)) == 2) and (np.shape(self.rheology_B)[0] == md.mesh.numberofelements) and (np.shape(self.rheology_B)[1] > 1))): 140 140 mattype = 1 141 141 tsl = md.mesh.numberofvertices -
issm/trunk-jpl/src/m/mesh/planet/gmsh/gmshplanet.py
r26361 r26407 28 28 subproc = subprocess.Popen(subproc_args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) 29 29 outs, errs = subproc.communicate() 30 if errs != '': 30 31 if ((not isinstance(errs,bytes)) & (errs != '')) or (isinstance(errs,bytes) & (errs.decode() != '')): 31 32 raise Exception('gmshplanet: call to gmsh failed: {}'.format(errs)) 32 33 gmshmajorversion = int(outs)
Note:
See TracChangeset
for help on using the changeset viewer.