Skip to content

Add CARMA element options#506

Merged
mattldawson merged 4 commits intomainfrom
develop-471-carma-element-create
Jul 28, 2025
Merged

Add CARMA element options#506
mattldawson merged 4 commits intomainfrom
develop-471-carma-element-create

Conversation

@mattldawson
Copy link
Copy Markdown
Collaborator

@mattldawson mattldawson commented Jul 25, 2025

Exposes all options for creating CARMA Element objects through the MUSICA C and Python APIs. Also removes arguments that can be inferred and uses SI units.

closes #471

Matt Dawson and others added 2 commits July 25, 2025 14:41
* remove max bins/groups

* add missing CARMA group options

* address copilot comments
@mattldawson mattldawson requested review from K20shores and Copilot July 25, 2025 21:49
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 exposes all options for creating CARMA Element objects through the MUSICA C and Python APIs, removes arguments that can be inferred, and standardizes on SI units. The changes include adding new enumeration classes for particle algorithms, removing ID fields that can be inferred, converting units from CGS to SI, and adding support for complex refractive indices.

Key changes:

  • Adds comprehensive enumeration classes for particle swelling, fall velocity, Mie calculation, and optics algorithms
  • Removes manually assigned ID fields from group and element configurations
  • Converts density and radius units from CGS (g/cm³, cm) to SI (kg/m³, m) throughout the codebase
  • Adds support for complex refractive index arrays in element configurations

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/carma/interface.F90 Updates Fortran interface to handle new parameters and unit conversions
src/carma/carma_parameters.F90 Adds complex number type and removes ID fields from configuration structs
src/carma/carma.cpp Updates C++ parameter conversion with new fields and unit handling
musica/carma.py Adds new enumeration classes and updates configuration classes with SI units
musica/carma.cpp Updates Python binding to handle new parameter structure
include/musica/carma/carma_c_interface.hpp Updates C interface structs with new fields and documentation
include/musica/carma/carma.hpp Adds new enumerations and updates configuration structs

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 25, 2025

Codecov Report

❌ Patch coverage is 33.96226% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.23%. Comparing base (614e337) to head (8023d6f).

Files with missing lines Patch % Lines
src/carma/interface.F90 26.31% 28 Missing ⚠️
src/carma/carma.cpp 53.33% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #506      +/-   ##
==========================================
- Coverage   84.85%   84.23%   -0.63%     
==========================================
  Files          49       49              
  Lines        4735     4777      +42     
==========================================
+ Hits         4018     4024       +6     
- Misses        717      753      +36     

☔ 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 65f82bf into main Jul 28, 2025
72 checks passed
@mattldawson mattldawson deleted the develop-471-carma-element-create branch July 28, 2025 15:08
mattldawson added a commit that referenced this pull request Jul 28, 2025
* add CARMA element options

* CARMA group options (#500)

* remove max bins/groups

* add missing CARMA group options

* address copilot comments

* address copilot comments
mattldawson added a commit that referenced this pull request Jul 28, 2025
* draft solute and gas options

* Add CARMA element options (#506)

* add CARMA element options

* CARMA group options (#500)

* remove max bins/groups

* add missing CARMA group options

* address copilot comments

* address copilot comments

* fix bad merge

* address copilot comments
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_Create function

4 participants