Commit fca3b220 authored by Pietro Incardona's avatar Pietro Incardona

Small changes in the example

parent 31c4e2ad
......@@ -26,9 +26,9 @@ int main(int argc, char* argv[])
//
// ### WIKI 3 ###
//
// Create several object needed later, in particular
// Create
// * A 3D box that define the domain
// * an array of 3 unsigned integer that define the size of the grid on each dimension
// * an array of 3 unsigned integer that will define the size of the grid on each dimension
// * A Ghost object that will define the extension of the ghost part for each sub-domain in physical units
Box<3,float> domain({0.0,0.0,0.0},{1.0,1.0,1.0});
......@@ -43,8 +43,9 @@ int main(int argc, char* argv[])
//
// ### WIKI 4 ###
//
// Create a distributed grid in 3D (1° template parameter) defined in R^3 with float precision (2° template parameter)
// using a CartesianDecomposition strategy (3° parameter) (the parameter 1° and 2° inside CartDecomposition must match 1° and 2°
// Create a distributed grid in 3D (1° template parameter) space in with float precision (2° template parameter)
// each grid point contain a vector of dimension 3 (float[3]),
// using a CartesianDecomposition strategy (4° parameter) (the parameter 1° and 2° inside CartDecomposition must match 1° and 2°
// of grid_dist_id)
//
// Constructor parameters:
......@@ -57,7 +58,7 @@ int main(int argc, char* argv[])
// ### WIKI 5 ###
//
// Get an iterator that go throught the point of the domain (No ghost)
// Get an iterator that go through the points of the grid (No ghost)
//
auto dom = g_dist.getDomainIterator();
......@@ -71,8 +72,8 @@ int main(int argc, char* argv[])
//
// ### WIKI 6 ###
//
// Get the local grid key, the local grid key store internaly the sub-domain id (each sub-domain contain a grid)
// and the local grid point id identified by 2 integers in 2D 3 integer in 3D and so on. These two dinstinc element are
// Get the local grid key, the local grid key store internally the sub-domain id (each sub-domain contain a grid)
// and the local grid point id identified by 2 integers in 2D 3 integer in 3D and so on. These two distinct elements are
// available with key.getSub() and key.getKey()
//
auto key = dom.get();
......@@ -120,7 +121,7 @@ int main(int argc, char* argv[])
//
// count contain the number of points the local processor contain, if we are interested to count the total number across the processor
// we can use the function add, to sum across processors. First we have to get an instance of Vcluster, queue an operation of add with
// the variable count and finaly execute. All the operation are asynchronous, execute work like a barrier and ensure that all the
// the variable count and finally execute. All the operation are asynchronous, execute work like a barrier and ensure that all the
// queued operations are executed
//
Vcluster & vcl = g_dist.getVC();
......@@ -142,7 +143,7 @@ int main(int argc, char* argv[])
//
// ### WIKI 13 ###
//
// For debugging porpouse and demostration we output the decomposition
// For debugging purpose and demonstration we output the decomposition
//
g_dist.getDecomposition().write("out_dec");
......
......@@ -7,9 +7,8 @@
*
* ## Simple example
*
* This example show how to move grid_key in order to create a laplacian stencil,
* be carefull, the function move are convenient, we suggest to not use in case speed
* of a speed critical part of the code
* This example show how to move grid_key in order to create a Laplacian stencil,
* be careful, the function move are convenient, but not the fastest implementation
*
* ### WIKI END ###
*
......@@ -19,7 +18,7 @@
*
* ### WIKI 2 ###
*
* Define some convenient constant and types
* Define some convenient constants and types
*
*/
constexpr size_t x = 0;
......@@ -60,8 +59,9 @@ int main(int argc, char* argv[])
//
// ### WIKI 4 ###
//
// Create a distributed grid in 3D (1° template parameter) defined in R^3 with float precision (2° template parameter)
// using a CartesianDecomposition strategy (3° parameter) (the parameter 1° and 2° inside CartDecomposition must match 1° and 2°
// Create a distributed grid in 3D (1° template parameter) space in with float precision (2° template parameter)
// each grid point contain a vector of dimension 3 (float[3]),
// using a CartesianDecomposition strategy (4° parameter) (the parameter 1° and 2° inside CartDecomposition must match 1° and 2°
// of grid_dist_id)
//
// Constructor parameters:
......@@ -85,8 +85,8 @@ int main(int argc, char* argv[])
//
// ### WIKI 6 ###
//
// Get the local grid key, the local grid key store internaly the sub-domain id (each sub-domain contain a grid)
// and the local grid point id identified by 2 integers in 2D 3 integer in 3D and so on. These two dinstinc element are
// Get the local grid key, the local grid key store internally the sub-domain id (each sub-domain contain a grid)
// and the local grid point id identified by 2 integers in 2D 3 integer in 3D and so on. These two distinct elements are
// available with key.getSub() and key.getKey()
//
auto key = dom.get();
......
openfpm_data @ 035b35ba
Subproject commit 2baeb7bec51322aab29ed97f2b9de6b0b6d347d4
Subproject commit 035b35bad815ff563b1f51b8192bc8abddee3a4c
openfpm_devices @ a616ad86
Subproject commit 990728ade63fe50f19ff82dbd555862c74dc8329
Subproject commit a616ad8614c6d01511ddf1f9e258cf6693621faa
openfpm_vcluster @ 421922df
Subproject commit b07008bc675acf5718d8b9f396a274af8e9621c1
Subproject commit 421922dff0e8355e77fbf29a5eef5361dabdd3ba
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment