semiflow 0.15.0-beta

no_std Rust PDE solver: evolution equations via Chernoff approximation of operator semigroups (heat, diffusion, Schrodinger)
Documentation
// AUTO-GENERATED by scripts/generate_chebyshev_nodes.py -- DO NOT EDIT
// Nodes: cos(k*pi/M); Weights: (-1)^k * delta_k (Berrut-Trefethen 2004)

// cos(kπ/64) table: 7.071...e-1 = FRAC_1_SQRT_2, kept as literal for table consistency
#[allow(clippy::approx_constant)]
pub(crate) const CHEB_NODES_64: [f64; 65] = [
    1.0,
    0.998_795_456_205_172_4,
    0.995_184_726_672_196_9,
    0.989_176_509_964_781,
    0.980_785_280_403_230_4,
    0.970_031_253_194_544,
    0.956_940_335_732_208_8,
    0.941_544_065_183_020_8,
    0.923_879_532_511_286_7,
    0.903_989_293_123_443_3,
    0.881_921_264_348_355,
    0.857_728_610_000_272_1,
    0.831_469_612_302_545_2,
    0.803_207_531_480_644_9,
    0.773_010_453_362_737,
    0.740_951_125_354_959_1,
    0.707_106_781_186_547_6,
    0.671_558_954_847_018_3,
    0.634_393_284_163_645_5,
    0.595_699_304_492_433_5,
    0.555_570_233_019_602_3,
    0.514_102_744_193_221_7,
    0.471_396_736_825_997_8,
    0.427_555_093_430_282_2,
    0.382_683_432_365_089_84,
    0.336_889_853_392_220_05,
    0.290_284_677_254_462_33,
    0.242_980_179_903_263_98,
    0.195_090_322_016_128_33,
    0.146_730_474_455_361_75,
    0.098_017_140_329_560_77,
    0.049_067_674_327_418_126,
    6.123_233_995_736_766e-17,
    -0.049_067_674_327_418_01,
    -0.098_017_140_329_560_65,
    -0.146_730_474_455_361_64,
    -0.195_090_322_016_128_2,
    -0.242_980_179_903_263_87,
    -0.290_284_677_254_462_16,
    -0.336_889_853_392_219_94,
    -0.382_683_432_365_089_7,
    -0.427_555_093_430_281_86,
    -0.471_396_736_825_997_7,
    -0.514_102_744_193_221_7,
    -0.555_570_233_019_602,
    -0.595_699_304_492_433_4,
    -0.634_393_284_163_645_4,
    -0.671_558_954_847_018_4,
    -0.707_106_781_186_547_5,
    -0.740_951_125_354_958_9,
    -0.773_010_453_362_737,
    -0.803_207_531_480_644_8,
    -0.831_469_612_302_545_3,
    -0.857_728_610_000_272,
    -0.881_921_264_348_354_9,
    -0.903_989_293_123_443_3,
    -0.923_879_532_511_286_7,
    -0.941_544_065_183_020_7,
    -0.956_940_335_732_208_8,
    -0.970_031_253_194_544,
    -0.980_785_280_403_230_4,
    -0.989_176_509_964_781,
    -0.995_184_726_672_196_8,
    -0.998_795_456_205_172_4,
    -1.0
];

pub(crate) const CHEB_WEIGHTS_64: [f64; 65] = [
    0.5, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0,
    1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0,
    1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0,
    1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0,
    0.5
];

// cos(kπ/128) table: 7.071...e-1 = FRAC_1_SQRT_2, kept as literal for table consistency
#[allow(clippy::approx_constant)]
pub(crate) const CHEB_NODES_128: [f64; 129] = [
    1.0,
    0.999_698_818_696_204_2,
    0.998_795_456_205_172_4,
    0.997_290_456_678_690_2,
    0.995_184_726_672_196_9,
    0.992_479_534_598_71,
    0.989_176_509_964_781,
    0.985_277_642_388_941_2,
    0.980_785_280_403_230_4,
    0.975_702_130_038_528_6,
    0.970_031_253_194_544,
    0.963_776_065_795_439_8,
    0.956_940_335_732_208_8,
    0.949_528_180_593_036_7,
    0.941_544_065_183_020_8,
    0.932_992_798_834_739,
    0.923_879_532_511_286_7,
    0.914_209_755_703_530_7,
    0.903_989_293_123_443_3,
    0.893_224_301_195_515_3,
    0.881_921_264_348_355,
    0.870_086_991_108_711_5,
    0.857_728_610_000_272_1,
    0.844_853_565_249_707_1,
    0.831_469_612_302_545_2,
    0.817_584_813_151_583_7,
    0.803_207_531_480_644_9,
    0.788_346_427_626_606_3,
    0.773_010_453_362_737,
    0.757_208_846_506_484_6,
    0.740_951_125_354_959_1,
    0.724_247_082_951_467,
    0.707_106_781_186_547_6,
    0.689_540_544_737_066_9,
    0.671_558_954_847_018_3,
    0.653_172_842_953_776_8,
    0.634_393_284_163_645_5,
    0.615_231_590_580_626_8,
    0.595_699_304_492_433_5,
    0.575_808_191_417_845_3,
    0.555_570_233_019_602_3,
    0.534_997_619_887_097_3,
    0.514_102_744_193_221_7,
    0.492_898_192_229_784_1,
    0.471_396_736_825_997_8,
    0.449_611_329_654_606_6,
    0.427_555_093_430_282_2,
    0.405_241_314_004_989_86,
    0.382_683_432_365_089_84,
    0.359_895_036_534_988_3,
    0.336_889_853_392_220_05,
    0.313_681_740_398_891_6,
    0.290_284_677_254_462_33,
    0.266_712_757_474_898_4,
    0.242_980_179_903_263_98,
    0.219_101_240_156_869_77,
    0.195_090_322_016_128_33,
    0.170_961_888_760_301_36,
    0.146_730_474_455_361_75,
    0.122_410_675_199_216_28,
    0.098_017_140_329_560_77,
    0.073_564_563_599_667_45,
    0.049_067_674_327_418_126,
    0.024_541_228_522_912_264,
    6.123_233_995_736_766e-17,
    -0.024_541_228_522_912_142,
    -0.049_067_674_327_418_01,
    -0.073_564_563_599_667_33,
    -0.098_017_140_329_560_65,
    -0.122_410_675_199_216_15,
    -0.146_730_474_455_361_64,
    -0.170_961_888_760_301_24,
    -0.195_090_322_016_128_2,
    -0.219_101_240_156_869_66,
    -0.242_980_179_903_263_87,
    -0.266_712_757_474_898_3,
    -0.290_284_677_254_462_16,
    -0.313_681_740_398_891_4,
    -0.336_889_853_392_219_94,
    -0.359_895_036_534_988_17,
    -0.382_683_432_365_089_7,
    -0.405_241_314_004_989_75,
    -0.427_555_093_430_281_86,
    -0.449_611_329_654_606_7,
    -0.471_396_736_825_997_7,
    -0.492_898_192_229_784,
    -0.514_102_744_193_221_7,
    -0.534_997_619_887_097,
    -0.555_570_233_019_602,
    -0.575_808_191_417_845_3,
    -0.595_699_304_492_433_4,
    -0.615_231_590_580_626_7,
    -0.634_393_284_163_645_4,
    -0.653_172_842_953_776_5,
    -0.671_558_954_847_018_4,
    -0.689_540_544_737_066_9,
    -0.707_106_781_186_547_5,
    -0.724_247_082_951_466_8,
    -0.740_951_125_354_958_9,
    -0.757_208_846_506_484_6,
    -0.773_010_453_362_737,
    -0.788_346_427_626_606_2,
    -0.803_207_531_480_644_8,
    -0.817_584_813_151_583_6,
    -0.831_469_612_302_545_3,
    -0.844_853_565_249_707_1,
    -0.857_728_610_000_272,
    -0.870_086_991_108_711_3,
    -0.881_921_264_348_354_9,
    -0.893_224_301_195_515_2,
    -0.903_989_293_123_443_3,
    -0.914_209_755_703_530_7,
    -0.923_879_532_511_286_7,
    -0.932_992_798_834_738_8,
    -0.941_544_065_183_020_7,
    -0.949_528_180_593_036_7,
    -0.956_940_335_732_208_8,
    -0.963_776_065_795_439_8,
    -0.970_031_253_194_544,
    -0.975_702_130_038_528_5,
    -0.980_785_280_403_230_4,
    -0.985_277_642_388_941_2,
    -0.989_176_509_964_781,
    -0.992_479_534_598_71,
    -0.995_184_726_672_196_8,
    -0.997_290_456_678_690_2,
    -0.998_795_456_205_172_4,
    -0.999_698_818_696_204_2,
    -1.0
];

pub(crate) const CHEB_WEIGHTS_128: [f64; 129] = [
    0.5, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0,
    1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0,
    1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0,
    1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0,
    1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0,
    1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0,
    1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0,
    1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0,
    0.5
];