Hi, 
I think Step 85 does this by using a (global) level set function. 

Otherwise, you can use RTrees of bounding boxes 
with 
https://www.dealii.org/developer/doxygen/deal.II/classGridTools_1_1Cache.html#aca2782d6e93b5a0033c046b57904c67f
 
combined with boost::geometry::index to identify intersections, in case 
where you don't want to use a level-set and you just work with the mesh 
itself. The following snippet does this:

*namespace bgi = boost::geometry::index;*
*const auto &tree =*
*space_cache -> get_locally_owned_cell_bounding_boxes_rtree();*
* // Bounding boxes of the embedded grid*
*const auto &embedded_tree = embedded_cache -> 
get_cell_bounding_boxes_rtree();*

*for (const auto &[embedded_box, embedded_cell] : embedded_tree)*
* {*
*for (const auto &[space_box, space_cell] :*
* tree | bgi::adaptors::queried(bgi::intersects(embedded_box)))*
* {*
* // do what you need here*
* }*
* }*

Best,
Marco

Il giorno giovedì 15 dicembre 2022 alle 05:55:51 UTC+1 Praveen C ha scritto:

> Dear all
>
> I am looking for available methods to find cells cut by some given curve.
>
> I found such a case in step-60 and made this example
>
> https://bitbucket.org/cpraveen/deal_ii/src/master/embedded_curve/
>
> As shown in the figures, some cells are not identified though they are cut 
> by the curve. This is a limitation which is already explained in step-60.
>
> Are there other methods available in deal.II for this purpose ? Or do you 
> know of any external library than can be used for this, and which can be 
> called from a deal.II code ?
>
> I am assuming that the curve is given as piecewise polynomials. I only 
> need 2-D case.
>
> Thanks
> praveen

-- 
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/a909081d-b3d5-48bc-86a8-dacf2ed049d9n%40googlegroups.com.

Reply via email to