@@ -2412,12 +2412,10 @@ def _read_geometry_data(self):
24122412 if self .header .has_solid_2_extra_nodes :
24132413 section_word_length = 2 * n_solids
24142414 try :
2415- self .arrays [
2416- ArrayType .element_solid_extra_nodes
2417- ] = elem_solid_data = self ._buffer .read_ndarray (
2418- position , section_word_length * self .header .wordsize , 1 , self ._header .itype
2419- ).reshape (
2420- (n_solids , 2 )
2415+ self .arrays [ArrayType .element_solid_extra_nodes ] = elem_solid_data = (
2416+ self ._buffer .read_ndarray (
2417+ position , section_word_length * self .header .wordsize , 1 , self ._header .itype
2418+ ).reshape ((n_solids , 2 ))
24212419 )
24222420 except Exception :
24232421 trb_msg = traceback .format_exc ()
@@ -2773,9 +2771,9 @@ def _read_rigid_body_description(self):
27732771 rigid_body_n_active_nodes , dtype = self ._header .itype
27742772 )
27752773 self .arrays [ArrayType .rigid_body_node_indexes_list ] = rigid_body_node_indexes_list
2776- self .arrays [
2777- ArrayType . rigid_body_active_node_indexes_list
2778- ] = rigid_body_active_node_indexes_list
2774+ self .arrays [ArrayType . rigid_body_active_node_indexes_list ] = (
2775+ rigid_body_active_node_indexes_list
2776+ )
27792777
27802778 # update position
27812779 self .geometry_section_size = position
@@ -3451,9 +3449,11 @@ def _read_states_allocate_arrays(
34513449 ArrayType .rigid_wall_force : [n_states , n_rigid_walls ],
34523450 ArrayType .rigid_wall_position : [n_states , n_rigid_walls , 3 ],
34533451 # nodes
3454- ArrayType .node_temperature : [n_states , n_nodes , 3 ]
3455- if header .has_node_temperature_layers
3456- else [n_states , n_nodes ],
3452+ ArrayType .node_temperature : (
3453+ [n_states , n_nodes , 3 ]
3454+ if header .has_node_temperature_layers
3455+ else [n_states , n_nodes ]
3456+ ),
34573457 ArrayType .node_heat_flux : [n_states , n_nodes , 3 ],
34583458 ArrayType .node_mass_scaling : [n_states , n_nodes ],
34593459 ArrayType .node_displacement : [n_states , n_nodes , n_dim ],
@@ -4532,10 +4532,10 @@ def _read_states_tshell(self, state_data: np.ndarray, var_index: int, array_dict
45324532 # PSTRAIN
45334533 if has_pstrain :
45344534 try :
4535- array_dict [
4536- ArrayType . element_tshell_effective_plastic_strain
4537- ] = tshell_layer_data [:, :, :, i_tshell_layer_var ]. reshape (
4538- ( n_states , n_tshells , n_layers )
4535+ array_dict [ArrayType . element_tshell_effective_plastic_strain ] = (
4536+ tshell_layer_data [:, :, :, i_tshell_layer_var ]. reshape (
4537+ ( n_states , n_tshells , n_layers )
4538+ )
45394539 )
45404540 except Exception :
45414541 trb_msg = traceback .format_exc ()
@@ -4922,9 +4922,9 @@ def _read_states_shell(self, state_data: np.ndarray, var_index: int, array_dict:
49224922 pstrain_tensor = shell_nonlayer_data [
49234923 :, :, nonlayer_var_index : nonlayer_var_index + n_plastic_strain_tensor
49244924 ]
4925- array_dict [
4926- ArrayType . element_shell_plastic_strain_tensor
4927- ] = pstrain_tensor . reshape (( n_states , n_shells , n_layers , 6 ) )
4925+ array_dict [ArrayType . element_shell_plastic_strain_tensor ] = (
4926+ pstrain_tensor . reshape (( n_states , n_shells , n_layers , 6 ))
4927+ )
49284928 except Exception :
49294929 trb_msg = traceback .format_exc ()
49304930 msg = "A failure in %s was caught:\n %s"
@@ -4940,9 +4940,9 @@ def _read_states_shell(self, state_data: np.ndarray, var_index: int, array_dict:
49404940 thermal_tensor = shell_nonlayer_data [
49414941 :, :, nonlayer_var_index : nonlayer_var_index + n_thermal_strain_tensor
49424942 ]
4943- array_dict [
4944- ArrayType . element_shell_thermal_strain_tensor
4945- ] = thermal_tensor . reshape (( n_states , n_shells , 6 ) )
4943+ array_dict [ArrayType . element_shell_thermal_strain_tensor ] = (
4944+ thermal_tensor . reshape (( n_states , n_shells , 6 ))
4945+ )
49464946 except Exception :
49474947 trb_msg = traceback .format_exc ()
49484948 msg = "A failure in %s was caught:\n %s"
@@ -5432,9 +5432,9 @@ def get_dtype(type_flag):
54325432 # particle segment distance
54335433 elif var_name .startswith ("NS dist" ):
54345434 try :
5435- array_dict [
5436- ArrayType . airbag_particle_nearest_segment_distance
5437- ] = particle_data [:, :, i_particle_var ]. view ( get_dtype ( var_type ) )
5435+ array_dict [ArrayType . airbag_particle_nearest_segment_distance ] = (
5436+ particle_data [:, :, i_particle_var ]. view ( get_dtype ( var_type ))
5437+ )
54385438 except Exception :
54395439 trb_msg = traceback .format_exc ()
54405440 msg = "A failure in %s %s was caught:\n %s"
0 commit comments