# DEM in combination with other geometries

**URL:** <https://gpusph.discourse.group/t/dem-in-combination-with-other-geometries/99>\
**Category:** Applications\
**Created:** [January 1, 2020, 3:10am UTC](https://gpusph.discourse.group/t/dem-in-combination-with-other-geometries/99 "2020-01-01T03:10:57Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![GWAVE](https://avatars.discourse-cdn.com/v4/letter/g/4af34b/32.png) [@GWAVE](https://gpusph.discourse.group/u/GWAVE)\
**Post date:** [February 4, 2020, 3:43am UTC](https://gpusph.discourse.group/t/dem-in-combination-with-other-geometries/99/5 "2020-02-04T03:43:24Z")

</div>

> [@giuseppe.bilotta](#):
>
> The DEM can work in two different ways. One ways is “geometrically”: it doesn’t get filled with particles, but you need the `ENABLE_DEM` flag for the framework. This is only supported with the LJ\_BOUNDARY model. The other way is by actually define boundary particles covering the DEM, which is done by giving it a `FT_BORDER` filltype. This should work regardless of the boundary model used (modulo bugs).

@giuseppe.bilotta Thanks for your help! One last thing on this subject…

I was following the logic presented in the “DEMExample.cu” where it appears to follow the “geometric” approach. The framework is set to “ENABLE\_DEM” and the DEM is added using “addDEM”, “addDEMFluidBox”, etc. In this case, you are correct in saying that it is only supported with the “LJ\_BOUNDARY” model. This was a “bug” that I reported because I personally don’t think the DEM concept should not be limited to a specific boundary.

That being said, I was originally working with the “DUMMY\_BOUNDARY” (no DEM) and I did notice that the boundary is a bit smoother. I would like to continue to use this boundary model, but I also require a DEM. You said above that there is another way to implement the DEM? In my experience, I get critical errors if I don’t “ENABLE\_DEM” while calling other DEM routines. Can you elaborate a bit more on how I can create the DEM using method 2 you mentioned? I know what “FT\_BORDER” does, but I don’t know what routine to pass this to. I should reiterate that my DEM can not be built from primitives, hence why I’m trying to use this functionality. If I can get the DEM to work with the “DUMMY\_BOUNDARY”, it would be great.

---

_[View the full topic](https://gpusph.discourse.group/t/dem-in-combination-with-other-geometries/99)._
