Hello Everyone,
I have created a merged geometry by using subdivided_hyper_cube and two hyper_ball functions. See below
<20.png>
Now I want to apply a Spherical Manifold in place of the default manifold. I have tried the following code but it is not working for both hyper_ball simultaneously.
std::vector< unsigned int > repetitions(4);
GridGenerator::subdivided_hyper_cube(tria_1, 4, -1., 1.);
std::set<typename Triangulation<2>::active_cell_iterator> cells_to_remove;
for (auto &cell : tria_1.active_cell_iterators())
{
if ((cell->center()[0] == -0.25) && (cell->center()[1] == -0.25))
{
cells_to_remove.insert(cell);
}
if ((cell->center()[0] == 0.25) && (cell->center()[1] == 0.25))
{
cells_to_remove.insert(cell);
}
}
GridGenerator::create_triangulation_with_removed_cells(tria_1, cells_to_remove,tria_2);
Point<2> center (-.25,-.25);
GridGenerator::hyper_ball (tria_3, center, 0.354);
GridGenerator::merge_triangulations (tria_2, tria_3,triangulation);
Point<2> center_1 (.25,.25);
GridGenerator::hyper_ball (tria_4, center_1, 0.354);
GridGenerator::merge_triangulations (triangulation, tria_4, tri);
//tri.reset_all_manifolds();
//tri.set_all_manifold_ids(0);
SphericalManifold<2> manifold_neg(center);
SphericalManifold<2> manifold_pos(center_1);
tri.set_all_manifold_ids_on_boundary(0);
tri.set_manifold (0, manifold_neg);
tri.set_all_manifold_ids_on_boundary(0);
tri.set_manifold (0, manifold_pos);
tri.refine_global(3);
The output of the code is:
I want to apply a spherical manifold for both hyper_balls. Can you please suggest to me how I can do this?
Thanks and Regard,
Deepika
**************************************************************************
This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken.
************************************************************************************************
--
The deal.II project is located at
http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/CAKTdrpps7Cs2Nbt8YeNa%3Dw1RZL8qX6msXVvOxorY-2CRPEXGDg%40mail.gmail.com.