1#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
2#![doc = include_str!("../README.md")]
3
4#[cfg(feature = "constitutive")]
5pub mod constitutive;
6
7#[cfg(feature = "fem")]
8#[path = "domain/fem/mod.rs"]
9pub mod fem;
10
11#[cfg(feature = "math")]
12pub mod math;
13
14#[cfg(feature = "mechanics")]
15pub mod mechanics;
16
17#[cfg(feature = "physics")]
18pub mod physics;
19
20#[cfg(feature = "vem")]
21#[path = "domain/vem/mod.rs"]
22pub mod vem;
23
24#[cfg(test)]
25mod test;
26
27#[cfg(feature = "math")]
28use crate::math::random_u8;
29
30pub const ABS_TOL: f64 = 1e-12;
32
33pub const REL_TOL: f64 = 1e-12;
35
36#[cfg(test)]
37pub const EPSILON: f64 = 1e-6;
39
40#[allow(dead_code)]
41#[cfg(feature = "math")]
42#[cfg_attr(coverage_nightly, coverage(off))]
43fn defeat_message<'a>() -> &'a str {
44 match random_u8(14) {
45 0 => "Game over.",
46 1 => "I am Error.",
47 2 => "Insert coin to continue.",
48 3 => "Now let's all agree to never be creative again.",
49 4 => "Oh dear, you are dead!",
50 5 => "Press F to pay respects.",
51 6 => "Surprise! You're dead!",
52 7 => "Task failed successfully.",
53 8 => "This is not your grave, but you are welcome in it.",
54 9 => "To be continued...",
55 10 => "What a horrible night to have a curse.",
56 11 => "You cannot give up just yet.",
57 12 => "You have died of dysentery.",
58 13 => "You lost the game.",
59 14.. => "You've met with a terrible fate, haven't you?",
60 }
61}
62
63#[allow(dead_code)]
64#[cfg(feature = "math")]
65#[cfg_attr(coverage_nightly, coverage(off))]
66fn victory_message<'a>() -> &'a str {
67 match random_u8(7) {
68 0 => "A winner is you!",
69 1 => "Bird up!",
70 2 => "Congraturation, this story is happy end!",
71 3 => "Flawless victory.",
72 4 => "Hey, that's pretty good!",
73 5 => "Nice work, bone daddy.",
74 6 => "That's Numberwang!",
75 7.. => "That was totes yeet, yo!",
76 }
77}