You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to read a variable from a bp file and then compress it. The dimension of that variable cannot be known until we read it. However, the input parameter "shape" of the constructor of "TensorMeshHierarchy" needs to be an "std::array", which requires const dimension. Why do we have to use the "std::array" here?
The text was updated successfully, but these errors were encountered:
The underlying problem is that TensorMeshHierarchy is templated on the dimension N. I don't quite remember the original rationale for making N a template parameter rather than a normal data member; maybe it had something to do with the original API, or maybe I was just trying to make development easier by avoiding problems caused by mismatched dimensions. I don't see any reason we can't make N a data member, change all the std::arrays to std::vectors, etc. It would require changing the API, though, so it won't happen quickly. In the meantime, maybe you can use a switch statement like we do here.
Will we have the same problem with the datatype? Is the precision of the variable known before it's read?
I need to read a variable from a bp file and then compress it. The dimension of that variable cannot be known until we read it. However, the input parameter "shape" of the constructor of "TensorMeshHierarchy" needs to be an "std::array", which requires const dimension. Why do we have to use the "std::array" here?
The text was updated successfully, but these errors were encountered: