diff --git a/doc/userdoc.org b/doc/userdoc.org index 5650f0a50d36be763f9ac7a38f7eff2c2705c7a9..6144f5a9a1ca118b4d87a74d2b4649ab4b2fad8d 100644 --- a/doc/userdoc.org +++ b/doc/userdoc.org @@ -4495,6 +4495,24 @@ to different meshes. A good example of the use of this kind of function is mass fractions. +***** ~get_mesh:Vh -> mesh~ + +This function allows to retrieve the mesh that is used to define a +discrete function. +#+BEGIN_SRC pugs :exports both :results none + import mesh; + import scheme; + + let m:mesh, m = cartesianMesh(0, [1,1], (10,10)); + + let f: R^2 -> R, x -> 2*x[0]+x[1]; + let fh:Vh, fh = interpolate(m, P0(), f); + + let m2: mesh, m2 = get_mesh(sum); +#+END_SRC +Observe that in this example the two variables refer to the same exact +mesh. There is no duplication. + ***** ~load_balance: (Vh) -> (Vh)~ This function performs a parallel load balancing of a list of ~Vh~