first untested sparse implementation
This commit is contained in:
1 parent
9261f1b239
commit
4f772b8dc5
6 files changed
+802
-40
No files matched your search
@@ -207,6 +207,20 @@ impl SbpOperator1d for Upwind4 {
|
||||
fn h(&self) -> &'static [Float] {
|
||||
Self::HBLOCK
|
||||
}
|
||||
#[cfg(feature = "sparse")]
|
||||
fn diff_matrix(&self, n: usize) -> sprs::CsMat<Float> {
|
||||
super::sparse_from_block(
|
||||
Self::BLOCK,
|
||||
Self::DIAG,
|
||||
super::Symmetry::AntiSymmetric,
|
||||
super::OperatorType::Normal,
|
||||
n,
|
||||
)
|
||||
}
|
||||
#[cfg(feature = "sparse")]
|
||||
fn h_matrix(&self, n: usize) -> sprs::CsMat<Float> {
|
||||
super::h_matrix(Self::DIAG, n, self.is_h2())
|
||||
}
|
||||
}
|
||||
|
||||
impl<SBP: SbpOperator1d> SbpOperator2d for (&SBP, &Upwind4) {
|
||||
|
||||
Reference in new issue
Block a user