Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/mfem-cpp/mfem
Submodule mfem updated 1048 files
4 changes: 3 additions & 1 deletion crates/mfem-sys/examples/ex1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,12 @@ fn ConstantCoefficient_into_Coefficient(
}

fn LinearForm_as_Vector(x: &LinearForm) -> &Vector {
// LinearForm is a subclass of Vector.
unsafe { std::mem::transmute::<&LinearForm, &Vector>(x) }
}

fn LinearForm_as_Vector_mut(x: Pin<&mut LinearForm>) -> Pin<&mut Vector> {
// LinearForm is a subclass of Vector.
unsafe { std::mem::transmute::<Pin<&mut LinearForm>, Pin<&mut Vector>>(x) }
}

Expand All @@ -249,6 +251,6 @@ fn slice_mut_of_Vector(v: Pin<&mut Vector>) -> &mut [f64] {
}

fn GSSmoother_as_mut_Solver(s: Pin<&mut GSSmoother>) -> Pin<&mut Solver> {
// GSSmoother is a subclass of Solver
// GSSmoother is a subclass of Solver.
unsafe { std::mem::transmute::<Pin<&mut GSSmoother>, Pin<&mut Solver>>(s) }
}