@@ -6626,7 +6626,7 @@ def _write_geom_particle_flags(self, fp: typing.IO[Any], settings: D3plotWriterS
6626
6626
# only the first byte to the ascii char code
6627
6627
fmt_string = "{0:" + str (settings .wordsize ) + "}"
6628
6628
for name , _ in nlist_names_typecodes :
6629
- name_formatted = fmt_string .format (name ).encode ("ascii " )
6629
+ name_formatted = fmt_string .format (name ).encode ("utf-8 " )
6630
6630
for ch in name_formatted :
6631
6631
barray = bytearray (settings .wordsize )
6632
6632
barray [0 ] = ch
@@ -6842,16 +6842,17 @@ def _write_geom_user_ids(self, fp: typing.IO[Any], settings: D3plotWriterSetting
6842
6842
n_bytes_written += fp .write (settings .pack (nsrtd ))
6843
6843
6844
6844
if ArrayType .part_ids in self .arrays :
6845
- # some lsdyna material pointer
6846
- nsrma = info .ptr_material_ids
6847
- n_bytes_written += fp .write (settings .pack (nsrma ))
6845
+ # some lsdyna material pointer - Used by LS-Prepost in labelling materials
6848
6846
6849
- # some lsdyna material pointer
6850
- nsrmu = info .ptr_material_ids_defined_order
6851
- n_bytes_written += fp .write (settings .pack (nsrmu ))
6847
+ # Unsorted material ID pointer
6848
+ nsrmu = nsrt + settings .header ["nelth" ]
6849
+ # Sorted material ID pointer
6850
+ nsrma = nsrmu + settings .header ["nmmat" ]
6851
+ # Mapping array between sorted and unsorted
6852
+ nsrmp = nsrma + settings .header ["nmmat" ]
6852
6853
6853
- # some lsdyna material pointer
6854
- nsrmp = info . ptr_material_ids_crossref
6854
+ n_bytes_written += fp . write ( settings . pack ( nsrma ))
6855
+ n_bytes_written += fp . write ( settings . pack ( nsrmu ))
6855
6856
n_bytes_written += fp .write (settings .pack (nsrmp ))
6856
6857
6857
6858
# "Total number of materials (parts)"
@@ -7382,7 +7383,7 @@ def _write_header_part_contact_interface_titles(
7382
7383
max_len = 18 * title_wordsize
7383
7384
fmt_name = "{0:" + str (max_len ) + "}"
7384
7385
for pid , title in zip (part_titles_ids , part_titles ):
7385
- title = title .decode ("ascii " )
7386
+ title = title .decode ("utf-8 " )
7386
7387
n_bytes_written += fp .write (settings .pack (pid ))
7387
7388
7388
7389
formatted_title = fmt_name .format (title [:max_len ])
0 commit comments