Skip to content
Snippets Groups Projects
Commit aa736b43 authored by Rene Halver's avatar Rene Halver
Browse files

Revised new readme

parent 3bffca3d
No related branches found
No related tags found
1 merge request!8Refactor
...@@ -5,7 +5,7 @@ load balancing into particle based simulation codes. The library is ...@@ -5,7 +5,7 @@ load balancing into particle based simulation codes. The library is
developed in the Simulation Laboratory Molecular Systems of the Jülich developed in the Simulation Laboratory Molecular Systems of the Jülich
Supercomputing Centre at Forschungszentrum Jülich. Supercomputing Centre at Forschungszentrum Jülich.
It includes several load balancing schemes. The following list gives and It includes several load balancing schemes. The following list gives an
overview about these schemes and short explanations. overview about these schemes and short explanations.
- **Tensor product**: The work on all processes is reduced over the - **Tensor product**: The work on all processes is reduced over the
...@@ -32,7 +32,7 @@ overview about these schemes and short explanations. ...@@ -32,7 +32,7 @@ overview about these schemes and short explanations.
than a vertex, i.e. a point defining a Voronoi cell, which describes than a vertex, i.e. a point defining a Voronoi cell, which describes
the domain. Consequently, the number of neighbors is not a conserved the domain. Consequently, the number of neighbors is not a conserved
quantity, i.e. the topology may change over time. ALL uses the Voro++ quantity, i.e. the topology may change over time. ALL uses the Voro++
library published by the Lawrence Berkeley Laboratory for the library published by the Lawrence Berkeley National Laboratory for the
generation of the Voronoi mesh. generation of the Voronoi mesh.
- **Histogram based staggered grid**: Resulting in the same grid, as - **Histogram based staggered grid**: Resulting in the same grid, as
the staggered grid scheme, this scheme uses the cumulative work the staggered grid scheme, this scheme uses the cumulative work
...@@ -128,8 +128,8 @@ Simple (and not so simple) examples are available in the `/examples` sub ...@@ -128,8 +128,8 @@ Simple (and not so simple) examples are available in the `/examples` sub
directory. The simple examples are also documented at length. directory. The simple examples are also documented at length.
Errors are treated as exceptions that are thrown of a (sub) class of Errors are treated as exceptions that are thrown of a (sub) class of
`ALL::CustomException`. Likely candidates that may throw are `balance`, `ALL::CustomException`. Likely candidates that may throw exceptions
`setup`, `printVTKoutlines`. are `balance`,`setup`, `printVTKoutlines`.
### ALL object ### ALL object
The ALL object can be constructed with The ALL object can be constructed with
...@@ -144,7 +144,7 @@ work as `W`, which are usually float or double. The load balancing ...@@ -144,7 +144,7 @@ work as `W`, which are usually float or double. The load balancing
method must be one of `ALL::LB_t::TENSOR`, `...STAGGERED`, method must be one of `ALL::LB_t::TENSOR`, `...STAGGERED`,
`...FORCEBASED`, `...VORONOI`, `...HISTOGRAM`. Where the Voronoi `...FORCEBASED`, `...VORONOI`, `...HISTOGRAM`. Where the Voronoi
method must be enabled at compile time. There is also a second form method must be enabled at compile time. There is also a second form
where the initial domain vertices are given: where the initial domain vertices are already provided:
ALL::ALL<T,W> ( ALL::ALL<T,W> (
const ALL::LB_t method, const ALL::LB_t method,
...@@ -160,12 +160,12 @@ The domain boundaries are given and retrieved as a vector of ...@@ -160,12 +160,12 @@ The domain boundaries are given and retrieved as a vector of
ALL::Point<T> ( const int dimension, const T *values ) ALL::Point<T> ( const int dimension, const T *values )
ALL::Point<T> ( const std::vector<T> &values ) ALL::Point<T> ( const std::vector<T> &values )
and accessed via the `[]` operator like a `std::vector` and its elements can be accessed through the `[]` operator like a `std::vector`
### Set up ### Set up
A few additional parameters must be set before the domains can be A few additional parameters must be set before the domains can be
balanced. Exactly which are dependent on the method used, but in general balanced. Which exactly need to be set, is dependent on the method used,
the following are necessary but in general the following are necessary
void ALL::ALL<T,W>::setVertices ( std::vector<ALL::Point<T>> &vertices ) void ALL::ALL<T,W>::setVertices ( std::vector<ALL::Point<T>> &vertices )
void ALL::ALL<T,W>::setCommunicator ( MPI_Comm comm ) void ALL::ALL<T,W>::setCommunicator ( MPI_Comm comm )
...@@ -181,12 +181,12 @@ grid parameters must also be set beforehand (!) using ...@@ -181,12 +181,12 @@ grid parameters must also be set beforehand (!) using
with the location of the current process and number of processes in each with the location of the current process and number of processes in each
direction. direction.
To trace the current domain better an integer tag can be given, that is To trace the current domain better an integer tag can be provided, which is
used in the domain output, with used in the domain output, with
void ALL::ALL<T,W>::setProcTag ( int tag ) void ALL::ALL<T,W>::setProcTag ( int tag )
and the minimal domain size in each direction can be set using and an observed minimal domain size in each direction can be set using
void ALL::ALL<T,W>::setMinDomainSize ( void ALL::ALL<T,W>::setMinDomainSize (
const std::vector<T> &minSize ) const std::vector<T> &minSize )
...@@ -195,7 +195,7 @@ Once these parameters are set call ...@@ -195,7 +195,7 @@ Once these parameters are set call
void ALL::ALL<T,W>::setup() void ALL::ALL<T,W>::setup()
so internal set up routines can run. so internal set up routines are run.
### Balancing ### Balancing
To create the new domain vertices make sure the current vertices are set To create the new domain vertices make sure the current vertices are set
...@@ -203,7 +203,7 @@ using `setVertices` and the work is set using `setWork` then call ...@@ -203,7 +203,7 @@ using `setVertices` and the work is set using `setWork` then call
void ALL::ALL<T,W>::balance() void ALL::ALL<T,W>::balance()
and then retrieve the new vertices using and then the new vertices can be retrieved by using
std::vector<ALL::Point<T>> &ALL::ALL<T,W>::getVertices () std::vector<ALL::Point<T>> &ALL::ALL<T,W>::getVertices ()
...@@ -271,7 +271,7 @@ Required number of vertices: ...@@ -271,7 +271,7 @@ Required number of vertices:
Advantages: Advantages:
- topology of the system is maintained (orthogonal domains, neighbor - topology of the system is maintained (orthogonal domains, neighbor
relations) relations)
- no update for the neighbor relations need to be made in the calling - no update for the neighbor relations is required in the calling
code code
- if a code was able to deal with orthogonal domains, only small - if a code was able to deal with orthogonal domains, only small
changes are expected to include this strategy changes are expected to include this strategy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment