Skip to content

Adding the inverse tool FEObservationOperator#1217

Open
ConnorMallon wants to merge 11 commits intogridap:masterfrom
ConnorMallon:master
Open

Adding the inverse tool FEObservationOperator#1217
ConnorMallon wants to merge 11 commits intogridap:masterfrom
ConnorMallon:master

Conversation

@ConnorMallon
Copy link
Contributor

Adding the differentiable FEObservationOperator object that efficiently evaluates FEFunctions at a set of observation points.

Copilot AI review requested due to automatic review settings February 10, 2026 00:44
@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

❌ Patch coverage is 67.64706% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.96%. Comparing base (1df55b8) to head (56d7632).

Files with missing lines Patch % Lines
src/Inverse/FEObservationOperators.jl 67.32% 33 Missing ⚠️
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     
Flag Coverage Δ
drivers 0.00% <0.00%> (ø)
extensions 0.00% <0.00%> (ø)
tests 88.96% <67.64%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Inverse module with FEObservationOperator implementation and ChainRulesCore rrule.
  • Exposed FEObservationOperator through Exports.jl and loaded the new module from src/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.

Comment on lines 26 to 34
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
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments