Skip to content

Interpolators for Julia Operators#332

Closed
jlbaranda wants to merge 8 commits intocsrc-sdsu:mainfrom
jlbaranda:interpolator_branch
Closed

Interpolators for Julia Operators#332
jlbaranda wants to merge 8 commits intocsrc-sdsu:mainfrom
jlbaranda:interpolator_branch

Conversation

@jlbaranda
Copy link
Copy Markdown

What type of PR is this? (check all applicable)

  • Refactor
  • [x ] Feature
  • Bug Fix
  • Optimization
  • [ x] Example
  • Documentation

Description

I am implementing the Interpol.m operator into Julia, creating test cases and showing two examples from the MATLAB implemented examples namely the hyperbolic1D.m and burgers1d.m.

Related Issues & Documents

QA Instructions, Screenshots, Recordings

I have added to file hyperbolic1D.jl that is currently a work in progress on mole/julia/MOLE.jl/examples/
I have added interpol.m that still needs test cases on mole/julia/MOLE.jl/src/Operators and included it onto the Operators.jl file

Added/updated tests?

_We encourage you to test all code included with MOLE, including examples.

  • Yes
  • [x ] No, and this is why: Current rough draft of implementation, only have translated over interpol.m and hyperbolic1D.m, I would need to work on creating test cases and resolving load error issue on Julia
  • I need help with writing tests

Read Contributing Guide and Code of Conduct

[optional] Are there any post deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

@valeriabarra
Copy link
Copy Markdown
Collaborator

Hi @jlbaranda, thank you for your contribution! As of now, your PR is adding 15 files, 12 of which are in MATLAB and 3 in Julia. This was probably a git mistake. Please remove the MATLAB files. If you need any assistance please let me know. Thanks

@jlbaranda
Copy link
Copy Markdown
Author

Hey @valeriabarra, I have removed the 12 MATLAB files from the Pull Request, I greatly appreciate it your prompt response. I'll keep working on the operator, and let you know if any questions arise. Thank you!!


# Initial Condition
q = 2 * π .* grid
println(typeof(q))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @jlbaranda , if this println statement was placed here for debugging purposes, please remove it. It is not present in the MATLAB counterpart. Thank you

D[end, end-1] = -1/(2*dx);

#Premultiply out of the time loop (since it does not change)
D = -a*dt*2*D*I;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why is the 2 in the RHS needed?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Oh, I think I have gathered from the comment below that this is using the leapfrog scheme. We should document this earlier, near the top of the file, not just in a comment near the plotting routine. Thank you!

@jbrzensk jbrzensk changed the title Interpolator branch Interpolators for Julia Operators Apr 16, 2026
@valeriabarra
Copy link
Copy Markdown
Collaborator

Hi @jlbaranda , looking at your commit history in this branch, it appears you have possibly created your branch from @jbrzensk 's branch for the M693B tutorial. Please make sure that you always base your development branch from the latest main branch. You should rebase your branch on the latest main branch, with git rebase. Please let me know if you need any assistance with this. Thanks

@valeriabarra
Copy link
Copy Markdown
Collaborator

Closing this as superseded by #340

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