Skip to content

Wrap CARMAELEMENT_Get() function#552

Merged
mattldawson merged 3 commits intomainfrom
develop-542-get-element
Aug 4, 2025
Merged

Wrap CARMAELEMENT_Get() function#552
mattldawson merged 3 commits intomainfrom
develop-542-get-element

Conversation

@mattldawson
Copy link
Copy Markdown
Collaborator

Adds the ability to get CARMA element properties in C++ and Python

closes #542

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 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 CARMAElementProperties data 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() to GetGroupProperties() 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-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 1, 2025

Codecov Report

❌ Patch coverage is 82.60870% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.30%. Comparing base (9a77625) to head (e275f20).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/carma/carma.cpp 80.95% 4 Missing ⚠️
src/carma/interface.F90 82.60% 4 Missing ⚠️
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.
📢 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 6273e14 into main Aug 4, 2025
70 checks passed
@mattldawson mattldawson deleted the develop-542-get-element branch August 4, 2025 14:45
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 CARMAELEMENT_Get

4 participants