Skip to content

Write data#219

Merged
benegee merged 19 commits intomainfrom
bg/raw-data-access
Oct 9, 2025
Merged

Write data#219
benegee merged 19 commits intomainfrom
bg/raw-data-access

Conversation

@benegee
Copy link
Copy Markdown
Collaborator

@benegee benegee commented Dec 2, 2024

This PR adds new methods trixi_load_conservative_vars and trixi_save_conservative_vars to read and write conservative variables by copying data. Moreover, a method trixi_get_data_pointer is added, which returns a pointer to Trixi's internal simulation data array. Thus no data needs to be copied, but it is potentially more risky.

Both approaches can be used to modify the conservative variables. This is demonstrated by changing the concentration of a passive tracer during a simulation.

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 2, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.15%. Comparing base (3e1d8e6) to head (d97e743).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #219      +/-   ##
==========================================
+ Coverage   95.62%   96.15%   +0.52%     
==========================================
  Files          23       25       +2     
  Lines        1097     1273     +176     
  Branches       63       74      +11     
==========================================
+ Hits         1049     1224     +175     
- Misses         44       45       +1     
  Partials        4        4              
Flag Coverage Δ
unittests 96.15% <100.00%> (+0.52%) ⬆️

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.

@benegee benegee requested a review from sloede January 16, 2025 15:19
@benegee benegee changed the title RFC: raw data access Write data Jul 31, 2025
Copy link
Copy Markdown
Member

@sloede sloede left a comment

Choose a reason for hiding this comment

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

Very nice extension, I just have two naming suggestions/comments

Comment thread LibTrixi.jl/src/api_c.jl Outdated
Comment thread LibTrixi.jl/src/api_c.jl Outdated
@benegee benegee requested a review from sloede October 8, 2025 15:00
Copy link
Copy Markdown
Member

@sloede sloede left a comment

Choose a reason for hiding this comment

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

I did only a cursory check since it seems to be a lot of regex search and replace. But after this, I think a new breaking release would be in order :-)

@benegee benegee merged commit 48ef1c6 into main Oct 9, 2025
12 checks passed
@benegee benegee deleted the bg/raw-data-access branch October 9, 2025 10:10
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.

2 participants