Adding the inverse tool FEObservationOperator#1217
Adding the inverse tool FEObservationOperator#1217ConnorMallon wants to merge 11 commits intogridap:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1217 +/- ##
==========================================
- Coverage 89.04% 88.96% -0.08%
==========================================
Files 213 215 +2
Lines 27529 27631 +102
==========================================
+ Hits 24513 24582 +69
- Misses 3016 3049 +33
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a new Inverse submodule to Gridap that introduces a differentiable FEObservationOperator for evaluating FE functions at arbitrary observation points, and wires it into the package exports and dependencies.
Changes:
- Added
Inversemodule withFEObservationOperatorimplementation and ChainRulesCorerrule. - Exposed
FEObservationOperatorthroughExports.jland loaded the new module fromsrc/Gridap.jl. - Added ChainRulesCore dependency and introduced initial tests for the operator/adjoint.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| test/InverseTests/runtests.jl | New test entrypoint for inverse-related tests. |
| test/InverseTests/InverseTests.jl | Adds an adjoint check for FEObservationOperator via finite differences. |
| src/Inverse/Inverse.jl | Introduces the Inverse submodule, imports, and exports for inverse tooling. |
| src/Inverse/FEObservationOperators.jl | Implements SequentialFEObservationOperator, its evaluation, and rrule pullbacks. |
| src/Gridap.jl | Loads the new Inverse submodule. |
| src/Exports.jl | Publishes FEObservationOperator from Inverse. |
| Project.toml | Adds ChainRulesCore to deps/compat. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| struct SequentialFEObservationOperator{T} <: FEObservationOperator | ||
| obs_points::AbstractVector{<:Point} | ||
| fe_space::SingleFieldFESpace | ||
| cell_to_points::Gridap.Arrays.Table | ||
| cells_w_points | ||
| cell_to_weights::AbstractVector{Matrix{T}} | ||
| filtered_indices::Vector{Int32} | ||
| cache | ||
| end |
There was a problem hiding this comment.
SequentialFEObservationOperator leaves cells_w_points and cache untyped, which makes these fields Any and can introduce type instability and dynamic dispatch in a performance-sensitive operator. Consider adding concrete field types (or additional type parameters) for these fields (e.g. cells_w_points::AbstractVector{<:Integer} / Vector{Int32} and cache::NTuple{4,Any} or a fully-parametric cache type).
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Adding the differentiable FEObservationOperator object that efficiently evaluates FEFunctions at a set of observation points.