1use section_properties::ParametricSection;
2use section_properties::fea::Tri6;
3use section_properties::geometry::Point;
4
5fn main() {
6 let points = [
7 Point::new(0.0, 0.0), Point::new(1.0, 0.0), Point::new(0.0, 1.0), Point::new(0.5, 0.0), Point::new(0.5, 0.5), Point::new(0.0, 0.5), ];
14
15 let tri6 = Tri6::from_points(0, points, [0, 1, 2, 3, 4, 5], 1.0, 1.0, 1.0).unwrap();
16
17 let (k_el, f_el, c_el) = tri6.torsion_properties();
18
19 println!("=== Tri6 Element Matrices on Unit Triangle (C_e with 7-point rule) ===");
20 println!("\nC_e (6x1):");
21 for i in 0..6 {
22 println!(" C[{}] = {:.10}", i, c_el[i]);
23 }
24 let c_sum: f64 = c_el.iter().sum();
25 println!("Sum C_e = {:.10} (expected 0.5)", c_sum);
26
27 println!(
31 "\nExpected: corner = {:.10}, mid = {:.10}",
32 0.5 / 12.0,
33 0.5 / 6.0
34 );
35}