gridap / gridap/Gridap.jl

Discrepancy for `get_cell_map` between `UnstructuredGrid` and other structures.

Open
#864 2 comments 0 reactions 2 assignees Claimed by @fverdugo View on GitHub
Dominant language
Julia
Stars
879
Forks
119
Avg merge
6d 3h
Merged PRs (30d)
4

Description

Hello all,

Currently there are two (in my opinion conflictive) implementations of `get_cell_map`:

```
get_cell_map(g::UnstructuredGrid) = g.cell_map
```

and

```julia
function get_cell_map(trian::Grid)
cell_to_coords = get_cell_coordinates(trian)
cell_to_shapefuns = get_cell_shapefuns(trian)
lazy_map(linear_combination,cell_to_coords,cell_to_shapefuns)
end
```

This was changed in PR #553 , and makes `get_cell_map` return different things notably for `UnstructuredDiscreteModel` (returns `LinearCombinationField`) and `UnstructuredGrid` (returns `AffineMap`).

My question is: is there a specific reason behind this? Isn't the geometry (and therefore the cell mappings) of a `DiscreteModel` governed by it's underlying grid?

If not, should we change the implementation for `DiscreteModel`s to defer this method to it's underlying grid?

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.