# Multiple region sources in one simulation

**URL:** <https://fluka-forum.web.cern.ch/t/multiple-region-sources-in-one-simulation/2430>\
**Category:** Advanced Features and User Routines\
**Created:** [9 November 2021 04:30 UTC](https://fluka-forum.web.cern.ch/t/multiple-region-sources-in-one-simulation/2430 "2021-11-09T04:30:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![horvathd](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/horvathd/32/10584_2.png) [@horvathd](https://fluka-forum.web.cern.ch/u/horvathd)\
**Post date:** [9 November 2021 08:13 UTC](https://fluka-forum.web.cern.ch/t/multiple-region-sources-in-one-simulation/2430/2 "2021-11-09T08:13:19Z")

</div>

Dear ArghyaC,

no this would not work.

The variables `coordinate_x`, `coordinate_y` and `coordinate_z` should not be changed. The script passes the values stored in these variables to FLUKA.

Also the second calling the `regionsource` subroutine will only overwrite the first one.

You should use a random number and an `if ... else` structure to select one of the regions, similarly to my previous post: [Multiple complex source in Fluka - #2 by horvathd](https://fluka-forum.web.cern.ch/t/multiple-complex-source-in-fluka/1241/2)

Cheers,  
David

---

_[View the full topic](https://fluka-forum.web.cern.ch/t/multiple-region-sources-in-one-simulation/2430)._
