Field integrator
Overview
FieldIntegrator is a class to discretize PDEs into a system of equations. This should be ideal for rapid prototyping. It creates the corresponding matrices and vectors based on the user's input which consists of:
- Geometry
- A function on how to assemble the left hand side matrix
- A function on how to assemble the right hand side vector
- Boundary conditions
New features
Transformationclass: computes supports, Jacobians and quadrature points for elements in a patchFieldIntegratorclass: assemble system matrix and right hand side vector- Assembly takes function on how to assemble matrix/vector as input
Showcase
Examples will be added in the examples folder
Checklists
- [ ] Documentations are up-to-date.
- [x] Added example(s)
- [ ] Added test(s)
Summary by CodeRabbit
-
New Features
- Introduced an example implementation for solving the Galerkin Laplace problem using the
FieldIntegratorclass. - Added new utility functions for improved integration functionality and a new
FieldIntegratorclass to manage integration processes. - Enhanced the
volumefunction for better performance and accuracy in integration tasks.
- Introduced an example implementation for solving the Galerkin Laplace problem using the
-
Bug Fixes
- Improved error handling and assertions in the volume integration test suite.
-
Documentation
- Enhanced parameter descriptions in the
parametric_functionmethod for better clarity.
- Enhanced parameter descriptions in the
[!IMPORTANT]
Review skipped
Auto reviews are disabled on base/target branches other than the default branch.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.
Walkthrough
The recent updates to the splinepy library introduce several enhancements, including the new FieldIntegrator class and improved integration functions. These changes streamline spline parameter handling and boost accuracy while ensuring robust testing and documentation that validate the integration logic and transformations.
Changes
| Files | Change Summary |
|---|---|
examples/iga/.../galerkin_laplace_problem_field_integrator.py |
New script demonstrating the FieldIntegrator class for solving the Galerkin Laplace problem, detailing geometry preparation and computational functions for matrix assembly and visualization. |
splinepy/helpme/.../integrate.py |
Added _get_integral_measure and _default_quadrature_orders for improved integration handling; refactored volume for clarity; and introduced the FieldIntegrator class to encapsulate integration logic. |
tests/.../test_volume_integration.py |
Renamed VolumeIntegrationTest to IntegratorTest, introducing new methods for enhanced test coverage across spline types and user-defined functions, improving error handling and integration validation. |
.github/workflows/... |
Enhanced CI workflows for documentation generation and testing, transitioning from unittest to pytest, and refining dependency handling for better performance. |
README.md |
Expanded installation instructions and enhanced the introduction for clarity and usability. |
docs/... |
Various documentation updates, including the addition of a C++ API section and improved Doxygen configurations for better output structure. |
include/splinepy/... |
Added licensing information to key header files and improved several spline classes for enhanced clarity and functionality of method signatures. |
Poem
🐇 In the meadow where splines play,
New changes hop in, brightening the day.
Integrations dance, tests take flight,
FieldIntegrator shines, oh what a sight!
With each curve and twist, we refine and improve,
In the world of math, we joyfully move! 🌼✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai generate interesting stats about this repository and render them as a table.@coderabbitai show all the console.log statements in this repository.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
I think there was an issue with rebase. Do you need some help with that?
There are still some commits which do some unnecessary things (e.g. removing a function in one commit and later commit adds the same function again), but I tried to reduce the total number of commits.
I think this should be rebased at 6e13284
What's up with this branch? Anybody still working on it? why is it still draft? help required?
The reason why I declared it as draft is because I wanted to extend it to work with multiple fields (e.g. pressure and velocity field for Stokes) and I was working on that. This extension is still a work in progress, but I guess this can get into a different branch + new PR. In the current state, everything for a single field PDE (e.g. Poisson, maybe even linear elasticity) should work. I'll try resolving the conflicts and then the code should be reviewable / mergeable.