-
Notifications
You must be signed in to change notification settings - Fork 65
Burgers1D example in C++ #73
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
Burgers1D example in C++ #73
Conversation
|
The sizes of the vectors and matrix consider 302 points and not 301. Please, run the MATLAB version to check the correct sizes of each array |
|
@pritkc All changes done |
|
Please, even though that is not in the comments of the MATLAB codes, indicate in the top comments of each of your codes which equation is being solved, its time (if required) and space domains and its initial (if required) and boundary conditions. |
|
@mdumett Equation and conditions added professor. |
|
@pritkc Hello , I had a request that if its possible can I get review of my code for the equations because I made the changes suggested. Regards |
You may have to reach out to @mdumett. In the meantime, you may retire your makefile and rebase your branch as we have moved to the new CMake system. |
|
@pritkc @mdumett I have retired my old makefile and also tested my code on new Make system based in Ubuntu as well as WSL, @JananiPSrinivasan has verified the working. |
|
Use constexpr in the Burgers example. |
jbrzensk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to split this into 2 pull requests, the POisson2D seems good to go with the name change. Burgers1D needs more work.
|
@jbrzensk @mdumett ll requested changes have been completed. |
|
@arrowguy234: Burgers1D.m has a plot instead of examples values. Use gnuplot for plotting every 5 iterations. In addition, the matlab/octave code prints the value of the area under the curve using the trapezoidal rule which is missing in the C++ code. Implementing that function in C++ is not difficult. See https://en.wikipedia.org/wiki/Trapezoidal_rule . You can add that function in utils.cpp and utils.h |
|
@mdumett Thanks a lot for your input, I have implemented the trapezoid rule in Utils file as well as included it in my Burgers1D code and along with that, the output is being printed in a graph plot like matlab, I'm happy to take on any additional suggestions or structural improvements you might have. |
mdumett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing all comments
|
Please, reuse D and that should be it. |
This pull request corresponds to issue #70