Daniel,
In that code, I had a half circle in the right part of the coordinate axis. 
By writing v(1) <=0, I wanted to choose the part with negative y components 
from the geometry, however, The attached file has been obtained. I really 
do not know how I should modify the source you sent to me because of the 
fact that my knowledge about deal ii is rudimentary now and I am trying 
hard to learn this open source library. It would be very kind of you if you 
help me about this software.

Best,
Benhour



On Saturday, July 16, 2016 at 3:44:42 AM UTC-5, Daniel Arndt wrote:
>
> Benhour,
>
> It would be helpful if you tell us what the problem with the newly created 
> problem is.
> Looking at the implementation of GridGenerator::half_hyper_ball [1],
> you can observe that there are cells which have vertices both with 
> positive and negative
> y-components. This will likely lead to undesired results just deleting 
> cells.
>
> It might still be easiest to modify [1] yourself for your purpose.
>
> Best,
> Daniel
>
> [1] 
> https://www.dealii.org/8.4.0/doxygen/deal.II/grid__generator_8cc_source.html
>
>
>
> Am Samstag, 16. Juli 2016 04:10:33 UTC+2 schrieb benhour....@gmail.com:
>>
>> 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, benhour....@gmail.com 
>>> 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 dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: grid-3.eps
Description: PostScript document

Reply via email to