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
Eccentric hyper shell #8526
Eccentric hyper shell #8526
Conversation
Nice! Do you have a picture? |
* | ||
* A SphericalManifold is attached to the outer boundary with an id of 1 while | ||
* another SphericalManifold is attached to the inner boundary with an id of | ||
* 0. A TransfiniteInterpolationManifold is attached to all other cells and |
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.
✔️
source/grid/grid_generator.cc
Outdated
// the original hyper_shell function assigns the same manifold id | ||
// to all cells and faces. Set all manifolds ids to a different | ||
// value (2), then use boundary ids to assign different manifolds to | ||
// the inner (0) and outer manifolds (0). Use a transfinite manifold |
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.
Would you mind fixing the typo?
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.
Nice work. Would you please also add pictures of the grid in 2D or 3D? You can upload them to GitHub and the principal developers can take it from there.
@@ -3004,6 +3003,58 @@ namespace GridGenerator | |||
tria.set_manifold(0, SphericalManifold<2>(center)); | |||
} | |||
|
|||
template <int dim> |
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.
Please use three blank lines between definitions.
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.
This should also be resolved in the last commit. Sorry, I don't know how show the update.
source/grid/grid_generator.cc
Outdated
std::set<Point<dim> *> vertices_to_move; | ||
|
||
for (const auto &cell : tria.active_cell_iterators()) | ||
for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f) |
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.
You could use active_face_iterators
instead to combine these two loops.
* in radial direction to form 6 cells), 12 for the rhombic dodecahedron, | ||
* and 96. This choice dates from an older version of deal.II before the | ||
* Manifold classes were implemented: today all three choices are roughly | ||
* equivalent (after performing global refinement, of course). |
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.
I think it would be clearer (and future-compatible) to instead write that n_cells
has the same meaning in this function as it does in hyper_shell
.
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.
This comment and the comment above should be resolved by my last commit, but I don't know how to bring the updated versions of the .cc and .h files in here!
f1a8438
to
2cae2e8
Compare
@@ -146,7 +146,7 @@ namespace GridGenerator | |||
// data, we do this only based on | |||
// topology. | |||
|
|||
// For the mesh based on cube, | |||
// For the mesh based on cube, |
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.
ha, nice catch!
|
||
template <int dim> | ||
void | ||
eccentric_hyper_shell(Triangulation<dim> &tria, |
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.
I think you actually copied the same function a second time here. If correct, you might want to remove it!
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.
Indeed! The second one was actually the correct one.
Do I need to add my new version of the file here if I already pushed a new commit with it on my fork?
I see that the pictures are in the repository. Would you please amend the documentation of the function to link to those pictures? We do this for most of the GridGenerator functions. Feel free to ask if you need some help in doing this! |
Nice work! /rebuild |
@tamiko -- would you mind lifting your block? |
I might need help indeed, because I'm worried I screwed up something with GitHub! I am stuck. git status tells me that "Your branch is ahead of 'origin/eccentric_hyper_shell' by 43 commits." and I have also seen my name involved in pull requests that I have nothing to do with. So before I can make the change, I have to figure out what I did wrong in git! Hilfe! :) Besides, @tamiko pointed out that my figures were quite heavy with respect to the other ones in the documentation, so I made some new, less good looking ones. I attach them below. I have removed my old ones from the documentation, but I need to sort my git situation before I can push these new ones! Thanks a lot! |
Its me, not Matthias. We need to do two things before we merge:
* @image html eccentric_hyper_shell_2d.pg or whatever we called it. |
Add an eccentric hyper shell geometry that is formed by two spheres with different center points.
Add an eccentric hyper shell geometry that is formed by two spheres with different center points.
Co-Authored-By: David Wells <drwells@email.unc.edu>
d1d7a4b
to
4f6439b
Compare
@drwells I have rebased the pull request. Please finish your review and merge :-) |
Let me take a look at the generated doxygen. |
No wait, don't merge ! See my comments above. I have to sort out my GitHub stuff before I can add the line you requested :-) |
@melaniegerault take a look at the branch history. @tamiko cleaned things up very nicely for us. |
We still need links to the pictures in the function documentation. |
@melaniegerault Locally you will have to do something like
|
@drwells @melaniegerault What about we merge and simply fix the link to the pictures in a follow-up PR? |
@drwells Alternatively, feel free to simply push a commit with your intended changes to this PR. I am happy to review and merge afterwards. |
I have the changes made locally, I'm just not sure how to push them properly. Trying now. |
@tamiko has a good point: the easiest way forward is to merge this PR as-is and handle images in a followup PR. |
@melaniegerault Would you mind holding on to your changes for the moment and then putting them on another branch in a moment once this is merged? |
I pushed them a few minutes ago |
Merged. @drwells @melaniegerault Let's add a reference to the pictures in the documentation of the function in a separate PR. |
@melaniegerault If you pushed changes recently they were not on this branch, otherwise we would see it somewhere in this PR. Do you know where they ended up? |
nope, no idea! I was just looking for them. I think I might have erased them with the reset. How do I push them again if this is closed? |
@melaniegerault We will have to set up a second PR with just those changes. |
@drwells okay sounds good. Do you want to take the risk of letting me do that? :-) |
Its up to you. Its not my intent to torture you with GitHub stuff; I would be happy to apply the patch for you. If you are confident that you can set up another PR with just this change then, by all means, go for it! |
That's the only way I'll learn! 😁 |
Do you want me to push my low res images to the doc folder or would you prefer to do that yourself? |
This PR already added the pictures: all we need to add now are the links to them from the documentation. |
Right, but as you can see, those are the heavy (~200 kb) figures, whereas @tamiko suggested I make lighter ones. |
I am not too worried about the disk size (we already have a bunch of images that large), but they will look huge in the documentation unless we shrink them first. |
This is an addition to GridGenerator to make an eccentric hyper shell, where the centers of the two circles (2D) or spheres (3D) are shifted.