Skip to content

adding multiple grid cells to javascript example#743

Merged
K20shores merged 4 commits intomainfrom
multicell_js
Jan 20, 2026
Merged

adding multiple grid cells to javascript example#743
K20shores merged 4 commits intomainfrom
multicell_js

Conversation

@K20shores
Copy link
Copy Markdown
Collaborator

All of these additions are from copilot...

@github-actions
Copy link
Copy Markdown
Contributor

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 support for simulating multiple grid cells in a JavaScript WASM chemical kinetics example. The implementation allows users to visualize how different initial conditions (with perturbations) evolve in parallel across multiple independent simulation cells.

Changes:

  • Added a grid cells input control (1-50 cells) alongside the existing solver selector
  • Modified mechanism builders to broadcast rate parameters across all grid cells
  • Updated plotting to display trajectories for multiple cells with distinct colors
  • Implemented perturbation logic for Lorenz example to show divergence in chaotic systems
Comments suppressed due to low confidence (1)

javascript/wasm/example.html:704

  • The table is populated for every step after burnout (lines 697-704), but the times array is only pushed after the burnout check. This creates a logic inconsistency: during the burnout period (i < burnout), no data is collected for plotting or the table, which is correct. However, the table population code runs inside the loop after the burnout check but before times.push, which is confusing. The table population should align with the data collection logic for clarity.
                            const row = document.createElement('tr');
                            const rowVals = [cumulativeTime.toFixed(2)].concat(valsNow0);
                            rowVals.forEach(cellVal => {
                                const td = document.createElement('td');
                                td.textContent = String(cellVal);
                                row.appendChild(td);
                            });
                            resultsTbody.appendChild(row);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.60%. Comparing base (7af240d) to head (b7fc186).
⚠️ Report is 32 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #743   +/-   ##
=======================================
  Coverage   74.60%   74.60%           
=======================================
  Files         109      109           
  Lines        8115     8115           
=======================================
  Hits         6054     6054           
  Misses       2061     2061           
Flag Coverage Δ
cpp_fortran 68.49% <ø> (ø)
javascript 92.27% <ø> (ø)
python 78.34% <ø> (ø)

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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@K20shores K20shores merged commit 3c1ccdb into main Jan 20, 2026
45 of 46 checks passed
@K20shores K20shores deleted the multicell_js branch January 20, 2026 17:05
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.

4 participants