feelpp_mesh_partitioner(1)
2. SYNOPSIS
feelpp_mesh_partitioner --part num [num2…] --ifile file [--dim d] [--shape s] [--order num] [--by-markers] [--by-markers-desc markers] [--ofile file] [--odir dir]
3. DESCRIPTION
feelpp_mesh_partitioner is a simple application which can generate a partitioned mesh and
save it in a Feel++ specific json+hdf5
file format.
The generated mesh can then be loaded very efficiently in parallel.
3.1. Options
feelpp_mesh_partitioner requires some options.
Name | Description | Default value |
---|---|---|
dim |
dimension of the mesh |
3 |
shape |
shape of the mesh elements |
Simplex |
order |
mesh geometric order |
1 |
by-markers |
partitioning on each marker |
|
by-markers-desc |
partitioning by specifying the markers |
|
part |
number of desired partitions |
|
ifile |
name or path to the mesh |
|
ofile |
output filename prefix (without extension) |
|
odir |
output directory |
4. EXAMPLES
We are now using the feelpp/feelpp-toolboxes:latest
docker images as described in book.feelpp.org/user-manual/#getting_started to demonstrate feelpp_mesh_partitioner usage.
We use the meshes in src/feelpp/data/gmsh/primitives
in the docker image.
feelpp/feelpp-toolboxes:latest
docker run --rm -ti -v $HOME/feel:/feel feelpp/feelpp-toolboxes
4.1. Generating a single mesh partitioning
We generate a mesh partitioned on 4 cores with the following command
feelpp_mesh_partitioner --part 4 --ifile src/feelpp/data/gmsh/primitives/torus.geo --ofile torus
You should have in the current directory 4 files
ls torus*
torus.geo torus.h5 torus.json torus.msh
Now the file torus.json
can be loaded in a Feel++ application distributed on 4 cores.
4.2. Generating multiple mesh partitioning
Often we are interested in a set of partitioned meshes in order to do a speed-up study.
feelpp_mesh_partitioner
is the right tool for that. Let’s consider a set of partitions \(\mathcal{P}=\{2, 4, 8, 16, 32 \}\).
feelpp_mesh_partitioner --part 2 4 8 16 32 --ifile src/feelpp/data/gmsh/primitives/torus.geo --odir torus-mesh
You should have in the directory torus-mesh
(thanks to the odir
option) 5 partitioned meshes
ls torus*
torus_p16.h5 torus_p2.h5 torus_p32.h5 torus_p4.h5 torus_p8.h5
torus_p16.json torus_p2.json torus_p32.json torus_p4.json torus_p8.json
The mesh filenames contain the partition information. |
If you want a different prefix than torus , like torus-coarse , you can use the --ifile torus-coarse option and you will have a set of files named torus-coarse_p*.* in the torus-mesh directory.
|
4.3. Generating a mesh partitioning by markers
1) partitioning of each marker present in the mesh :
feelpp_mesh_partitioner --ifile toto.geo --by-markers --part 4 8 15 --odir hola
2) partitioning of
and partitioning of the union of marker1
:marker2 and marker3
feelpp_mesh_partitioner --ifile toto.geo --by-markers-desc marker1:marker2,marker3 --part 4 8 15 --odir hola
In
option, the by-markers-desc
keyword create an union of the markers and ,
keyword allow to split the partitioning regions.:
5. SEE ALSO
Feel++ Book: book.feelpp.org