Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace Topology.transforms, opposites with ndarray of transforms #499

Open
joostvanzwieten opened this issue Feb 2, 2020 · 0 comments
Open
Labels

Comments

@joostvanzwieten
Copy link
Member

Currently every Topology has a transforms and an opposites attribute. If some topology does not have opposites, both attributes are equal. If you take the interfaces of interfaces of a topology, the opposites are somewhat arbitrarily defined by the second operation. In the tensorial world it becomes even worse: if you multiply two topologies with opposites, there is no logical definition of the opposites of the product.

All 'issues' could be addressed by defining the Topology.transforms attribute as an ndarray of transforms sequences. A new topology generated with mesh.rectilinear has a 0d-array of transforms sequences. Taking the interfaces of this topology would give a topology with transforms sequences of shape [2]. Taking the interfaces again might give transforms sequences of shape [2,2]. Multiplying the interfaces of two topologies with 0d-arrays of transforms sequences would give a topology with a [2,2] transforms sequences, with the first axis belonging to the left operand and the second to the right.

When evaluating or integrating a function at or over a topology, the result will be computed for all transforms of the topology simultaneously and will maintain the shape of the transforms sequences, unless a function explicitly applies some kind of reduction over one of the transforms axes, e.g. by function.jump. The transforms sequences reduction functions must be extended with an (optional) axis argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant