first untested sparse implementation
This commit is contained in:
@@ -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