fips_md/codegen/analysis/
barrier.rs1use std::collections::HashSet;
4
5use slotmap::{DefaultKey};
6
7use crate::runtime::{InteractionID, InteractionQuantityID, ParticleID};
8
9pub type BarrierID = DefaultKey;
11
12#[derive(Clone)]
15pub struct Barrier {
16 pub affected_particles: HashSet<ParticleID>,
18 pub kind: BarrierKind
20}
21
22impl Barrier {
23 pub(crate) fn new(affected_particles: HashSet<ParticleID>, kind: BarrierKind) -> Self {
24 Self {
25 affected_particles, kind
26 }
27 }
28}
29
30#[derive(Clone)]
32pub enum BarrierKind {
33 InteractionBarrier(InteractionID, Option<InteractionQuantityID>),
35 CallBarrier(String)
37}