brainderp

This commit is contained in:
Magnus Ulimoen
2020-06-15 21:21:00 +02:00
parent 1e84e2ddf0
commit 459581a3c9
7 changed files with 47 additions and 89 deletions

View File

@@ -51,7 +51,7 @@ impl SbpOperator1d for SBP4 {
}
#[cfg(feature = "sparse")]
fn h_matrix(&self, n: usize) -> sprs::CsMat<Float> {
super::h_matrix(Self::DIAG, n, self.is_h2())
super::h_matrix(Self::HBLOCK, n, self.is_h2())
}
}

View File

@@ -55,7 +55,7 @@ impl SbpOperator1d for SBP8 {
}
#[cfg(feature = "sparse")]
fn h_matrix(&self, n: usize) -> sprs::CsMat<Float> {
super::h_matrix(Self::DIAG, n, self.is_h2())
super::h_matrix(Self::HBLOCK, n, self.is_h2())
}
}

View File

@@ -164,7 +164,7 @@ diff_simd_col_7_47!(diss_simd_col, Upwind4::DISS_BLOCK, Upwind4::DISS_DIAG, true
impl Upwind4 {
#[rustfmt::skip]
const HBLOCK: &'static [Float] = &[
pub const HBLOCK: &'static [Float] = &[
49.0 / 144.0, 61.0 / 48.0, 41.0 / 48.0, 149.0 / 144.0
];
#[rustfmt::skip]
@@ -219,7 +219,7 @@ impl SbpOperator1d for Upwind4 {
}
#[cfg(feature = "sparse")]
fn h_matrix(&self, n: usize) -> sprs::CsMat<Float> {
super::h_matrix(Self::DIAG, n, self.is_h2())
super::h_matrix(Self::HBLOCK, n, self.is_h2())
}
}

View File

@@ -69,7 +69,7 @@ impl SbpOperator1d for Upwind4h2 {
}
#[cfg(feature = "sparse")]
fn h_matrix(&self, n: usize) -> sprs::CsMat<Float> {
super::h_matrix(Self::DIAG, n, self.is_h2())
super::h_matrix(Self::HBLOCK, n, self.is_h2())
}
}

View File

@@ -74,7 +74,7 @@ impl SbpOperator1d for Upwind9 {
}
#[cfg(feature = "sparse")]
fn h_matrix(&self, n: usize) -> sprs::CsMat<Float> {
super::h_matrix(Self::DIAG, n, self.is_h2())
super::h_matrix(Self::HBLOCK, n, self.is_h2())
}
}

View File

@@ -77,7 +77,7 @@ impl SbpOperator1d for Upwind9h2 {
}
#[cfg(feature = "sparse")]
fn h_matrix(&self, n: usize) -> sprs::CsMat<Float> {
super::h_matrix(Self::DIAG, n, self.is_h2())
super::h_matrix(Self::HBLOCK, n, self.is_h2())
}
}