Skip to content

Add CARMA initialization options#521

Merged
mattldawson merged 9 commits intomainfrom
develop-483-carma-initialize
Jul 30, 2025
Merged

Add CARMA initialization options#521
mattldawson merged 9 commits intomainfrom
develop-483-carma-initialize

Conversation

@mattldawson
Copy link
Copy Markdown
Collaborator

Wraps the CARMA_Initialize() function for the C and Python APIs. Also adds a few valgrind suppressions that should be removed after the CARMASTATE_* functions are finished.

closes #483

@mattldawson mattldawson requested review from K20shores and Copilot July 30, 2025 16:56
Copy link
Copy Markdown
Contributor

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

This PR adds CARMA initialization options by wrapping the CARMA_Initialize() function for both C and Python APIs. It introduces comprehensive configuration for CARMA's initialization parameters, including process flags, numerical parameters, and accommodation coefficients.

Key changes include:

  • Addition of CARMAInitializationConfig structure with 19 configurable parameters
  • Integration of initialization configuration into the CARMA parameter structure
  • Replacement of hardcoded initialization with dynamic configuration based on user settings
  • Addition of valgrind suppressions for memory check issues in CARMA functions

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
valgrind.supp Adds memory check suppressions for CARMA functions
src/test/unit/carma/carma_c_api.cpp Updates test to use new initialization config and removes unused gas configurations
src/carma/interface.F90 Replaces hardcoded CARMA_Initialize call with dynamic parameter-based configuration
src/carma/carma_parameters.F90 Defines the Fortran initialization configuration structure
src/carma/carma.cpp Implements C++ to C structure conversion for initialization config
musica/carma.py Adds Python CARMAInitializationConfig class with comprehensive parameter support
musica/carma.cpp Implements Python dictionary to C++ structure conversion for initialization
include/musica/carma/carma_c_interface.hpp Defines C-compatible initialization configuration structure
include/musica/carma/carma.hpp Defines C++ initialization configuration structure

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 30, 2025

Codecov Report

❌ Patch coverage is 94.44444% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.75%. Comparing base (2544c7d) to head (fb0fa11).

Files with missing lines Patch % Lines
src/carma/interface.F90 71.42% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #521   +/-   ##
=======================================
  Coverage   83.74%   83.75%           
=======================================
  Files          51       51           
  Lines        5181     5196   +15     
=======================================
+ Hits         4339     4352   +13     
- Misses        842      844    +2     

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

@mattldawson mattldawson merged commit 77e6f52 into main Jul 30, 2025
71 checks passed
@mattldawson mattldawson deleted the develop-483-carma-initialize branch July 30, 2025 19:41
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.

Wrap CARMA_Initialize function

4 participants