Dear J-P,
Thanks for your response. I used the code for creating a quarter of a 
circle that comes as follow:

Triangulation<2> triangulation;
const Point<2> center;
const double radius = 1.;
GridGenerator::half_hyper_ball(triangulation, center, radius);

Triangulation<2>::active_cell_iterator
cell = triangulation.begin_active(),
endc = triangulation.end();
std::set<Triangulation<2>::active_cell_iterator> remove;
// Triangulation<2>::active_cell_iterator cell;
for (cell=triangulation.begin_active(); cell!=triangulation.end(); ++cell)
{
Point<2> v=cell->center();
// If it is in the bottom part of the geometry, remove it!!!!
if (v(1) <= 0)
remove.insert(cell);
}
 // remove the marked cells
 GridGenerator::create_triangulation_with_removed_cells(triangulation, 
removal, triangulation);

Unfortunately, It does not create the right geometry. I do really 
appreciate your kindness if you let me know which parts of this code go 
wrong. Looking forward to hearing from you.

Best,
Benhour

On Wednesday, July 13, 2016 at 6:15:04 AM UTC-5, Jean-Paul Pelteret wrote:
>
> Dear Benhour,
>
> You could use one of the GridGenerator options to create a half circle, 
> and then use GridGenerator::create_triangulation_with_removed_cells 
> <https://www.dealii.org/8.4.1/doxygen/deal.II/namespaceGridGenerator.html#ada140ece81bf38a23e738e0e57f89e97>
>  to 
> remove the excess cells that yo udon't want.
>
> Regards,
> J-P
>
> On Wednesday, July 13, 2016 at 3:40:02 AM UTC+2, [email protected] 
> <javascript:> wrote:
>>
>> Dear All,
>> I want to create a quarter of a circle in deal ii. In  this case, I could 
>> create half of a circle with half_hyper_ball. I have tried 
>> GridTools::delete_unused_vertices or GridTools::transformation to remove or 
>> shift the same vertices to eliminate half of the circle. It would be very 
>> kind of you if you let me know how to define this geometry in Dealii. It 
>> should be noted that I also used quarter_hyper_shell and put inner radius 
>> to zero but it did not work for this case.
>>
>> Best,
>> Benhour
>>
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to