aeon_tensor/metric/
dims.rs1macro_rules! impl_dim {
2 ($name:ident, $N:literal) => {
3 pub mod $name {
4 use crate::{metric, metric::Space};
5 use crate::{Gen, Sym, SymSym, SymVec, Tensor, VecSym};
6
7 #[derive(Clone, Copy)]
8 pub struct Static;
9
10 impl metric::Space<$N> for Static {
11 type VecStore = <metric::Static as metric::Space<$N>>::VecStore;
12 type MatStore = <metric::Static as metric::Space<$N>>::MatStore;
13 type SymStore = <metric::Static as metric::Space<$N>>::SymStore;
14 type SymVecStore = <metric::Static as metric::Space<$N>>::SymVecStore;
15 type SymSymStore = <metric::Static as metric::Space<$N>>::SymSymStore;
16 type SymVecVecStore = <metric::Static as metric::Space<$N>>::SymVecVecStore;
17 }
18
19 pub type Metric = metric::Metric<$N, Static>;
20 pub type MetricInv = metric::MetricInv<$N, Static>;
21 pub type MetricDet = metric::MetricDet<$N, Static>;
22 pub type ChristoffelSymbol = metric::ChristoffelSymbol<$N, Static>;
23
24 pub type Vector = Tensor<$N, 1, Gen, <Static as Space<$N>>::VecStore>;
25 pub type Symmetric = Tensor<$N, 2, Sym, <Static as Space<$N>>::SymStore>;
26 pub type Matrix = Tensor<$N, 2, Gen, <Static as Space<$N>>::MatStore>;
27 pub type SymmetricDeriv = Tensor<$N, 3, SymVec, <Static as Space<$N>>::SymVecStore>;
28 pub type Connection = Tensor<$N, 3, VecSym, <Static as Space<$N>>::SymVecStore>;
29 pub type SymmetricSymmetric = Tensor<$N, 4, SymSym, <Static as Space<$N>>::SymSymStore>;
30
31 pub type ScalarC1 = metric::ScalarC1<$N, Static>;
32 pub type ScalarC2 = metric::ScalarC2<$N, Static>;
33 pub type VectorC1 = metric::VectorC1<$N, Static>;
34 pub type SymmetricC1 = metric::SymmetricC1<$N, Static>;
35 }
36 };
37}
38
39impl_dim! { d2, 2 }