gridap / Gridap.jl

Grid-based approximation of partial differential equations in Julia
MIT License
665 stars 94 forks source link

Fix for issue #905, replicating the PR #906 #990

Open kishore-nori opened 3 months ago

kishore-nori commented 3 months ago

Due to some rebasing mess up from my side, I am replicating the PR (https://github.com/gridap/Gridap.jl/pull/906, which I closed to clean up the history). The changes in this PR and related tests, fix and isolate the issue #905.

cc @amartinhuertas

kishore-nori commented 3 months ago

I just realised that this PR is related to the recently merged PR https://github.com/gridap/Gridap.jl/pull/987. The approaches to deal with the issue are different PR https://github.com/gridap/Gridap.jl/pull/987, makes things work for equivalent CellPoints and this one fixes the problem that get_cell_points generates a different object (which probably is not good?) by returning identical CellPoint objects, thereby fixing the cause of the issue, which breaks

function evaluate!(cache,f::CellState,x::CellPoint)
  if f.points === x
    f.values
  else
    @unreachable """\n
    It is not possible to evaluate the given CellState on the given CellPoint.

    a CellState can only be evaluated at the CellPoint it was created from.
    If you want to evaluate at another location, you would need first to project the CellState
    to a FESpace (e.g. via a L2 projection).
    """
  end
end

changed to f.points == x in PR https://github.com/gridap/Gridap.jl/pull/987, I feel both ways are required..

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.60%. Comparing base (4cf9e8a) to head (8678f3a).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #990 +/- ## ======================================= Coverage 87.60% 87.60% ======================================= Files 176 176 Lines 21947 21946 -1 ======================================= Hits 19226 19226 + Misses 2721 2720 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.