cellml / libcellml

Repository for libCellML development.
https://libcellml.org
Apache License 2.0
16 stars 21 forks source link

Issue validating model with base units #981

Closed nickerso closed 2 years ago

nickerso commented 2 years ago

I'm having an issue with a model that has defined a new base units and then using that units across multiple components. I've tried to create a minimal test here: https://github.com/nickerso/libcellml/blob/hugh-windows-buid/tests/units/units.cpp#L2735

Before I tidy that up to make a PR with the test, can anyone (@agarny @hsorby) spot anything that I'm doing wrong in that model? My guess is that the base unit is being treated as a separate instance in each component's variable when parsed? In this case, if I make the cells units an alias for dimensionless then it all works fine...but clearly isn't quite what is intended.

agarny commented 2 years ago

Yes, your CellML code looks good to me. So, something is wrong in libCellML. :/