Corbin,

if you have a maximal range for either of the two material ranges you could
just compute a single material ID by
material_id   = material_id1 * max_material_id2 + material_id2
material_id2 = material_id % max_material_id2
material_id1 = material_id / max_material_id2

Best,
Daniel

Am So., 7. Feb. 2021 um 17:23 Uhr schrieb Corbin Foucart <
[email protected]>:

> Hello all,
>
> I've read the documentation on material ID and it's not clear to me if
> there's a way to define more than one material ID. This could be helpful
> when wanting to isolate elements that correspond to the same material, but
> also when looking to isolate elements of different materials that might
> exist in a particular "layer" of the domain.
>
> I can see three ways to define multiple IDs per each element:
>
>    1. Define two identical meshes and set the material IDs differently on
>    each. This seems suboptimal because I don't really want to use up the extra
>    memory
>    2. Define functions that re-label the material IDs based on the
>    current task at hand, at the expense of extra computation and logic
>    3. Define an external vector of structs that contain the different
>    element IDs by cell, but then it's unclear how to filter elements by
>    MaterialIDEqualTo() without first relabeling as in (2)
>
> Is there a standard way to do this that I'm missing? Any advice is much
> appreciated!
>
> Best,
> Corbin
>
> --
> 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/a66dcb53-8a6b-46ce-8c29-90067829a0a3n%40googlegroups.com
> <https://groups.google.com/d/msgid/dealii/a66dcb53-8a6b-46ce-8c29-90067829a0a3n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAOYDWb%2B_k%3DyZ%2BOuEp55VxxzjFRscq1U3QUC5qKSn2RRkd6oATQ%40mail.gmail.com.

Reply via email to