flattened shallow copy of field
As discussed on Mattermost with @bauer a few days ago, the memory layout of Field<Vector3<real_t>, 1>
is the same as that of Field<real_t,3>
and it is thus possible to use them interchangeably by converting the metadata appropriately.
One minor thing I don't like about my current implementation: things like VectorTrait<std::string>
don't produce an error anymore. You can't use it because it doesn't have the setter and getter and its OutputType
is void
, but still it doesn't feel right. My attempts to conditionally disable Field::flattenedShallowCopy
failed, so that changing VectorTrait
was my workaround.
Edited by Michael Kuron