Skip to content
Snippets Groups Projects
Commit ff998ea8 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add user doc for load_balance:mesh -> mesh

parent ddb2af50
No related branches found
No related tags found
1 merge request!204Remove m_cell_global_index from Connectivity
......@@ -3431,6 +3431,30 @@ In this example, we set three arrays defined at all nodes, all the
- ~face_values~ interpolates ~f~ at the centers of the faces of ~m~,
- ~cell_values~ interpolates ~f~ at the centers of the cells of ~m~.
***** ~load_balance:mesh -> mesh~
Creates a new partition of a mesh in parallel (~MPI~).
#+BEGIN_SRC pugs :exports both :results none
import mesh;
let m1:mesh, m1 = cartesianMesh([0,0], [1,1], (10,10));
let m2:mesh, m2 = load_balance(m1);
#+END_SRC
In this example the mesh ~m2~ is a new parallel partition of the mesh
~m1~. This implies that the two meshes, while being identical from the
mathematical point of view, are now different (and are not defined on
a same connectivity: the connectivity is actually balanced).
Discrete functions defined on ~m1~ are *not* implicitly transferred on the
mesh ~m2~! The function ~load_balance:(Vh)->(Vh)~ must be used to perform
mesh and data load balancing.
#+BEGIN_note
To simplify development of large calculations. A sequential call of
this function has the same effect: the mesh and its connectivity are
copied!
#+END_note
***** ~transform: mesh*function -> mesh~
This function allows to compute a new mesh as the transformation of a
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment