Skip to content

Conversation

@sbryngelson
Copy link
Member

Add support for multiple in-domain bodies

@sbryngelson sbryngelson requested a review from Copilot September 10, 2025 13:41
Copy link
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 multiple in-domain bodies (obstacles) to the CFD simulation framework. The implementation enables simulating flow around multiple obstacles simultaneously within a single domain.

Key changes:

  • Adds a new 'multi' geometry type with configurable obstacle arrays
  • Implements comprehensive multi-obstacle mesh generation and boundary classification
  • Enhances visualization to display multiple velocity and vorticity fields

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
visualize_multi.m Empty placeholder file for multi-obstacle specific visualization
tests/TestMultiGeometry.m Comprehensive test suite for multi-obstacle geometry validation and structure verification
tests/TestGoldenMulti.m Golden reference test class for multi-obstacle regression testing
test_vorticity.m Empty test file
test_plot.m Empty test file
src/visualize_final.m Enhanced visualization with separate plots for u-velocity, v-velocity, vorticity, and velocity magnitude
src/setup_environment.m Minor comment update for CI/test environment handling
src/geometry/make_multi_geometry.m Core multi-obstacle geometry implementation with union SDF, boundary classification, and normal computation
src/build_geometry.m Updated geometry dispatcher to support 'multi' geometry type
simulate.m Enhanced mesh visualization and multi-obstacle characteristic length calculation
config.m Updated configuration to include multi-obstacle support with default geometry change

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 33 to 37
% W is structured as W(:, time_step) where each column is a time step
% The velocity vector is [U; V] stacked vertically
n_nodes = length(xy1);
U_final = W(1:n_nodes, end); % Final u-velocity (last time step)
V_final = W(n_nodes + 1:end, end); % Final v-velocity (last time step)
Copy link

Copilot AI Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment describes W as having columns for time steps, but the original code used (j - 1) * 1 + 1 indexing which suggests a different data structure. Please verify that W actually uses column-based time indexing and update the comment if the data layout differs.

Copilot uses AI. Check for mistakes.
@sbryngelson sbryngelson marked this pull request as ready for review September 11, 2025 02:03
@sbryngelson sbryngelson requested a review from Copilot September 11, 2025 02:03
Copy link
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

Copilot reviewed 17 out of 49 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sbryngelson sbryngelson merged commit 706e882 into comp-physics:master Sep 11, 2025
3 checks passed
@sbryngelson sbryngelson deleted the multi-body branch September 11, 2025 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant