[mesa-users] s% nz
Bill Paxton
paxton at kitp.ucsb.edu
Sun Aug 5 12:21:30 EDT 2012
It would be a bug if you found size(s% q) < s% nz,
but you will commonly find the size > nz since we
do that on purpose to reduce the number of times
we allocate/deallocate -- e.g. if size(s% q) = s% nz + 100
and then a remesh increases nz by 50, we still have
room in s% q to hold the new data so we don't need
to reallocate.
This means your code must NOT assume size(s% q) = s% nz.
e.g., maxval(s% T) is WRONG; it should be maxval(s% T(1: s% nz)).
This is the price of better performance from fewer allocs/deallocs.
-Bill
On Aug 4, 2012, at 9:14 PM, jingluan at caltech.edu wrote:
> Hello :-)
>
> I found that size(s% q) > s% nz, i.e., the size of the array s% q is
> larger than the shell number of the model s% nz. I always assume by
> default that they should be equal to each other and thus I am kind of
> confused.... Do some of you encounter such case please? Do you understand
> the reason please? Here I attached a model in which s% nz=1607 and size(s%
> q)=1807.
>
> Thanks a lot :-)
>
> Sincerely,
> Jing<rhostep_10Msun.mod>------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
> mesa-users mailing list
> mesa-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mesa-users
More information about the Mesa-users
mailing list