Skip to content

Commit df0ffb1

Browse files
committed
Improve adding a FiniteElementCollection to a mesh
1 parent acca5ca commit df0ffb1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

crates/mfem/src/lib.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,10 +521,18 @@ impl Mesh {
521521
}
522522
}
523523

524+
/// Add a [`FiniteElementCollection`] to the mesh `self`.
525+
///
526+
/// The argument of the function `fec` is the `FiniteElementCollection`
527+
/// associated to the nodes of the mesh, if any. This collection
528+
/// is used to represent the curvature of the elements (that is,
529+
/// how the geometry of the problem is discretized). The
530+
/// `FiniteElementCollection` returned by `fec` is the one that
531+
/// will be used to discretize the PDE.
524532
#[must_use]
525533
pub fn with_fec<'a, FEC>(&'a mut self, fec: FEC) -> MeshWithFEC<'a>
526534
where
527-
FEC: Fn(
535+
FEC: FnOnce(
528536
Option<Ref<'a, FiniteElementCollection>>,
529537
) -> Cow<'a, FiniteElementCollection>,
530538
{

0 commit comments

Comments
 (0)