sandialabs / omega_h

Simplex mesh adaptivity for HPC
Other
114 stars 53 forks source link

Reals/LOs array types #396

Closed jacobmerson closed 2 years ago

jacobmerson commented 2 years ago

@ibaned @cwsmith I'm curious about if there is design rational for Reals, LOs, GOs arrays are distinct types rather than a typedef of Read<T>.

It's nothing critical just couldn't think of a good reason so I figured I'd try to find out and learn something. The only reason I thought of was for LOs, GOs if they were intended as a strong type for the global IDs/local IDs. But I've seen that these arrays get used in application codes as if they are typedefs (any time Read<real>, Read<LO>, Read<GO> is wanted).

jacobmerson commented 2 years ago

I went ahead and made the change which is helpful for my use case of a templated overload function taking Read<T> which doesn't match with discrete types.

See pull #397 .

ibaned commented 2 years ago

I agree this makes sense, I can't think of a good reason why they need to be specific classes derived from Read. Thanks @jacobmerson !

jacobmerson commented 2 years ago

I'll close this since you approved my pull request.