Add the parallel flow routing code gallery example.#238
Conversation
|
@tjhei FYI |
7f45502 to
04bcf7a
Compare
|
Anyone want to take a stab at this? It would be helpful (but is necessary) for the paper I'm about to submit. |
04bcf7a to
0fe664d
Compare
|
I'll take a look at it this week |
|
@Rombur Thank you! |
Rombur
left a comment
There was a problem hiding this comment.
This looks good. I only have a minor comment. Please fix it and merge yourself
| "or set an environment variable \"DEAL_II_DIR\" that contains this path." | ||
| ) | ||
| endif() | ||
|
|
There was a problem hiding this comment.
You could check at this point that trilinos or petsc was installed. You don't no need to change the code.
| const unsigned int /*component*/) const | ||
| { | ||
| // First pull back p to longitude/latitude, expressed in degrees | ||
| const Point<2> p_long_lat(std::atan2(p[1], p[0]) * 360 / (2 * numbers::PI), |
There was a problem hiding this comment.
I know it's the same but it's strange that the formulas in the documentation use 180/pi and here you use 360/(2*pi). Can you update the program so that the code and the documentation match.
tjhei
left a comment
There was a problem hiding this comment.
Looks good. I only have a few minor comments.
| @@ -0,0 +1,39 @@ | |||
| ## | |||
| # CMake script for the step-91 tutorial program: | |||
| #elif defined(DEAL_II_WITH_TRILINOS) | ||
| using namespace LinearAlgebraTrilinos; | ||
| #else | ||
| # error DEAL_II_WITH_PETSC or DEAL_II_WITH_TRILINOS required |
There was a problem hiding this comment.
Yes, good point. I added it there. I left the #error here because that's also what we do in step-40 (from which this part was copied).
| y = 0; | ||
| for (const auto &[src, dst] : my_local_flow_routing) | ||
| { | ||
| // Solve the 'from'th equation. In the notation from |
There was a problem hiding this comment.
Yes, thank you. I had originally called these variables from and to until I realized that I can't use these names in my Python code snippets because from is a keyword. So I renamed it src and dst but forgot to rename this place.
0fe664d to
c5f391d
Compare
|
Fixed as requested! |
| find_package(deal.II 9.7.0 | ||
| HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR} | ||
| ) |
There was a problem hiding this comment.
Our CI fails the 9.6.0 check because of this requirement.
There was a problem hiding this comment.
Will do as a follow-up.
This goes along with a paper I'm about ready to submit. I'll link to the preprint from here once that's available. A PDF that shows how this program will look like when run through doxygen is
here.
AI statement: I wrote 100% of the code myself. Github Copilot wrote about 50% of the comments and the Readme.md, which I then heavily edited for language and correctness.