Hello, I am trying to delete zone and gridpoints information stored in extra variables in order to get the file slighter but I do not find a Fish or FLAC command to achieve that, any help? Thank you in advance.
At the moment, it is not possible to delete the extra info stored in zones/gps. However, we are planning to add this functionality in the future. In the meantime, we recommend that you assign extra indices gradually and avoid using unnecessarily large indices. This is because once a large index (N) is used, memory will be reserved for all extra indices from 1 to N, even if some of them do not actually store variables
Thank you Chen, I think it can be a good command for the future. In the meanwhile, I will follow your recommendation. Regards.
Hello,
Has this been addressed?
Kind Regards,
Jean
Hello, I am not sure.
Update: reassigning FISH extra to zero is equivalent to delete zone or gridpoint information stored in extra variables.
Hi Cheng,
I ran a simple test where I created a 10x10x10 mesh (default brick) and I assigned a group in a slot, then I asigned a value for extras 1, 2, 3, 20 and 40, and saved at each step to see the difference in weight of the .sav.
then I zeroed all the extras (initialize as 0) and saved again. The weight of the files with 40 extras with non zero values (in 1,2,3,20 and 40) and all “0“ values was the same.
(image for reference)
This was done in 9.00.181 but I see no extra related news in the perpetual or suscription update.
Could I be doing it wrong? (uploading code too just in case, *.py not allowed hence .zip)
Prueba.zip (509 Bytes)
Kind regards,
Jean
(1) this is for subscription versions, not for v9.0.
(2) this works for extra FISH intrinsic, not for the command of “zone initialize extra”.
I tested it in v9.6.46, with this datafile:
model new
zone create brick size 10 10 10
[zone.extra(::zone.list, 1) = 2.0]
model save ‘s01’
[zone.extra(::zone.list, 2) = 2.0]
model save ‘s02’
[zone.extra(::zone.list, 3) = 2.0]
model save ‘s03’
[zone.extra(::zone.list, 20) = 2.0]
model save ‘s20’
[zone.extra(::zone.list, 40) = 2.0]
model save ‘s40’
;
[zone.extra(::zone.list, 1) = 0]
model save ‘s01b’
[zone.extra(::zone.list, 2) = 0]
model save ‘s02b’
[zone.extra(::zone.list, 3) = 0]
model save ‘s03b’
[zone.extra(::zone.list, 20) = 0]
model save ‘s20b’
[zone.extra(::zone.list, 40) = 0]
model save ‘s40b’
The file sizes are (in KB):
s01 : 598, s02 :621, s03 :643, s20 : 666, s40 : 688
s01b: 666, s02b:643, s03b:621, s20b: 598, s40b: 575
Hi Cheng,
It did work for me on Flac3d v9.4.33.
Will you add this solution to the perpetual version of 9.0 eventually?
Thanks in advance,
Cheers,
Jean
