add dyn cast to sbp
This commit is contained in:
@@ -413,6 +413,10 @@ impl UpwindOperator1d for Upwind4 {
|
||||
fut,
|
||||
)
|
||||
}
|
||||
|
||||
fn as_sbp(&self) -> &dyn SbpOperator1d {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl<SBP: UpwindOperator1d> UpwindOperator2d for (&Upwind4, &SBP) {
|
||||
|
||||
@@ -92,4 +92,8 @@ impl UpwindOperator1d for Upwind4h2 {
|
||||
fut,
|
||||
)
|
||||
}
|
||||
|
||||
fn as_sbp(&self) -> &dyn SbpOperator1d {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,10 @@ impl UpwindOperator1d for Upwind9 {
|
||||
fut,
|
||||
)
|
||||
}
|
||||
|
||||
fn as_sbp(&self) -> &dyn SbpOperator1d {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -100,4 +100,7 @@ impl UpwindOperator1d for Upwind9h2 {
|
||||
fut,
|
||||
)
|
||||
}
|
||||
fn as_sbp(&self) -> &dyn SbpOperator1d {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user