ikarus-project / ikarus

Ikarus is a C++-based library that uses DUNE modules to solve partial differential equations with the finite element method and more.
https://ikarus-project.github.io/
Other
4 stars 2 forks source link

Add MutliDimensionCodimWrapper to resultfunction #267

Open henrij22 opened 4 months ago

henrij22 commented 4 months ago

So if you have three triangles and two quads, you would get:

indexSet.index(triangle1) -> 0
indexSet.index(triangle2) -> 1
indexSet.index(triangle3) -> 2
indexSet.index(quad1) -> 0
indexSet.index(quad2) -> 1

So all this breaks if your grid has elements with different geometry types.

_Originally posted by @rath3t in https://github.com/ikarus-project/ikarus/pull/261#discussion_r1503963977_

https://github.com/ikarus-project/ikarus/pull/261#discussion_r1503965562

mdcm.index(triangle1) -> 0
mdcm.index(triangle2) -> 1
mdcm.index(triangle3) -> 2
mdcm.index(quad1) -> 3
mdcm.index(quad2) -> 4
rath3t commented 4 months ago

To really fix this we also have to construct the list of fes differently. Since the std::vector is constructed by push-back. So all our code only works since the elements(gridView) hands out the elements in the same order as the indexSet returns them. So this is very fragile. Therefore, I want to refactor all this to some #228 local assembler notation which takes care of all this directly.