sparkl2d_core/dynamics/models/
constitutive_model.rs

1use crate::prelude::{CorotatedLinearElasticity, MonaghanSphEos, NeoHookeanElasticity};
2
3bitflags::bitflags! {
4    pub struct ActiveTimestepBounds: u8 {
5        const NONE = 0;
6        const CONSTITUTIVE_MODEL_BOUND = 1 << 0;
7        const PARTICLE_VELOCITY_BOUND = 1 << 1;
8        const PARTICLE_DISPLACEMENT_BOUND = 1 << 2;
9        const DEFORMATION_GRADIENT_CHANGE_BOUND = 1 << 3;
10        const SINGLE_PARTICLE_STABILITY_BOUND = 1 << 4;
11    }
12}
13
14#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
15#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
16#[derive(Copy, Clone, Debug)]
17#[repr(C)]
18pub enum CoreConstitutiveModel {
19    CorotatedLinearElasticity(CorotatedLinearElasticity),
20    NeoHookeanElasticity(NeoHookeanElasticity),
21    EosMonaghanSph(MonaghanSphEos),
22    Custom(u32),
23}