Skip to content

documentation update #1012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

documentation update #1012

wants to merge 2 commits into from

Conversation

nicolasaunai
Copy link
Member

@nicolasaunai nicolasaunai commented Jun 5, 2025

Just add markdown file for test and add some explanation about the refinement strategy for the magnetic field.

Copy link

coderabbitai bot commented Jun 5, 2025

📝 Walkthrough

Walkthrough

A new Markdown documentation file on Adaptive Mesh Refinement (AMR) was added, containing detailed explanations including the Toth and Roe divergence-preserving refinement method. Simultaneously, an existing reStructuredText documentation file covering the same AMR topics was removed. Additionally, a new Markdown file on spatial discretization was added, replacing a minimal reStructuredText file. No code or public API changes were made.

Changes

File(s) Change Summary
doc/source/theory/amr.md Added detailed Markdown documentation on Adaptive Mesh Refinement including patch-based approach, regriding, and divergence-free magnetic field refinement.
doc/source/theory/amr.rst Removed existing reStructuredText documentation on Adaptive Mesh Refinement.
doc/source/theory/spatial_discretization.md Added new Markdown file with a heading on Spatial discretization (no content yet).
doc/source/theory/spatial_discretization.rst Removed minimal reStructuredText file containing only a title.
doc/source/theory/toth2002.md Added new Markdown documentation detailing the Toth and Roe divergence-preserving refinement method with mathematical derivations.
.gitignore Removed ignore rules for .png and .jpg files, allowing image files to be tracked by version control.
doc/source/conf.py Enabled the "colon_fence", "dollarmath", and "amsmath" extensions for MyST Markdown parsing in Sphinx configuration.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Doc_AMR_MD as AMR Markdown Doc
    participant Doc_AMR_RST as AMR reST Doc
    participant Doc_Spatial_MD as Spatial Discretization Markdown Doc
    participant Doc_Spatial_RST as Spatial Discretization reST Doc
    participant Doc_Toth2002_MD as Toth and Roe Method Doc

    User->>Doc_AMR_MD: Add detailed AMR documentation (Markdown)
    User->>Doc_AMR_RST: Remove old AMR documentation (reST)
    User->>Doc_Spatial_MD: Add new spatial discretization doc (Markdown)
    User->>Doc_Spatial_RST: Remove old spatial discretization doc (reST)
    User->>Doc_Toth2002_MD: Add Toth and Roe refinement method doc (Markdown)
Loading

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@nicolasaunai nicolasaunai changed the title md documentation update Jun 5, 2025
@nicolasaunai nicolasaunai marked this pull request as draft June 5, 2025 12:18
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🔭 Outside diff range comments (1)
doc/source/theory/amr.md (1)

1-32: 🛠️ Refactor suggestion

Populate section placeholders with content
This file currently only lists section titles. To provide value, each header should include an introduction, algorithm description, key equations or pseudocode, and references. Consider adding at least a brief summary under each heading before merging.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integrati...

(BASED_HYPHEN)

🧹 Nitpick comments (1)
doc/source/theory/amr.md (1)

6-6: Standardize header style
The section headings use inconsistent capitalization, hyphenation, and pluralization. Please:

  • Convert to Title Case (e.g. ## Patch-Based Approach, ## Recursive Time Integration).
  • Hyphenate compound adjectives (Patch-Based).
  • Align singular/plural forms (e.g. use Particles at Level Boundaries to mirror Fields at Level Boundaries).

Also applies to: 10-10, 13-13, 16-16, 20-20, 24-24, 28-28

🧰 Tools
🪛 LanguageTool

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integrati...

(BASED_HYPHEN)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 49d3b04 and b794f37.

📒 Files selected for processing (2)
  • doc/source/theory/amr.md (1 hunks)
  • doc/source/theory/amr.rst (0 hunks)
💤 Files with no reviewable changes (1)
  • doc/source/theory/amr.rst
🧰 Additional context used
🪛 LanguageTool
doc/source/theory/amr.md

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integrati...

(BASED_HYPHEN)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: build (macos-14)
  • GitHub Check: Analyze (cpp)
  • GitHub Check: build (macos-13)
  • GitHub Check: Analyze (python)
  • GitHub Check: build (ubuntu-latest, gcc)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (ubuntu-latest, clang)

@@ -0,0 +1,31 @@

# Adaptive Mesh Refinement
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Include the new Markdown file in the doc build
Ensure your Sphinx setup (conf.py) is configured to parse Markdown (e.g., via MyST or recommonmark) and update the parent toctree (likely in index.rst or an adjacent MD file) to reference theory/amr.md. Otherwise this content won’t appear in the rendered documentation.

🤖 Prompt for AI Agents
In doc/source/theory/amr.md at line 2, the new Markdown file is not included in
the Sphinx documentation build. To fix this, configure your Sphinx `conf.py` to
support Markdown parsing (using MyST or recommonmark) and update the parent
toctree, such as in `index.rst` or a nearby MD file, to add a reference to
`theory/amr.md` so it appears in the rendered docs.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
doc/source/theory/amr.md (1)

2-2: Include new AMR doc in Sphinx toctree
Ensure conf.py supports Markdown (MyST or recommonmark) and add theory/amr.md to the parent toctree so this content appears in the rendered docs.

🧹 Nitpick comments (8)
doc/source/theory/amr.md (6)

6-6: Hyphenate compound term
Change “Patch based approach” to “Patch-based approach” for consistency with technical writing standards.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integratio...

(BASED_HYPHEN)


12-12: Correct section heading typo
Rename “## Regriding” to “## Regridding” to use the standard term.


18-21: Fix spelling mistakes in regridding description
Apply this diff to correct typos:

- Regriding is the process of changing the geometry of an existing mesh level in the
- AMR hierarchy, by changing the number and geometry of some patches of that level.
+ Regridding is the process of changing the geometry of an existing mesh level in the
+ AMR hierarchy by changing the number and geometry of some patches of that level.

- Concretely, regriding means removing an entired level from the AMR hierachy and replacing
- it by a new one. The so-called "new" leveel will be initialized by copying values
- from the old level wherever they overlap, and by refininig values from coarser levels
+ Concretely, regridding means removing an entire level from the AMR hierarchy and replacing
+ it with a new one. The so-called "new" level will be initialized by copying values
+ from the old level wherever they overlap and by refining values from coarser levels

40-46: Improve grammar and hyphenation

  • Change “risking to break” to “risking breaking” or “risk of breaking” for clarity.
  • Hyphenate “coarse-fine boundaries” instead of “coarse fine boundaries.”
🧰 Tools
🪛 LanguageTool

[grammar] ~46-~46: The verb ‘risking’ is used with the gerund form.
Context: ...face value blindly to the other without risking to break the divergence-free condition. ![coars...

(ADMIT_ENJOY_VB)


48-56: Review image usage and alt text
The same image (coarse_fine_boundary2.png) appears twice. Confirm if this duplication is intentional or replace the second instance with the correct figure or a clarifying caption.


74-74: Correct spelling in divergence context
Change “divergnce” to “divergence” in “preserve a zero divergnce of the magnetic field.”

🧰 Tools
🪛 LanguageTool

[uncategorized] ~74-~74: Possible missing preposition found.
Context: ...nce of the magnetic field at the coarse fine boundary is to ensure that newly refine...

(AI_HYDRA_LEO_MISSING_TO)

doc/source/theory/toth2002.md (2)

1-2: Enhance document title for clarity
Consider updating the title to include the year and method context, e.g.:

# Tóth and Roe (2002) Divergence-Preserving Refinement Method

30-30: Remove question mark in equation
The equation ends with a question mark (= \frac{D}{r^{3}} ?). Replace it with a statement (= \frac{D}{r^{3}}) or move the query into the surrounding text.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b794f37 and 2f1b4e4.

📒 Files selected for processing (4)
  • doc/source/theory/amr.md (1 hunks)
  • doc/source/theory/spatial_discretization.md (1 hunks)
  • doc/source/theory/spatial_discretization.rst (0 hunks)
  • doc/source/theory/toth2002.md (1 hunks)
💤 Files with no reviewable changes (1)
  • doc/source/theory/spatial_discretization.rst
✅ Files skipped from review due to trivial changes (1)
  • doc/source/theory/spatial_discretization.md
🧰 Additional context used
🪛 LanguageTool
doc/source/theory/amr.md

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integratio...

(BASED_HYPHEN)


[grammar] ~46-~46: The verb ‘risking’ is used with the gerund form.
Context: ...face value blindly to the other without risking to break the divergence-free condition. ![coars...

(ADMIT_ENJOY_VB)


[uncategorized] ~71-~71: “to the” seems less likely than “the”.
Context: ... non-zero divergence in cells just left to the former boundary since one of the four ...

(AI_HYDRA_LEO_CP_TO_THE_THE)


[uncategorized] ~71-~71: Possible missing comma found.
Context: ...rgence in cells just left to the former boundary since one of the four faces of these c...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~74-~74: Possible missing preposition found.
Context: ...nce of the magnetic field at the coarse fine boundary is to ensure that newly refine...

(AI_HYDRA_LEO_MISSING_TO)


[uncategorized] ~88-~88: Possible missing comma found.
Context: ...es. This is illustrated in the figure below where inner new faces are represented i...

(AI_HYDRA_LEO_MISSING_COMMA)

doc/source/theory/toth2002.md

[duplication] ~6-~6: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(u^{+,j,k} + u^{-,j,k}) + U_{x x} + k(\Delta z)^2 V_{xyz} + j(\Delta y)^...

(WORD_REPEAT_RULE)


[duplication] ~7-~7: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(v^{i,+,k} + v^{i,-,k}) + V_{y y} + i(\Delta x)^2 W_{xyz} + k(\Delta z)^...

(WORD_REPEAT_RULE)


[duplication] ~8-~8: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(v^{i,j,+} + v^{i,j,-}) + W_{z z} + j(\Delta y)^2 U_{xyz} + i(\Delta x)^...

(WORD_REPEAT_RULE)


[duplication] ~14-~14: Možný preklep: zopakovali ste slovo
Context: ...end{align} $$ with: $$ \begin{align} U_{x x} &= \frac{1}{8} \sum_{ijk=\pm } ijv^{i,...

(WORD_REPEAT_RULE)


[duplication] ~15-~15: Možný preklep: zopakovali ste slovo
Context: ...jk=\pm } ijv^{i,j,k} + ikw^{i,j,k}\ V_{y y} &= \frac{1}{8} \sum_{ijk=\pm } iju^{i,...

(WORD_REPEAT_RULE)


[duplication] ~16-~16: Možný preklep: zopakovali ste slovo
Context: ...jk=\pm } iju^{i,j,k} + jkw^{i,j,k}\ W_{z z} &= \frac{1}{8} \sum_{ijk=\pm } iku^{i,...

(WORD_REPEAT_RULE)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: build (macos-14)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (macos-13)
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (cpp)
  • GitHub Check: build (ubuntu-latest, clang)
  • GitHub Check: build (ubuntu-latest, gcc)
🔇 Additional comments (1)
doc/source/theory/amr.md (1)

77-80: Verify cross-reference syntax
The syntax [[toth2002|Toth and Roe formulas]] may not be supported by all Markdown parsers. Consider using a standard MyST link or Sphinx role, for example:

See [Toth and Roe formulas](toth2002.md)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

♻️ Duplicate comments (1)
doc/source/theory/amr.md (1)

1-1: Include the new AMR Markdown file in the Sphinx toctree
Ensure that doc/source/theory/amr.md is referenced in the parent toctree (e.g., index.rst or an adjacent .md), and confirm that the Sphinx conf.py is configured with MyST or recommonmark to parse Markdown files.

🧹 Nitpick comments (7)
doc/source/theory/amr.md (7)

6-6: Add hyphen to heading for consistency
Change "## Patch based approach" to "## Patch-based approach" to correctly use a hyphenated compound adjective.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integratio...

(BASED_HYPHEN)


23-26: Add missing article and clarify text
Revise "depending on whether particle data is refined, or field is." to "depending on whether particle data is refined or the field is refined."

🧰 Tools
🪛 LanguageTool

[uncategorized] ~24-~24: You might be missing the article “the” here.
Context: ...on whether particle data is refined, or field is. The specific operation performed al...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


40-42: Adjust phrasing for fluency
Replace "so to preserve a zero divergnce of the magnetic field" with "so as to preserve a zero divergence of the magnetic field".


44-47: Improve grammar and preposition use
Change "imposing its face value blindly to the other without risking to break the divergence-free condition" to:

imposing its face value blindly on the other without risking breaking the divergence-free condition
🧰 Tools
🪛 LanguageTool

[uncategorized] ~46-~46: The preposition “on” seems more likely in this position.
Context: ...ne mesh imposing its face value blindly to the other without risking to break the ...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)


[grammar] ~46-~46: The verb ‘risking’ is used with the gerund form.
Context: ...face value blindly to the other without risking to break the divergence-free condition. ![coars...

(ADMIT_ENJOY_VB)


66-66: Fix subject–verb agreement
Update "if the refinement of the new blue components only consider values" to:

if the refinement of the new blue components only considers values
🧰 Tools
🪛 LanguageTool

[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ...inement of the new blue components only consider values from the coarse mesh, it cannot ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


71-71: Clarify spatial relation and punctuation
Revise "cells just left to the former boundary" to "cells just to the left of the former boundary", and add a comma before "since" for readability.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~71-~71: “to the” seems less likely than “the”.
Context: ... non-zero divergence in cells just left to the former boundary since one of the four ...

(AI_HYDRA_LEO_CP_TO_THE_THE)


[uncategorized] ~71-~71: Possible missing comma found.
Context: ...rgence in cells just left to the former boundary since one of the four faces of these c...

(AI_HYDRA_LEO_MISSING_COMMA)


74-74: Correct typo in "divergence" and add missing hyphens
Change "preserve a zero divergnce of the magnetic field at the coarse fine boundary is to ensure" to:

preserve a zero divergence of the magnetic field at the coarse-fine boundary is to ensure
🧰 Tools
🪛 LanguageTool

[uncategorized] ~74-~74: Possible missing preposition found.
Context: ...nce of the magnetic field at the coarse fine boundary is to ensure that newly refine...

(AI_HYDRA_LEO_MISSING_TO)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1638b93 and 3f3fa84.

📒 Files selected for processing (2)
  • doc/source/conf.py (1 hunks)
  • doc/source/theory/amr.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • doc/source/conf.py
🧰 Additional context used
🪛 LanguageTool
doc/source/theory/amr.md

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integratio...

(BASED_HYPHEN)


[uncategorized] ~24-~24: You might be missing the article “the” here.
Context: ...on whether particle data is refined, or field is. The specific operation performed al...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~46-~46: The preposition “on” seems more likely in this position.
Context: ...ne mesh imposing its face value blindly to the other without risking to break the ...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)


[grammar] ~46-~46: The verb ‘risking’ is used with the gerund form.
Context: ...face value blindly to the other without risking to break the divergence-free condition. ![coars...

(ADMIT_ENJOY_VB)


[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ...inement of the new blue components only consider values from the coarse mesh, it cannot ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~71-~71: “to the” seems less likely than “the”.
Context: ... non-zero divergence in cells just left to the former boundary since one of the four ...

(AI_HYDRA_LEO_CP_TO_THE_THE)


[uncategorized] ~71-~71: Possible missing comma found.
Context: ...rgence in cells just left to the former boundary since one of the four faces of these c...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~74-~74: Possible missing preposition found.
Context: ...nce of the magnetic field at the coarse fine boundary is to ensure that newly refine...

(AI_HYDRA_LEO_MISSING_TO)


[uncategorized] ~88-~88: Possible missing comma found.
Context: ...es. This is illustrated in the figure below where inner new faces are represented i...

(AI_HYDRA_LEO_MISSING_COMMA)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: build (ubuntu-latest, gcc)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (ubuntu-latest, clang)
  • GitHub Check: build (macos-13)
  • GitHub Check: build (macos-14)
  • GitHub Check: Analyze (cpp)
  • GitHub Check: Analyze (python)
🔇 Additional comments (1)
doc/source/theory/amr.md (1)

92-98: Check MyST admonition syntax
Verify that the :::{seealso} directive is recognized by your MyST configuration. If not, consider using the fenced directive syntax:

```{seealso}
Toth and Roe 2002  
Divergence- and Curl-Preserving Prolongation and Restriction Formulas  
Volume 180, Issue 2, 10 August 2002, Pages 736-750  
https://doi.org/10.1006/jcph.2002.7120

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

♻️ Duplicate comments (3)
doc/source/theory/amr.md (3)

2-2: Include new Markdown in Sphinx toctree
Ensure doc/source/theory/amr.md is added to your Sphinx toctree (e.g., in index.rst) and that the MyST parser is enabled in conf.py, so this document is rendered.


77-77: ⚠️ Potential issue

Fix broken hyperlink reference
Update the link to match the actual filename:

- (see [Toth and Roe formulas](toth2022))
+ (see [Toth and Roe formulas](toth2002))

14-21: ⚠️ Potential issue

Fix multiple typos in regridding section
Correct the following typos to improve clarity:

  • "entired" → "entire"
  • "hierachy" → "hierarchy"
  • "leveel" → "level"
  • "refininig" → "refining"

Example diff:

- Concretely, regriding means removing an entired level from the AMR hierachy and replacing
+ Concretely, regridding means removing an entire level from the AMR hierarchy and replacing
   it by a new one. The so-called "new" leveel will be initialized by copying values
-  from the old level wherever they overlap, and by refininig values from coarser levels
+  from the old level wherever they overlap, and by refining values from coarser levels
   where they do not.
🧹 Nitpick comments (14)
doc/source/theory/amr.md (14)

6-6: Hyphenate compound adjective
"Patch based" should be "Patch-based" to correctly hyphenate the compound adjective.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integratio...

(BASED_HYPHEN)


29-29: Use title case for section heading
Capitalize key words for consistency:

- ## Field refinement
+ ## Field Refinement

31-31: Use title case for subsection heading
Use consistent title casing for headings:

- ### divergence-free magnetic refinement
+ ### Divergence-Free Magnetic Refinement

45-46: Improve phrasing for clarity
Consider rephrasing to:

- We cannot have one mesh imposing its face value blindly to the other without risking to break the divergence-free condition.
+ We cannot have one mesh blindly impose its face value on the other without risking the divergence-free condition.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~46-~46: The preposition “on” seems more likely in this position.
Context: ...ne mesh imposing its face value blindly to the other without risking to break the ...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)


[grammar] ~46-~46: The verb ‘risking’ is used with the gerund form.
Context: ...face value blindly to the other without risking to break the divergence-free condition. ![coars...

(ADMIT_ENJOY_VB)


48-48: Improve image alt text
Use descriptive alt text instead of the filename:

- ![coarse_fine_boundary](coarse_fine_boundary.png)
+ ![Diagram of the coarse–fine mesh boundary](coarse_fine_boundary.png)

56-56: Improve image alt text
Provide a more descriptive alt text:

- ![coarse_fine_boundary2](coarse_fine_boundary2.png)
+ ![Mesh configuration after regridding](coarse_fine_boundary2.png)

66-67: Fix subject-verb agreement
Change "only consider values" to "only considers values":

- In the first case, if the refinement of the new blue components only consider values
+ In the first case, if the refinement of the new blue components only considers values
🧰 Tools
🪛 LanguageTool

[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ...inement of the new blue components only consider values from the coarse mesh, it cannot ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


71-71: Clarify spatial relation
Revise for grammar and clarity:

- will create a non-zero divergence in cells just left to the former boundary since 
+ will create a non-zero divergence in cells just to the left of the former boundary, since
🧰 Tools
🪛 LanguageTool

[uncategorized] ~71-~71: “to the” seems less likely than “the”.
Context: ... non-zero divergence in cells just left to the former boundary since one of the four ...

(AI_HYDRA_LEO_CP_TO_THE_THE)


[uncategorized] ~71-~71: Possible missing comma found.
Context: ...rgence in cells just left to the former boundary since one of the four faces of these c...

(AI_HYDRA_LEO_MISSING_COMMA)


75-75: Clarify redundancy
Remove the repeated word "flux":

- ensure that newly refined faces account for the flux at fine fluxes at the coarse-fine boundary
+ ensure that newly refined faces account for the fine fluxes at the coarse-fine boundary

90-90: Align alt text with image file
Update the alt text to match the PNG filename:

- ![tothandroe2022](tothandroe2002.png)
+ ![tothandroe2002](tothandroe2002.png)

101-101: Use title case for section heading

- ## Particle refinement
+ ## Particle Refinement

105-105: Use title case for section heading

- ## Field coarsening
+ ## Field Coarsening

109-109: Use title case for section heading

- ## Fields at level boundaries
+ ## Fields at Level Boundaries

113-113: Use title case for section heading

- ## Particle at level boundaries
+ ## Particle at Level Boundaries
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f3fa84 and a784b80.

📒 Files selected for processing (1)
  • doc/source/theory/amr.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/source/theory/amr.md

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integratio...

(BASED_HYPHEN)


[uncategorized] ~24-~24: You might be missing the article “the” here.
Context: ...on whether particle data is refined, or field is. The specific operation performed al...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~46-~46: The preposition “on” seems more likely in this position.
Context: ...ne mesh imposing its face value blindly to the other without risking to break the ...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)


[grammar] ~46-~46: The verb ‘risking’ is used with the gerund form.
Context: ...face value blindly to the other without risking to break the divergence-free condition. ![coars...

(ADMIT_ENJOY_VB)


[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ...inement of the new blue components only consider values from the coarse mesh, it cannot ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~71-~71: “to the” seems less likely than “the”.
Context: ... non-zero divergence in cells just left to the former boundary since one of the four ...

(AI_HYDRA_LEO_CP_TO_THE_THE)


[uncategorized] ~71-~71: Possible missing comma found.
Context: ...rgence in cells just left to the former boundary since one of the four faces of these c...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~74-~74: Possible missing preposition found.
Context: ...nce of the magnetic field at the coarse fine boundary is to ensure that newly refine...

(AI_HYDRA_LEO_MISSING_TO)


[uncategorized] ~88-~88: Possible missing comma found.
Context: ...es. This is illustrated in the figure below where inner new faces are represented i...

(AI_HYDRA_LEO_MISSING_COMMA)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: build (ubuntu-latest, gcc)
  • GitHub Check: build (ubuntu-latest, clang)
  • GitHub Check: build (macos-14)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (macos-13)
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (cpp)
🔇 Additional comments (1)
doc/source/theory/amr.md (1)

9-9: The heading "## Recursive time integration" is clear and well-formed.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
doc/source/theory/amr.md (1)

2-2: Ensure inclusion in Sphinx toctree
This new Markdown file won’t appear in the built docs unless it’s referenced in your Sphinx toctree (e.g., in index.rst) and your conf.py is configured to parse MD (MyST or recommonmark).

🧹 Nitpick comments (7)
doc/source/theory/amr.md (7)

6-6: Use hyphen in heading
Change "Patch based approach" to "Patch-based approach" for correct compound adjective spelling.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integratio...

(BASED_HYPHEN)


9-9: Use hyphen in heading
Change "Recursive time integration" to "Recursive time-integration" to maintain consistency with compound modifier style.


12-12: Fix typo in heading
Correct the heading from "## Regriding " to "## Regridding".


18-21: Correct multiple typos

  • "entired" → "entire"
  • "hierachy" → "hierarchy"
  • "leveel" → "level"
  • "refininig" → "refining"

23-24: Add missing article
Update "or field is" to "or the field is" for grammatical completeness.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~24-~24: You might be missing the article “the” here.
Context: ...on whether particle data is refined, or field is. The specific operation performed al...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


46-46: Adjust preposition for clarity
Change "imposing its face value blindly to the other" to "imposing its face value blindly on the other".

🧰 Tools
🪛 LanguageTool

[uncategorized] ~46-~46: The preposition “on” seems more likely in this position.
Context: ...ne mesh imposing its face value blindly to the other without risking to break the ...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)


[grammar] ~46-~46: The verb ‘risking’ is used with the gerund form.
Context: ...face value blindly to the other without risking to break the divergence-free condition. ![coars...

(ADMIT_ENJOY_VB)


74-74: Fix typo and hyphenation
Change "divergnce" to "divergence" and "coarse fine" to "coarse-fine".

🧰 Tools
🪛 LanguageTool

[uncategorized] ~74-~74: Possible missing preposition found.
Context: ...nce of the magnetic field at the coarse fine boundary is to ensure that newly refine...

(AI_HYDRA_LEO_MISSING_TO)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a784b80 and 6da3aa9.

📒 Files selected for processing (1)
  • doc/source/theory/amr.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/source/theory/amr.md

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integratio...

(BASED_HYPHEN)


[uncategorized] ~24-~24: You might be missing the article “the” here.
Context: ...on whether particle data is refined, or field is. The specific operation performed al...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~46-~46: The preposition “on” seems more likely in this position.
Context: ...ne mesh imposing its face value blindly to the other without risking to break the ...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)


[grammar] ~46-~46: The verb ‘risking’ is used with the gerund form.
Context: ...face value blindly to the other without risking to break the divergence-free condition. ![coars...

(ADMIT_ENJOY_VB)


[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ...inement of the new blue components only consider values from the coarse mesh, it cannot ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~71-~71: “to the” seems less likely than “the”.
Context: ... non-zero divergence in cells just left to the former boundary since one of the four ...

(AI_HYDRA_LEO_CP_TO_THE_THE)


[uncategorized] ~71-~71: Possible missing comma found.
Context: ...rgence in cells just left to the former boundary since one of the four faces of these c...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~74-~74: Possible missing preposition found.
Context: ...nce of the magnetic field at the coarse fine boundary is to ensure that newly refine...

(AI_HYDRA_LEO_MISSING_TO)


[uncategorized] ~88-~88: Possible missing comma found.
Context: ...es. This is illustrated in the figure below where inner new faces are represented i...

(AI_HYDRA_LEO_MISSING_COMMA)

⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: build (macos-14)
  • GitHub Check: build (macos-13)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (ubuntu-latest, gcc)
  • GitHub Check: build (ubuntu-latest, clang)
  • GitHub Check: Analyze (cpp)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
doc/source/theory/amr.md (1)

1-3: Include the new Markdown file in the Sphinx docs
Ensure that your Sphinx conf.py is configured to support Markdown parsing (e.g., via MyST or recommonmark) and that the parent toctree (such as in index.rst) includes theory/amr.md so this content appears in the rendered documentation.

🧹 Nitpick comments (8)
doc/source/theory/amr.md (8)

6-6: Add hyphen for compound adjective
The heading "Patch based approach" should be "Patch-based approach" to improve readability.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integratio...

(BASED_HYPHEN)


12-12: Fix heading typo
Change "## Regriding" to "## Regridding" (correct the spelling and remove trailing space).


14-21: Correct typos in regridding description
Replace "entired" → "entire", "hierachy" → "hierarchy", "leveel" → "level", and "refininig" → "refining" within this paragraph.


23-24: Add missing article and fix spelling
Replace "regriding" with "regridding" and change "or field is" to "or the field is" for grammatical correctness.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~24-~24: You might be missing the article “the” here.
Context: ...on whether particle data is refined, or field is. The specific operation performed al...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


46-46: Use proper preposition
Consider revising "imposing its face value blindly to the other" to "imposing its face value blindly on the other" for idiomatic phrasing.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~46-~46: The preposition “on” seems more likely in this position.
Context: ...ne mesh imposing its face value blindly to the other without risking to break the ...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)


[grammar] ~46-~46: The verb ‘risking’ is used with the gerund form.
Context: ...face value blindly to the other without risking to break the divergence-free condition. ![coars...

(ADMIT_ENJOY_VB)


66-66: Ensure subject-verb agreement
Change "refinement of the new blue components only consider" to "refinement of the new blue components only considers" to match singular subject.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ...inement of the new blue components only consider values from the coarse mesh, it cannot ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


74-74: Fix typo and hyphenation
Correct "divergnce" → "divergence" and hyphenate "coarse fine" → "coarse-fine".

🧰 Tools
🪛 LanguageTool

[uncategorized] ~74-~74: Possible missing preposition found.
Context: ...nce of the magnetic field at the coarse fine boundary is to ensure that newly refine...

(AI_HYDRA_LEO_MISSING_TO)


92-97: Correct MyST admon syntax
Use ::: seealso to open the admonition instead of :::{seealso}, and close with ::: for proper MyST formatting.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6da3aa9 and 241306f.

📒 Files selected for processing (1)
  • doc/source/theory/amr.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/source/theory/amr.md

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integratio...

(BASED_HYPHEN)


[uncategorized] ~24-~24: You might be missing the article “the” here.
Context: ...on whether particle data is refined, or field is. The specific operation performed al...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~46-~46: The preposition “on” seems more likely in this position.
Context: ...ne mesh imposing its face value blindly to the other without risking to break the ...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)


[grammar] ~46-~46: The verb ‘risking’ is used with the gerund form.
Context: ...face value blindly to the other without risking to break the divergence-free condition. ![coars...

(ADMIT_ENJOY_VB)


[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ...inement of the new blue components only consider values from the coarse mesh, it cannot ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~71-~71: “to the” seems less likely than “the”.
Context: ... non-zero divergence in cells just left to the former boundary since one of the four ...

(AI_HYDRA_LEO_CP_TO_THE_THE)


[uncategorized] ~71-~71: Possible missing comma found.
Context: ...rgence in cells just left to the former boundary since one of the four faces of these c...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~74-~74: Possible missing preposition found.
Context: ...nce of the magnetic field at the coarse fine boundary is to ensure that newly refine...

(AI_HYDRA_LEO_MISSING_TO)


[uncategorized] ~88-~88: Possible missing comma found.
Context: ...es. This is illustrated in the figure below where inner new faces are represented i...

(AI_HYDRA_LEO_MISSING_COMMA)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (5)
doc/source/theory/amr.md (5)

1-3: Include in Sphinx toctree
Ensure this Markdown file is referenced in the parent toctree (e.g., in index.rst or a nearby MD) and verify that MyST or a similar parser is enabled in conf.py so the content is rendered.


92-92: 🛠️ Refactor suggestion

Use correct MyST admon syntax
Change the opening seealso block to ::: seealso instead of :::{seealso}.

Apply this diff:

-:::{seealso}
+::: seealso

23-24: 🛠️ Refactor suggestion

Correct spelling and add missing article
Fix "regriding" → "regridding" and add "the" before "field" for clarity.

Apply this diff:

-Technically, regriding involves different methods depending on whether particle data
-is refined, or field is. The specific operation performed also depends on the type
+Technically, regridding involves different methods depending on whether particle data
+is refined, or the field is. The specific operation performed also depends on the type
🧰 Tools
🪛 LanguageTool

[uncategorized] ~24-~24: You might be missing the article “the” here.
Context: ...on whether particle data is refined, or field is. The specific operation performed al...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


74-74: 🛠️ Refactor suggestion

Fix typo and hyphenation
Correct "divergnce" → "divergence" and hyphenate "coarse-fine".

Apply this diff:

-The only way to preserve a zero divergnce of the magnetic field at the coarse fine boundary
+The only way to preserve a zero divergence of the magnetic field at the coarse-fine boundary
🧰 Tools
🪛 LanguageTool

[uncategorized] ~74-~74: Possible missing preposition found.
Context: ...nce of the magnetic field at the coarse fine boundary is to ensure that newly refine...

(AI_HYDRA_LEO_MISSING_TO)


18-21: 🛠️ Refactor suggestion

Correct typos in 'Regridding' description
Several words are misspelled.

Apply this diff:

-Concretely, regriding means removing an entired level from the AMR hierachy and replacing
-it by a new one. The so-called "new" leveel will be initialized by copying values
-from the old level wherever they overlap, and by refininig values from coarser levels
+Concretely, regridding means removing an entire level from the AMR hierarchy and replacing
+it with a new one. The so-called "new" level will be initialized by copying values
+from the old level wherever they overlap, and by refining values from coarser levels
🧹 Nitpick comments (3)
doc/source/theory/amr.md (3)

6-6: Hyphenate 'Patch-based approach'
Use a hyphen for the compound adjective.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integratio...

(BASED_HYPHEN)


41-42: Fix spelling: 'regridding'
Correct the typo in this sentence.

Apply this diff:

-Refining the magnetic field so to preserve its divergence-free character is easy in general but becomes tricky when done at the coarse-fine boundaries 
-during regriding.
+Refining the magnetic field to preserve its divergence-free character is generally straightforward, but becomes tricky when done at the coarse-fine boundaries
+during regridding.

75-75: Clarify wording
The phrase "flux at fine fluxes" is redundant. Consider simplifying to "account for the fine fluxes".

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 241306f and 9421c64.

📒 Files selected for processing (1)
  • doc/source/theory/amr.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/source/theory/amr.md

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integratio...

(BASED_HYPHEN)


[uncategorized] ~24-~24: You might be missing the article “the” here.
Context: ...on whether particle data is refined, or field is. The specific operation performed al...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~46-~46: The preposition “on” seems more likely in this position.
Context: ...ne mesh imposing its face value blindly to the other without risking to break the ...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)


[grammar] ~46-~46: The verb ‘risking’ is used with the gerund form.
Context: ...face value blindly to the other without risking to break the divergence-free condition. ![coars...

(ADMIT_ENJOY_VB)


[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ...inement of the new blue components only consider values from the coarse mesh, it cannot ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~71-~71: “to the” seems less likely than “the”.
Context: ... non-zero divergence in cells just left to the former boundary since one of the four ...

(AI_HYDRA_LEO_CP_TO_THE_THE)


[uncategorized] ~71-~71: Possible missing comma found.
Context: ...rgence in cells just left to the former boundary since one of the four faces of these c...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~74-~74: Possible missing preposition found.
Context: ...nce of the magnetic field at the coarse fine boundary is to ensure that newly refine...

(AI_HYDRA_LEO_MISSING_TO)


[uncategorized] ~88-~88: Possible missing comma found.
Context: ...es. This is illustrated in the figure below where inner new faces are represented i...

(AI_HYDRA_LEO_MISSING_COMMA)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (ubuntu-latest, gcc)
  • GitHub Check: build (macos-13)
  • GitHub Check: build (macos-14)
  • GitHub Check: build (ubuntu-latest, clang)
  • GitHub Check: Analyze (cpp)
  • GitHub Check: Analyze (python)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
doc/source/theory/toth2002.md (1)

7-7: ⚠️ Potential issue

Critical: Incorrect variable in w-component formula
The averaging term for w^{i,j,0} mistakenly uses v^{i,j,±}. It should reference the w components.
Apply this diff:

- w^{i,j,0}&=\frac{1}{2}(v^{i,j,+} + v^{i,j,-}) + W_{z z} + j(\Delta y)^2 U_{xyz} + i(\Delta x)^2 V_{xyz}
+ w^{i,j,0}&=\frac{1}{2}(w^{i,j,+} + w^{i,j,-}) + W_{z z} + j(\Delta y)^2 U_{xyz} + i(\Delta x)^2 V_{xyz}
🧰 Tools
🪛 LanguageTool

[duplication] ~7-~7: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(v^{i,j,+} + v^{i,j,-}) + W_{z z} + j(\Delta y)^2 U_{xyz} + i(\Delta x)^...

(WORD_REPEAT_RULE)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 080ad72 and 4151e8a.

📒 Files selected for processing (1)
  • doc/source/theory/toth2002.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/source/theory/toth2002.md

[duplication] ~5-~5: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(u^{+,j,k} + u^{-,j,k}) + U_{x x} + k(\Delta z)^2 V_{xyz} + j(\Delta y)^...

(WORD_REPEAT_RULE)


[duplication] ~6-~6: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(v^{i,+,k} + v^{i,-,k}) + V_{y y} + i(\Delta x)^2 W_{xyz} + k(\Delta z)^...

(WORD_REPEAT_RULE)


[duplication] ~7-~7: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(v^{i,j,+} + v^{i,j,-}) + W_{z z} + j(\Delta y)^2 U_{xyz} + i(\Delta x)^...

(WORD_REPEAT_RULE)


[duplication] ~13-~13: Možný preklep: zopakovali ste slovo
Context: ...z} \end{align} with: \begin{align} U_{x x} &= \frac{1}{8} \sum_{ijk=\pm } ijv^{i,...

(WORD_REPEAT_RULE)


[duplication] ~14-~14: Možný preklep: zopakovali ste slovo
Context: ...jk=\pm } ijv^{i,j,k} + ikw^{i,j,k}\ V_{y y} &= \frac{1}{8} \sum_{ijk=\pm } iju^{i,...

(WORD_REPEAT_RULE)


[duplication] ~15-~15: Možný preklep: zopakovali ste slovo
Context: ...jk=\pm } iju^{i,j,k} + jkw^{i,j,k}\ W_{z z} &= \frac{1}{8} \sum_{ijk=\pm } iku^{i,...

(WORD_REPEAT_RULE)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (macos-14)
  • GitHub Check: build (macos-13)
  • GitHub Check: build (ubuntu-latest, clang)
  • GitHub Check: build (ubuntu-latest, gcc)
  • GitHub Check: Analyze (cpp)
  • GitHub Check: Analyze (python)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (2)
doc/source/theory/toth2002.md (2)

12-16: Wrap secondary and tertiary align blocks in math delimiters
Both the refinement terms (U_{x x}, V_{y y}, W_{z z}) and the mixed derivatives (U_{xyz}, V_{xyz}, W_{xyz}) are defined in separate align environments that need enclosing $$ for correct Markdown rendering.

+$$
 \begin{align}
   U_{x x} &= \dots \\
   V_{y y} &= \dots \\
   W_{z z} &= \dots
 \end{align}
+$$

+$$
 \begin{align}
   U_{xyz}&=\dots \\
   V_{xyz}&=\dots \\
   W_{xyz}&=\dots
 \end{align}
+$$

Also applies to: 20-24

🧰 Tools
🪛 LanguageTool

[duplication] ~13-~13: Možný preklep: zopakovali ste slovo
Context: ...z} \end{align} with: \begin{align} U_{x x} &= \frac{1}{8} \sum_{ijk=\pm } ijv^{i,...

(WORD_REPEAT_RULE)


[duplication] ~14-~14: Možný preklep: zopakovali ste slovo
Context: ...jk=\pm } ijv^{i,j,k} + ikw^{i,j,k}\ V_{y y} &= \frac{1}{8} \sum_{ijk=\pm } iju^{i,...

(WORD_REPEAT_RULE)


[duplication] ~15-~15: Možný preklep: zopakovali ste slovo
Context: ...jk=\pm } iju^{i,j,k} + jkw^{i,j,k}\ W_{z z} &= \frac{1}{8} \sum_{ijk=\pm } iku^{i,...

(WORD_REPEAT_RULE)


4-8: ⚠️ Potential issue

Fix w-component formula and wrap align in math delimiters
The third equation mistakenly averages the v-components instead of the w-components, and the align block isn’t wrapped in $$.

Apply this diff:

+$$
 \begin{align}
- u^{0,j,k}&=\frac{1}{2}(u^{+,j,k} + u^{-,j,k}) + U_{x x} + k(\Delta z)^2 V_{xyz} + j(\Delta y)^2 W_{xyz} \\
- v^{i,0,k}&=\frac{1}{2}(v^{i,+,k} + v^{i,-,k}) + V_{y y} + i(\Delta x)^2 W_{xyz} + k(\Delta z)^2 U_{xyz}\\
- w^{i,j,0}&=\frac{1}{2}(v^{i,j,+} + v^{i,j,-}) + W_{z z} + j(\Delta y)^2 U_{xyz} + i(\Delta x)^2 V_{xyz}
+ u^{0,j,k}&=\frac{1}{2}(u^{+,j,k} + u^{-,j,k}) + U_{x x} + k(\Delta z)^2 V_{xyz} + j(\Delta y)^2 W_{xyz} \\
+ v^{i,0,k}&=\frac{1}{2}(v^{i,+,k} + v^{i,-,k}) + V_{y y} + i(\Delta x)^2 W_{xyz} + k(\Delta z)^2 U_{xyz}\\
+ w^{i,j,0}&=\frac{1}{2}(w^{i,j,+} + w^{i,j,-}) + W_{z z} + j(\Delta y)^2 U_{xyz} + i(\Delta x)^2 V_{xyz}
 \end{align}
+$$
🧰 Tools
🪛 LanguageTool

[duplication] ~5-~5: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(u^{+,j,k} + u^{-,j,k}) + U_{x x} + k(\Delta z)^2 V_{xyz} + j(\Delta y)^...

(WORD_REPEAT_RULE)


[duplication] ~6-~6: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(v^{i,+,k} + v^{i,-,k}) + V_{y y} + i(\Delta x)^2 W_{xyz} + k(\Delta z)^...

(WORD_REPEAT_RULE)


[duplication] ~7-~7: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(v^{i,j,+} + v^{i,j,-}) + W_{z z} + j(\Delta y)^2 U_{xyz} + i(\Delta x)^...

(WORD_REPEAT_RULE)

🧹 Nitpick comments (2)
doc/source/theory/toth2002.md (2)

28-31: Clarify the divergence verification equation
The inline equation ends with a ?, which may be unintended or denote a placeholder. Remove the ? or add explanatory text to clarify its purpose.


34-53: Enclose all subsequent align environments in math delimiters
Throughout the divergence verification section, multiple align blocks (lines 34–53, 57–76, 81–95, 100–103, 108–111, 115–119) are unwrapped. Wrap each in $$ to ensure proper LaTeX rendering in Markdown.

Also applies to: 57-76, 81-95, 100-103, 108-111, 115-119

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4151e8a and 15c2ac6.

📒 Files selected for processing (1)
  • doc/source/theory/toth2002.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/source/theory/toth2002.md

[duplication] ~5-~5: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(u^{+,j,k} + u^{-,j,k}) + U_{x x} + k(\Delta z)^2 V_{xyz} + j(\Delta y)^...

(WORD_REPEAT_RULE)


[duplication] ~6-~6: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(v^{i,+,k} + v^{i,-,k}) + V_{y y} + i(\Delta x)^2 W_{xyz} + k(\Delta z)^...

(WORD_REPEAT_RULE)


[duplication] ~7-~7: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(v^{i,j,+} + v^{i,j,-}) + W_{z z} + j(\Delta y)^2 U_{xyz} + i(\Delta x)^...

(WORD_REPEAT_RULE)


[duplication] ~13-~13: Možný preklep: zopakovali ste slovo
Context: ...z} \end{align} with: \begin{align} U_{x x} &= \frac{1}{8} \sum_{ijk=\pm } ijv^{i,...

(WORD_REPEAT_RULE)


[duplication] ~14-~14: Možný preklep: zopakovali ste slovo
Context: ...jk=\pm } ijv^{i,j,k} + ikw^{i,j,k}\ V_{y y} &= \frac{1}{8} \sum_{ijk=\pm } iju^{i,...

(WORD_REPEAT_RULE)


[duplication] ~15-~15: Možný preklep: zopakovali ste slovo
Context: ...jk=\pm } iju^{i,j,k} + jkw^{i,j,k}\ W_{z z} &= \frac{1}{8} \sum_{ijk=\pm } iku^{i,...

(WORD_REPEAT_RULE)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: Analyze (cpp)
  • GitHub Check: build (macos-14)
  • GitHub Check: build (macos-13)
  • GitHub Check: Analyze (python)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (ubuntu-latest, gcc)
  • GitHub Check: build (ubuntu-latest, clang)
🔇 Additional comments (1)
doc/source/theory/toth2002.md (1)

1-2: Heading is clear
The document title succinctly describes the content.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 8

♻️ Duplicate comments (4)
doc/source/theory/amr.md (2)

2-2: Include amr.md in the Sphinx toctree
Ensure doc/source/index.rst (or the appropriate parent) references theory/amr.md and confirm that MyST or recommonmark is enabled in conf.py so this document appears in the rendered output.


92-97: Fix MyST admonition syntax
Use the correct MyST syntax for a seealso admonition:

::: seealso
Toth and Roe 2002  
Divergence- and Curl-Preserving Prolongation and Restriction Formulas  
…  
:::

instead of the current ::: {seealso} notation.

doc/source/theory/toth2002.md (2)

4-8: 🛠️ Refactor suggestion

Enclose primary align block in math delimiters
Wrap the \begin{align}…\end{align} block with $$ to ensure it renders properly:

+ $$
  \begin{align}
    u^{0,j,k}&=… \\
    v^{i,0,k}&=… \\
    w^{i,j,0}&=… 
  \end{align}
+ $$
🧰 Tools
🪛 LanguageTool

[duplication] ~5-~5: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(u^{+,j,k} + u^{-,j,k}) + U_{x x} + k(\Delta z)^2 V_{xyz} + j(\Delta y)^...

(WORD_REPEAT_RULE)


[duplication] ~6-~6: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(v^{i,+,k} + v^{i,-,k}) + V_{y y} + i(\Delta x)^2 W_{xyz} + k(\Delta z)^...

(WORD_REPEAT_RULE)


[duplication] ~7-~7: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(v^{i,j,+} + w^{i,j,-}) + W_{z z} + j(\Delta y)^2 U_{xyz} + i(\Delta x)^...

(WORD_REPEAT_RULE)


12-17: 🛠️ Refactor suggestion

Wrap secondary align block with math delimiters
Enclose the equations at lines 12–16 in $$ and remove any stray $$ to render correctly:

+ $$
  \begin{align}
    U_{xx} &= … \\
    V_{yy} &= … \\
    W_{zz} &= …
  \end{align}
+ $$
🧰 Tools
🪛 LanguageTool

[duplication] ~13-~13: Možný preklep: zopakovali ste slovo
Context: ...z} \end{align} with: \begin{align} U_{x x} &= \frac{1}{8} \sum_{ijk=\pm } ijv^{i,...

(WORD_REPEAT_RULE)


[duplication] ~14-~14: Možný preklep: zopakovali ste slovo
Context: ...jk=\pm } ijv^{i,j,k} + ikw^{i,j,k}\ V_{y y} &= \frac{1}{8} \sum_{ijk=\pm } iju^{i,...

(WORD_REPEAT_RULE)


[duplication] ~15-~15: Možný preklep: zopakovali ste slovo
Context: ...jk=\pm } iju^{i,j,k} + jkw^{i,j,k}\ W_{z z} &= \frac{1}{8} \sum_{ijk=\pm } iku^{i,...

(WORD_REPEAT_RULE)

🧹 Nitpick comments (8)
doc/source/theory/amr.md (8)

6-6: Hyphenate 'Patch based approach'
Change the heading to “## Patch-based approach” for correct hyphenation.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integratio...

(BASED_HYPHEN)


12-12: Capitalize and trim heading 'regridding'
Update the heading to “## Regridding” (capital R, no trailing space) for consistency.


14-15: Capitalize sentence and remove comma
Start with “Regridding is the process…” and remove the comma after “hierarchy”:

Regridding is the process of changing the geometry of an existing mesh level in the AMR hierarchy by changing the number and geometry of some patches of that level.

48-48: Add descriptive alt text for image
Provide meaningful alt text instead of “coarse_fine_boundary” to improve accessibility.


56-56: Add descriptive alt text for image
Enhance accessibility by giving “coarse_fine_boundary2.png” a concise, descriptive alt string.


74-74: Hyphenate 'coarse fine boundary'
Use “coarse-fine boundary” to maintain consistent hyphenation.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~74-~74: Possible missing preposition found.
Context: ...nce of the magnetic field at the coarse fine boundary is to ensure that newly refine...

(AI_HYDRA_LEO_MISSING_TO)


77-77: Explicitly include file extension in link
Consider using [Toth and Roe formulas](toth2002.md) so the link matches the actual Markdown filename.


90-90: Add descriptive alt text for image
Provide a clear alt description for “tothandroe2002.png” (e.g., “Toth & Roe interpolation schematic”).

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 15c2ac6 and 81dadbb.

⛔ Files ignored due to path filters (4)
  • doc/source/theory/coarse_fine_boundary.png is excluded by !**/*.png
  • doc/source/theory/coarse_fine_boundary2.png is excluded by !**/*.png
  • doc/source/theory/tothDivVerif.png is excluded by !**/*.png
  • doc/source/theory/tothandroe2002.png is excluded by !**/*.png
📒 Files selected for processing (8)
  • .gitignore (0 hunks)
  • doc/source/conf.py (1 hunks)
  • doc/source/index.rst (1 hunks)
  • doc/source/theory/amr.md (1 hunks)
  • doc/source/theory/amr.rst (0 hunks)
  • doc/source/theory/spatial_discretization.md (1 hunks)
  • doc/source/theory/spatial_discretization.rst (0 hunks)
  • doc/source/theory/toth2002.md (1 hunks)
💤 Files with no reviewable changes (3)
  • doc/source/theory/spatial_discretization.rst
  • .gitignore
  • doc/source/theory/amr.rst
✅ Files skipped from review due to trivial changes (1)
  • doc/source/index.rst
🚧 Files skipped from review as they are similar to previous changes (2)
  • doc/source/theory/spatial_discretization.md
  • doc/source/conf.py
🧰 Additional context used
🪛 LanguageTool
doc/source/theory/amr.md

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integratio...

(BASED_HYPHEN)


[uncategorized] ~46-~46: The preposition “on” seems more likely in this position.
Context: ...ne mesh imposing its face value blindly to the other without risking to break the ...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)


[grammar] ~46-~46: The verb ‘risking’ is used with the gerund form.
Context: ...face value blindly to the other without risking to break the divergence-free condition. ![coars...

(ADMIT_ENJOY_VB)


[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ...inement of the new blue components only consider values from the coarse mesh, it cannot ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~71-~71: “to the” seems less likely than “the”.
Context: ... non-zero divergence in cells just left to the former boundary since one of the four ...

(AI_HYDRA_LEO_CP_TO_THE_THE)


[uncategorized] ~71-~71: Possible missing comma found.
Context: ...rgence in cells just left to the former boundary since one of the four faces of these c...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~74-~74: Possible missing preposition found.
Context: ...nce of the magnetic field at the coarse fine boundary is to ensure that newly refine...

(AI_HYDRA_LEO_MISSING_TO)


[uncategorized] ~88-~88: Possible missing comma found.
Context: ...es. This is illustrated in the figure below where inner new faces are represented i...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~117-~117: Possible missing preposition found.
Context: ...ypes of fields: - the electric field - the ion total density and bulk velocity #...

(AI_HYDRA_LEO_MISSING_OF)

doc/source/theory/toth2002.md

[duplication] ~5-~5: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(u^{+,j,k} + u^{-,j,k}) + U_{x x} + k(\Delta z)^2 V_{xyz} + j(\Delta y)^...

(WORD_REPEAT_RULE)


[duplication] ~6-~6: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(v^{i,+,k} + v^{i,-,k}) + V_{y y} + i(\Delta x)^2 W_{xyz} + k(\Delta z)^...

(WORD_REPEAT_RULE)


[duplication] ~7-~7: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(v^{i,j,+} + w^{i,j,-}) + W_{z z} + j(\Delta y)^2 U_{xyz} + i(\Delta x)^...

(WORD_REPEAT_RULE)


[duplication] ~13-~13: Možný preklep: zopakovali ste slovo
Context: ...z} \end{align} with: \begin{align} U_{x x} &= \frac{1}{8} \sum_{ijk=\pm } ijv^{i,...

(WORD_REPEAT_RULE)


[duplication] ~14-~14: Možný preklep: zopakovali ste slovo
Context: ...jk=\pm } ijv^{i,j,k} + ikw^{i,j,k}\ V_{y y} &= \frac{1}{8} \sum_{ijk=\pm } iju^{i,...

(WORD_REPEAT_RULE)


[duplication] ~15-~15: Možný preklep: zopakovali ste slovo
Context: ...jk=\pm } iju^{i,j,k} + jkw^{i,j,k}\ W_{z z} &= \frac{1}{8} \sum_{ijk=\pm } iku^{i,...

(WORD_REPEAT_RULE)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: build (macos-14)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (macos-13)
  • GitHub Check: build (ubuntu-latest, gcc)
  • GitHub Check: build (ubuntu-latest, clang)
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (cpp)

Comment on lines +101 to +105
\begin{align}
&2(bx^{+++}+bx^{+ --} - bx^{- ++} - bx^{---} \\
&+ by^{- ++}+by^{++ -} - by^{-- +} - by^{+ --} \\
&+ bz^{- ++} + bz^{+ - +} - bz^{- + -} - bz^{+ --})
\end{align}
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Wrap first/second order align block with $$
Ensure the \begin{align} block is enclosed in $$ to display as math.

🤖 Prompt for AI Agents
In doc/source/theory/toth2002.md around lines 101 to 105, the LaTeX align
environment is not enclosed within double dollar signs, which is required to
properly display the block as math. Wrap the entire \begin{align} ...
\end{align} block with $$ at the start and end to ensure correct math rendering.

Comment on lines +83 to +97
\begin{align}
&4bx^{+++}-4bx^{- ++}+by^{+++}+bz^{+++}-by^{-++}-bz^{-++}-by^{+-+}+bz^{+-+}+by^{++-}-bz^{++-} \\
&-by^{+--}-bz^{+--}-by^{-+-}+bz^{-+-}+by^{--+}-bz^{--+}+by^{---}+bz^{---} \\
&4by^{-++}-4by^{- -+}-bx^{+++}-bz^{+++}+bx^{-++}-bz^{-++}+bx^{+-+}+bz^{+-+}-bx^{++-}+bz^{++-}\\
&+bx^{+--}-bz^{+--}+bx^{-+-}+bz^{-+-}-bx^{--+}+bz^{--+}-bx^{---}-bz^{---} \\
&4bz^{-++}-4bz^{- +-}-bx^{+++}-by^{+++}+bx^{-++}-by^{-++}-bx^{+-+}+by^{+-+}+bx^{++-}+by^{++-}\\
&+bx^{+--}-by^{+--}-bx^{-+-}+by^{-+-}+bx^{--+}+by^{--+}-bx^{---}-by^{---} \\ \\ \\

&+\frac{ \Delta z^2}{(\Delta x)^2 + (\Delta z)^2}(by^{+++}-by^{- ++} - by^{+ - +} - by^{++ -}+ by^{+ --} + by^{- + -} + by^{-- +} - by^{---}) \\
&+ \frac{\Delta y^2}{\Delta x^2 + \Delta y^2}(bz^{+++}-bz^{- ++} - bz^{+ - +} - bz^{++ -} + bz^{+ --} + bz^{- + -} + bz^{-- +} - bz^{---}) \\ \\
&+ \frac{ \Delta x^2}{(\Delta x)^2 + (\Delta y)^2}(bz^{+++}-bz^{- ++} - bz^{+ - +} - bz^{++ -} + bz^{+ --} + bz^{- + -} + bz^{-- +} - bz^{---}) \\
&- \frac{\Delta z^2}{\Delta y^2 + \Delta z^2}(bx^{+++}-bx^{- ++} - bx^{+ - +} - bx^{++ -} + bx^{+ --} + bx^{- + -} + bx^{-- +} - bx^{---}) \\
&-\frac{ \Delta y^2}{(\Delta y)^2 + (\Delta z)^2}(bx^{+++}-bx^{- ++} - bx^{+ - +} - bx^{++ -} + bx^{+ --} + bx^{- + -} + bx^{-- +} - bx^{---}) \\
&+ \frac{\Delta x^2}{\Delta x^2 + \Delta z^2}(by^{+++}-by^{- ++} - by^{+ - +} - by^{++ -} + by^{+ --} + by^{- + -} + by^{-- +} - by^{---})
\end{align}
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enclose multiplication result block in math delimiters
Add $$ before and after lines 83–97 to render this LaTeX section correctly.

🤖 Prompt for AI Agents
In doc/source/theory/toth2002.md around lines 83 to 97, the LaTeX block
containing the multiplication results is not enclosed in math delimiters,
causing rendering issues. Add double dollar signs ($$) before line 83 and after
line 97 to properly delimit the entire LaTeX block for correct rendering.

Comment on lines +59 to +78
\begin{align}
bx^{0++}-bx^{- ++}&=\frac{1}{2}(bx^{+++}-bx^{- ++})+\frac{1}{8}(by^{+++}+bz^{+++}-by^{-++}-bz^{-++}-by^{+-+}+bz^{+-+}+by^{++-}-bz^{++-}\\
&-by^{+--}-bz^{+--}-by^{-+-}+bz^{-+-}+by^{--+}-bz^{--+}+by^{---}+bz^{---}) \\
&+\frac{1}{8} \frac{ \Delta z^2}{(\Delta x)^2 + (\Delta z)^2}(by^{+++}-by^{- ++} - by^{+ - +} - by^{++ -} \\
&+ by^{+ --} + by^{- + -} + by^{-- +} - by^{---}) \\
&+ \frac{1}{8} \frac{\Delta y^2}{\Delta x^2 + \Delta y^2}(bz^{+++}-bz^{- ++} - bz^{+ - +} - bz^{++ -} \\
&+ bz^{+ --} + bz^{- + -} + bz^{-- +} - bz^{---}) \\
by^{- ++} - by^{-0+}&=\frac{1}{2}(by^{-++}-by^{- -+})-\frac{1}{8}(bx^{+++}+bz^{+++}-bx^{-++}+bz^{-++}-bx^{+-+}-bz^{+-+}+bx^{++-}-bz^{++-}\\
&-bx^{+--}+bz^{+--}-bx^{-+-}-bz^{-+-}+bx^{--+}-bz^{--+}+bx^{---}+bz^{---}) \\
&+\frac{1}{8} \frac{ \Delta x^2}{(\Delta x)^2 + (\Delta y)^2}(bz^{+++}-bz^{- ++} - bz^{+ - +} - bz^{++ -} \\
&+ bz^{+ --} + bz^{- + -} + bz^{-- +} - bz^{---}) \\
&- \frac{1}{8} \frac{\Delta z^2}{\Delta y^2 + \Delta z^2}(bx^{+++}-bx^{- ++} - bx^{+ - +} - bx^{++ -} \\
&+ bx^{+ --} + bx^{- + -} + bx^{-- +} - bx^{---})\\
bz^{- ++}-bz^{- +0}&=\frac{1}{2}(bz^{-++}-bz^{- +-})-\frac{1}{8}(bx^{+++}+by^{+++}-bx^{-++}+by^{-++}+bx^{+-+}-by^{+-+}-bx^{++-}-by^{++-}\\
&-bx^{+--}+by^{+--}+bx^{-+-}-by^{-+-}-bx^{--+}-by^{--+}+bx^{---}+by^{---}) \\
&-\frac{1}{8} \frac{ \Delta y^2}{(\Delta y)^2 + (\Delta z)^2}(bx^{+++}-bx^{- ++} - bx^{+ - +} - bx^{++ -} \\
&+ bx^{+ --} + bx^{- + -} + bx^{-- +} - bx^{---}) \\
&+ \frac{1}{8} \frac{\Delta x^2}{\Delta x^2 + \Delta z^2}(by^{+++}-by^{- ++} - by^{+ - +} - by^{++ -} \\
&+ by^{+ --} + by^{- + -} + by^{-- +} - by^{---})
\end{align}
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Wrap 'differences' align block in math delimiters
Surround the multi-line \begin{align}…\end{align} section with $$ for proper formatting.

🤖 Prompt for AI Agents
In doc/source/theory/toth2002.md around lines 59 to 78, the multi-line LaTeX
align environment is not wrapped in math delimiters, which can cause formatting
issues. Fix this by enclosing the entire \begin{align}...\end{align} block
within double dollar signs ($$) to ensure it is properly rendered as a displayed
math block.

Comment on lines +109 to +113
\begin{align}
&by^{+++} - by^{- ++} - by^{+ - +} - by^{++ -} + by^{+ --} + by^{- + -} + by^{-- +} - by^{---} \\
+&bz^{+++} - bz^{- ++} - bz^{+ - +} - bz^{++ -} + bz^{+ --} + bz^{- + -} + bz^{-- +} - bz^{---} \\
-&bx^{+++} + bx^{- ++} + bx^{+ - +} + bx^{++ -} - bx^{+ --} - bx^{- + -} - bx^{-- +} + bx^{---}
\end{align}
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Wrap third order align block with math delimiters
Add $$ around the equations at lines 109–113 for proper Markdown rendering.

🤖 Prompt for AI Agents
In doc/source/theory/toth2002.md around lines 109 to 113, the third order align
block is missing math delimiters, causing improper Markdown rendering. Wrap the
entire align environment with double dollar signs ($$) before line 109 and after
line 113 to ensure it is correctly recognized and rendered as a math block.

Comment on lines +36 to +43
\begin{align}
bx^{0++}&=\frac{1}{2}(bx^{+++}+bx^{- ++})+\frac{1}{8}(by^{+++}+bz^{+++}-by^{-++}-bz^{-++}-by^{+-+}+bz^{+-+}+by^{++-}-bz^{++-}\\
&-by^{+--}-bz^{+--}-by^{-+-}+bz^{-+-}+by^{--+}-bz^{--+}+by^{---}+bz^{---}) \\
&+\frac{1}{8} \frac{ \Delta z^2}{(\Delta x)^2 + (\Delta z)^2}(by^{+++}-by^{- ++} - by^{+ - +} - by^{++ -} \\
&+ by^{+ --} + by^{- + -} + by^{-- +} - by^{---}) \\
&+ \frac{1}{8} \frac{\Delta y^2}{\Delta x^2 + \Delta y^2}(bz^{+++}-bz^{- ++} - bz^{+ - +} - bz^{++ -} \\
&+ bz^{+ --} + bz^{- + -} + bz^{-- +} - bz^{---}) \\
by^{-0+}&=\frac{1}{2}(by^{-++}+by^{- -+})+\frac{1}{8}(bx^{+++}+bz^{+++}-bx^{-++}+bz^{-++}-bx^{+-+}-bz^{+-+}+bx^{++-}-bz^{++-}\\
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enclose divergence verification equations in $$
The \begin{align} block under “Divergence verification” needs $$ wrappers to render as math.

🤖 Prompt for AI Agents
In doc/source/theory/toth2002.md around lines 36 to 43, the LaTeX align
environment for divergence verification equations is missing enclosing `$$`
delimiters, which are required for proper math rendering. Add `$$` before the
`\begin{align}` and after the `\end{align}` to ensure the entire block is
correctly recognized and rendered as a math environment.

Comment on lines +20 to +24
\begin{align}
U_{xyz}&=\frac{1}{8}\sum_{ijk=\pm} \frac{ijku^{i,j,k}}{(\Delta y)^2+(\Delta z)^2} \\
V_{xyz}&=\frac{1}{8}\sum_{ijk=\pm} \frac{ijkv^{i,j,k}}{(\Delta x)^2+(\Delta z)^2} \\
W_{xyz}&=\frac{1}{8}\sum_{ijk=\pm} \frac{ijkw^{i,j,k}}{(\Delta x)^2+(\Delta y)^2}
\end{align}
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Wrap tertiary align block with math delimiters
Ensure the third \begin{align}…\end{align} block is surrounded by $$.

🤖 Prompt for AI Agents
In doc/source/theory/toth2002.md around lines 20 to 24, the tertiary align block
is not wrapped with math delimiters. Surround the entire
\begin{align}...\end{align} block with double dollar signs ($$) to properly
format it as a displayed math block in the markdown.

Comment on lines +117 to +121
\begin{align}
&bx^{+++}+bx^{+- +}+bx^{++-}+bx^{+ - -}-bx^{- + +} -bx^{- + -}-bx^{-- +} -bx^{- --}\\
+&by^{+++}+by^{- + +}+by^{++ -}+by^{-+-}-by^{+ - +}-by^{- - +} -by^{+ --} -by^{-- -} \\
+&bz^{+++}+bz^{- + +}+bz^{+- +}+bz^{--+}-bz^{+ + -}-bz^{- + -} -bz^{+ --} -bz^{-- -}
\end{align}
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enclose final expression align block in $$
Surround the last \begin{align}…\end{align} environment with $$ for correct display.

🤖 Prompt for AI Agents
In doc/source/theory/toth2002.md around lines 117 to 121, the final expression
inside the align environment is not enclosed within double dollar signs, which
is required for proper display in the rendered document. To fix this, wrap the
entire \begin{align}...\end{align} block with $$ at the start and end to ensure
correct mathematical formatting.

\begin{align}
u^{0,j,k}&=\frac{1}{2}(u^{+,j,k} + u^{-,j,k}) + U_{x x} + k(\Delta z)^2 V_{xyz} + j(\Delta y)^2 W_{xyz} \\
v^{i,0,k}&=\frac{1}{2}(v^{i,+,k} + v^{i,-,k}) + V_{y y} + i(\Delta x)^2 W_{xyz} + k(\Delta z)^2 U_{xyz}\\
w^{i,j,0}&=\frac{1}{2}(v^{i,j,+} + w^{i,j,-}) + W_{z z} + j(\Delta y)^2 U_{xyz} + i(\Delta x)^2 V_{xyz}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix variable in w-component averaging
The average term uses v^{i,j,+} instead of w^{i,j,+}. Update to:

\frac{1}{2}\bigl(w^{i,j,+} + w^{i,j,-}\bigr)
🧰 Tools
🪛 LanguageTool

[duplication] ~7-~7: Možný preklep: zopakovali ste slovo
Context: ...\frac{1}{2}(v^{i,j,+} + w^{i,j,-}) + W_{z z} + j(\Delta y)^2 U_{xyz} + i(\Delta x)^...

(WORD_REPEAT_RULE)

🤖 Prompt for AI Agents
In doc/source/theory/toth2002.md at line 7, the averaging term for the
w-component incorrectly uses v^{i,j,+} instead of w^{i,j,+}. Replace v^{i,j,+}
with w^{i,j,+} so the term reads \frac{1}{2}\bigl(w^{i,j,+} + w^{i,j,-}\bigr) to
correctly average the w-component values.

@nicolasaunai nicolasaunai marked this pull request as ready for review June 6, 2025 14:04
@nicolasaunai nicolasaunai requested a review from UCaromel June 6, 2025 14:04
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (2)
doc/source/theory/amr.md (2)

92-97: ⚠️ Potential issue

Fix invalid MyST admon syntax.

MyST uses ::: seealso rather than :::{seealso}:

-:::{seealso}
+::: seealso
 Toth and Roe 2002
 ...
 :::

1-5: 💡 Verification agent

🧩 Analysis chain

Verify inclusion in Sphinx toctree.

Ensure theory/amr.md is referenced in your toctree so it appears in the built docs:


🏁 Script executed:

#!/bin/bash
# Search for amr.md in the index
rg -n "amr.md" -n doc/source/index.rst || echo "Please add 'theory/amr.md' to your toctree."

Length of output: 141


Add theory/amr.md to the Sphinx toctree

The file doc/source/theory/amr.md isn’t referenced in doc/source/index.rst, so it won’t be included in the built documentation. Please update your toctree:

• File: doc/source/index.rst
• Insert under the existing .. toctree:: directive

Suggested diff:

 .. toctree::
    :maxdepth: 2

+   theory/amr.md
🧹 Nitpick comments (16)
doc/source/theory/amr.md (16)

6-6: Hyphenate compound adjective in heading.

Use a hyphen for “Patch-based approach” to follow standard English:

-## Patch based approach
+## Patch-based approach
🧰 Tools
🪛 LanguageTool

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integratio...

(BASED_HYPHEN)


12-12: Capitalize and normalize heading ‘regridding’.

Make it title-case and remove trailing space:

-## regridding 
+## Regridding

14-15: Sentence case and capitalize the first word.

Every section intro should start with a capital letter:

-regridding is the process of changing the geometry of an existing mesh level in the
+Regridding is the process of changing the geometry of an existing mesh level in the

23-24: Streamline conditional phrasing.

Remove the comma and clarify the comparison:

-Technically, regridding involves different methods depending on whether particle data
-is refined, or field data is.
+Technically, regridding involves different methods depending on whether particle data or field data is being refined.

31-31: Title-case subheading and hyphenate.

Use consistent heading style:

-### divergence-free magnetic refinement
+### Divergence-Free Magnetic Refinement

37-38: Fix spelling of “regridded”.

The past-tense of “regrid” should have two d’s:

-- when a level is regrided
+- when a level is regridded

40-42: Clarify prose in refinement description.

Replace “so to preserve” with “to preserve” and tighten the sentence:

-Refining the magnetic field so to preserve its divergence-free character is
-easy in general but becomes tricky when done at the coarse-fine boundaries 
-during regridding.
+Refining the magnetic field to preserve its divergence-free character is straightforward in general, but becomes tricky at coarse-fine boundaries during regridding.

46-46: Correct gerund usage.

Use “risking breaking” instead of “risking to break”:

-We cannot have one mesh imposing its face value blindly to the other without risking to break the divergence-free condition.
+We cannot have one mesh imposing its face value blindly on the other without risking breaking the divergence-free condition.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~46-~46: The preposition “on” seems more likely in this position.
Context: ...ne mesh imposing its face value blindly to the other without risking to break the ...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)


[grammar] ~46-~46: The verb ‘risking’ is used with the gerund form.
Context: ...face value blindly to the other without risking to break the divergence-free condition. ![coars...

(ADMIT_ENJOY_VB)


66-69: Fix subject-verb agreement & add missing noun.

Ensure the refinement “considers” and mention the magnetic field:

-In the first case, if the refinement of the new blue components only consider values
-from the coarse mesh, it cannot account for the fine flux imposed at the former 
-coarse-fine boundary and the divergence of the magnetic has thus no reason to be zero
+In the first case, if the refinement of the new blue components only considers values from the coarse mesh, it cannot account for the fine flux imposed at the former coarse-fine boundary, and the divergence of the magnetic field therefore need not be zero
🧰 Tools
🪛 LanguageTool

[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ...inement of the new blue components only consider values from the coarse mesh, it cannot ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


70-71: Fix typo and pronoun agreement.

Correct “overwritting” and use plural pronouns:

-In the second case, the overwritting of fine faces at the former coarse-fine boundary
-will create a non-zero divergence in cells just left to the former boundary since 
-one of the four faces of these cells see its flux changed.
+In the second case, the overwriting of fine faces at the former coarse-fine boundary will create a non-zero divergence in cells just left of the former boundary since one of their four faces sees its flux changed.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~71-~71: “to the” seems less likely than “the”.
Context: ... non-zero divergence in cells just left to the former boundary since one of the four ...

(AI_HYDRA_LEO_CP_TO_THE_THE)


[uncategorized] ~71-~71: Possible missing comma found.
Context: ...rgence in cells just left to the former boundary since one of the four faces of these c...

(AI_HYDRA_LEO_MISSING_COMMA)


74-75: Hyphenate and remove redundancy.

Combine and simplify the clause on coarse-fine boundary flux:

-The only way to preserve a zero divergence of the magnetic field at the coarse fine boundary
-is to ensure that newly refined faces account for the flux at fine fluxes at the coarse-fine boundary.
+The only way to preserve zero divergence of the magnetic field at the coarse-fine boundary is to ensure that newly refined faces account for the fine fluxes at that boundary.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~74-~74: Possible missing preposition found.
Context: ...nce of the magnetic field at the coarse fine boundary is to ensure that newly refine...

(AI_HYDRA_LEO_MISSING_TO)


100-103: Replace placeholder with TODO or actual content.

Avoid bare placeholders—either add the explanation or wrap it in a note/admon:

::: warning
**TODO:** Add a detailed description of electric field refinement.
:::

107-110: Correct spelling and punctuation.

Fix “restriction” punctuation and “overlaped” typo:

-Coarsening, also sometimes called "restriction" is the process of projecting the 
-solution existing on a given level onto the region it overlaps on the next coarser level.
+Coarsening, also sometimes called “restriction”, is the process of projecting the solution on a given level onto the region it overlaps on the next coarser level.
  • Ensure “overlaps” is spelled with two p’s if used elsewhere.

112-118: Add missing verb in PHARE description.

Insert verb to complete the sentence:

-When coarsening data between two hybrid PIC levels, PHARE three types of fields:
+When coarsening data between two hybrid PIC levels, PHARE handles three types of fields:
🧰 Tools
🪛 LanguageTool

[uncategorized] ~117-~117: Possible missing preposition found.
Context: ...ypes of fields: - the electric field - the ion total density and bulk velocity #...

(AI_HYDRA_LEO_MISSING_OF)


141-141: Pluralize heading.

Make level-boundary headings consistent:

-## Particle at level boundaries
+## Particles at Level Boundaries

48-56: Enhance image alt text for accessibility.

Provide descriptive alt text instead of file names:

-![coarse_fine_boundary](coarse_fine_boundary.png)
+![Diagram of coarse-fine mesh boundary](coarse_fine_boundary.png)
 
-![coarse_fine_boundary2](coarse_fine_boundary2.png)
+![Mesh after regridding at coarse-fine boundary](coarse_fine_boundary2.png)
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 81dadbb and 7553649.

📒 Files selected for processing (1)
  • doc/source/theory/amr.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/source/theory/amr.md

[uncategorized] ~6-~6: This expression is usually spelled with a hyphen.
Context: # Adaptive Mesh Refinement ## Patch based approach ## Recursive time integratio...

(BASED_HYPHEN)


[uncategorized] ~46-~46: The preposition “on” seems more likely in this position.
Context: ...ne mesh imposing its face value blindly to the other without risking to break the ...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)


[grammar] ~46-~46: The verb ‘risking’ is used with the gerund form.
Context: ...face value blindly to the other without risking to break the divergence-free condition. ![coars...

(ADMIT_ENJOY_VB)


[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ...inement of the new blue components only consider values from the coarse mesh, it cannot ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~71-~71: “to the” seems less likely than “the”.
Context: ... non-zero divergence in cells just left to the former boundary since one of the four ...

(AI_HYDRA_LEO_CP_TO_THE_THE)


[uncategorized] ~71-~71: Possible missing comma found.
Context: ...rgence in cells just left to the former boundary since one of the four faces of these c...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~74-~74: Possible missing preposition found.
Context: ...nce of the magnetic field at the coarse fine boundary is to ensure that newly refine...

(AI_HYDRA_LEO_MISSING_TO)


[uncategorized] ~88-~88: Possible missing comma found.
Context: ...es. This is illustrated in the figure below where inner new faces are represented i...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~117-~117: Possible missing preposition found.
Context: ...ypes of fields: - the electric field - the ion total density and bulk velocity #...

(AI_HYDRA_LEO_MISSING_OF)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (macos-14)
  • GitHub Check: build (macos-13)
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (cpp)
  • GitHub Check: build (ubuntu-latest, gcc)
  • GitHub Check: build (ubuntu-latest, clang)

Copy link
Member

Choose a reason for hiding this comment

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

is this important?

Copy link
Member Author

Choose a reason for hiding this comment

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

still thinking about the best way to have some documentations for developpers. Stuff not useful from a user perspective but important for us, such as ghost filling, level/patch ghost particle handling, etc.
This was created because of what's in the index.rst below.
Ideally, this would be from a bridge between doxygen and sphinx.

@PhilipDeegan
Copy link
Member

seems to be wip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants