Skip to content

Conversation

@AFeuerpfeil
Copy link
Member

@AFeuerpfeil AFeuerpfeil commented Dec 7, 2025

This PR adds support for Base.repeat by enlarging the unit cell of the PeriodicArray and adjusting the map accordingly.

The README is also updated with new installation instructions after this package was registered in the julia General registry.

Copilot AI review requested due to automatic review settings December 7, 2025 16:13
@codecov
Copy link

codecov bot commented Dec 7, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

Copy link

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 Base.repeat to PeriodicArray by properly handling both inner and outer repetition while maintaining the periodic boundary conditions. The key innovation is adjusting the map function to account for the enlarged unit cell when using outer repetition.

Key changes:

  • Implements Base.repeat for PeriodicArray with support for both inner and outer keyword arguments
  • Correctly tiles the array with translated values using the original map function for outer repetition
  • Creates a new map function that amplifies shifts to account for the larger super-cell structure
  • Adds comprehensive tests for 1D and 2D cases with various translation functions

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/PeriodicArrays.jl Implements Base.repeat for PeriodicArray with proper handling of inner/outer repetition and map transformation
test/test_nontrivial_boundary.jl Adds comprehensive test coverage for 1D and 2D repeat operations with multiple translation functions

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

@AFeuerpfeil AFeuerpfeil changed the title add support for Base.repeat add support for Base.repeat & update README Dec 9, 2025
@github-actions
Copy link

github-actions bot commented Dec 17, 2025

Your PR no longer requires formatting changes. Thank you for your contribution!

@AFeuerpfeil AFeuerpfeil changed the title add support for Base.repeat & update README add support for Base.repeat, Base.reverse & update README Dec 17, 2025
@AFeuerpfeil AFeuerpfeil merged commit cb23a16 into main Dec 17, 2025
43 checks passed
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.

2 participants