Skip to content

Matlab to cpp translations. Hyperbolic1D, Parabolic2D, and Helmholtz2D_wifi#330

Open
CaywoodR wants to merge 17 commits into
csrc-sdsu:mainfrom
CaywoodR:matlab_to_python
Open

Matlab to cpp translations. Hyperbolic1D, Parabolic2D, and Helmholtz2D_wifi#330
CaywoodR wants to merge 17 commits into
csrc-sdsu:mainfrom
CaywoodR:matlab_to_python

Conversation

@CaywoodR
Copy link
Copy Markdown

@CaywoodR CaywoodR commented Apr 15, 2026

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

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Example
  • Documentation

Description

Translating from matlab to cpp for hyperbolic1D, parabolic2D, and helmholtz2D_wifi. hyperbolic1D and parabolic2D are ready for review. I am still working on the last one.

Related Issues & Documents

QA Instructions, Screenshots, Recordings

_From .../mole/build

cmake ..
make
cd /examples/cpp ./executable
in this case it is parabolic2D or hyperbolic1D._

Added/updated tests?

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

  • Yes
  • No, and this is why: I am translating these examples from matlab to cpp. The test I thought was appropriate was comparing to the output of the matlab codes to it's cpp counterpart. If this is a poor way of objectively testing I can adopt a different method for this task.
  • 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 @CaywoodR thank you for your contribution!

Please modify the name of the PR to reflect that it is not python and to be a bit more specific. Thank you!

@CaywoodR CaywoodR changed the title Matlab to python Matlab to cpp translations. Hyperbolic1D and Parabolic2D draft Apr 15, 2026
@valeriabarra
Copy link
Copy Markdown
Collaborator

Hi @CaywoodR , thank you for your contribution. Please update this branch with the main (you can use git merge or git rebase <- recommended, but then it requires a force-push). Please let me know if you need any assistance with that. Thank you

@CaywoodR
Copy link
Copy Markdown
Author

CaywoodR commented Apr 24, 2026

@valeriabarra Would I only use rebase on the local branch of the mole fork?

@valeriabarra
Copy link
Copy Markdown
Collaborator

@valeriabarra Would I only use rebase on the local branch of the mole fork?

Yes, but first you need to make sure your upstream and origin are set up correctly (check git remote -v to see where you're pointing to). Then you update the main branch by doing git fetch (and confirm that the latest commit you see in git log is what appears to be merged last in the public repo) and then you rebase the main branch onto yours.

@CaywoodR
Copy link
Copy Markdown
Author

On my current path /home/caywood/Math693B/mole/build/examples/cpp, I input git remote -v. It output

origin [email protected]:CaywoodR/mole.git (fetch)
origin [email protected]:CaywoodR/mole.git (push)

So, git fetch will update the main branch on my fork?

@valeriabarra
Copy link
Copy Markdown
Collaborator

Do
git remote add upstream <ORIGINAL_PUBLIC_REPO_URL>

@CaywoodR
Copy link
Copy Markdown
Author

CaywoodR commented Apr 27, 2026

I input

git remote add upstream https://github.com/csrc-sdsu/mole.git

I did not see anything happen, but I input it again to get:

error: remote upstream already exists.

So, the upstream remote is now there.

@valeriabarra
Copy link
Copy Markdown
Collaborator

valeriabarra commented Apr 27, 2026

I input

git remote add upstream https://github.com/csrc-sdsu/mole.git

I did not see anything happen, but I input it again to get:

error: remote upstream already exists.

So, the upstream remote is now there.

You can verify by running

git remote -v

(the -v stands for verbose).

If you have more questions on how to update your branch, it's probably easier if you could stop by office hours and I can assist. Thank you

@CaywoodR
Copy link
Copy Markdown
Author

run

git remote -v

the output is:

origin [email protected]:CaywoodR/mole.git (fetch)
origin [email protected]:CaywoodR/mole.git (push)
upstream https://github.com/csrc-sdsu/mole.git (fetch)
upstream https://github.com/csrc-sdsu/mole.git (push)

Sounds good. Thanks for the assistance!

@CaywoodR CaywoodR marked this pull request as ready for review May 5, 2026 03:03
Comment thread doc/sphinx/source/examples/Hyperbolic/1D/Hyperbolic1D.md Outdated
@valeriabarra
Copy link
Copy Markdown
Collaborator

Hi @CaywoodR , you need to update this branch with main again. Then, please also reduce the number of commits to a minimum number of significant commits that reflect your work (even just one if you'd like). You can use the interactive rebase, with git rebase -i for that and then force-push.

Then, I am not sure if @jbrzensk has any other comments. It looks good for me. Thank you

@valeriabarra
Copy link
Copy Markdown
Collaborator

Can you please also edit the title of the PR to reflect that this is not a draft anymore?

@CaywoodR CaywoodR changed the title Matlab to cpp translations. Hyperbolic1D and Parabolic2D draft Matlab to cpp translations. Hyperbolic1D, Parabolic2D, and Helmholtz2D_wifi May 12, 2026
@CaywoodR
Copy link
Copy Markdown
Author

Hi @valeriabarra, when I use

git rebase -i

I see this. I do not see any commits.

noop

@CaywoodR CaywoodR force-pushed the matlab_to_python branch from 8ee4b9e to 796803f Compare May 13, 2026 04:34
@CaywoodR
Copy link
Copy Markdown
Author

CaywoodR commented May 13, 2026

Hi @CaywoodR , you need to update this branch with main again. Then, please also reduce the number of commits to a minimum number of significant commits that reflect your work (even just one if you'd like). You can use the interactive rebase, with git rebase -i for that and then force-push.

Then, I am not sure if @jbrzensk has any other comments. It looks good for me. Thank you

Hi @valeriabarra, I tried rebasing, but I am having issues once I go to force-push. I included images of the following sequences I see after saving the file and then prompting the force.

asdasd dasdaada

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.

Matlab to C++ Example Contribution

3 participants