Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds the ability to retrieve CARMA element properties in both C++ and Python by wrapping the CARMAELEMENT_Get() function. The implementation provides a new GetElementProperties() method that returns detailed information about particle elements including density, refractive indices, composition, and other physical properties.
Key changes include:
- Added new
CARMAElementPropertiesdata structures in C++ and Fortran interfaces - Implemented
GetElementProperties()method in C++ CARMA class - Added Python binding for element property retrieval
- Updated existing method names from
GetGroup()toGetGroupProperties()for consistency
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/carma/carma_parameters.F90 | Adds carma_element_properties_t structure definition |
| src/carma/interface.F90 | Implements internal_get_element_properties Fortran subroutine |
| src/carma/carma.cpp | Adds GetElementProperties() method and renames GetGroup() to GetGroupProperties() |
| include/musica/carma/carma_c_interface.hpp | Defines C-compatible CARMAElementPropertiesC structure and function declaration |
| include/musica/carma/carma.hpp | Adds CARMAElementProperties structure and method declarations |
| musica/carma.cpp | Adds Python bindings for element properties and particle type/composition enums |
| musica/carma.py | Implements get_element_properties() method and renames get_group() to get_group_properties() |
| musica/test/test_carma.py | Updates test to use new method names |
| src/test/unit/carma/carma_c_api.cpp | Adds test calls for new element properties functionality |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #552 +/- ##
==========================================
+ Coverage 80.20% 81.30% +1.09%
==========================================
Files 52 52
Lines 5748 5792 +44
==========================================
+ Hits 4610 4709 +99
+ Misses 1138 1083 -55 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Adds the ability to get CARMA element properties in C++ and Python
closes #542