diff --git a/example/Grid/0_simple/main.cpp b/example/Grid/0_simple/main.cpp index 489690be0d849b7cbe63efb1e0b85d762bfcfbc0..5d456b638d3537505c188907753d94f29facd977 100644 --- a/example/Grid/0_simple/main.cpp +++ b/example/Grid/0_simple/main.cpp @@ -21,7 +21,7 @@ int main(int argc, char* argv[]) // // Initialize the library and several objects // - init_global_v_cluster(&argc,&argv); + openfpm_init(&argc,&argv); // // ### WIKI 3 ### @@ -152,5 +152,5 @@ int main(int argc, char* argv[]) // // Deinitialize the library // - delete_global_v_cluster(); + openfpm_finalize(); } diff --git a/example/Grid/1_stencil/main.cpp b/example/Grid/1_stencil/main.cpp index ee585409475c4c00f4386ff3bc2e30fbcc49fbeb..e4d7fe1291e725cbc324f8872e4bd523d7aa2c7e 100644 --- a/example/Grid/1_stencil/main.cpp +++ b/example/Grid/1_stencil/main.cpp @@ -37,7 +37,7 @@ int main(int argc, char* argv[]) // // Initialize the library and several objects // - init_global_v_cluster(&argc,&argv); + openfpm_init(&argc,&argv); // // ### WIKI 4 ### @@ -159,5 +159,5 @@ int main(int argc, char* argv[]) // // Deinitialize the library // - delete_global_v_cluster(); + openfpm_finalize(); } diff --git a/example/SE/0_classes/main.cpp b/example/SE/0_classes/main.cpp index 640c5572977977188f9064a53867a8508ae98539..952adf16fbfc1e30117b33517c775fbb4a7cca2c 100644 --- a/example/SE/0_classes/main.cpp +++ b/example/SE/0_classes/main.cpp @@ -42,8 +42,8 @@ int main(int argc, char* argv[]) // Here we Initialize the library, than we create a uniform random generator between 0 and 1 to to generate particles // randomly in the domain, we create a Box that define our domain, boundary conditions and ghost // - init_global_v_cluster(&argc,&argv); - Vcluster & v_cl = *global_v_cluster; + openfpm_init(&argc,&argv); + Vcluster & v_cl = create_vcluster(); typedef Point<2,float> s; @@ -197,15 +197,6 @@ int main(int argc, char* argv[]) // // Deinitialize the library // - delete_global_v_cluster(); - - if (v_cl.getProcessUnitID() == 0) - { - std::cout << "Allocated memory at the end \n"; - print_alloc(); - std::cout << "\n"; - std::cout << "\n"; - std::cout << "\n"; - } + openfpm_finalize(); } diff --git a/example/SE/1_classes/main.cpp b/example/SE/1_classes/main.cpp index 13721c7f9aa089213da0b01a647cfd67f79dc36b..1662be01ff903459bb8100469d7f235a90320e1e 100644 --- a/example/SE/1_classes/main.cpp +++ b/example/SE/1_classes/main.cpp @@ -36,8 +36,8 @@ int main(int argc, char* argv[]) // * message_on_allocation set a message to print when one allocation is reached, the filename and line number can be used to set a breakpoint and analyze the stacktrace. // * throw_on_allocation throw when one allocation is reached, producing the termination of the program and a core dump (if no try catch is set-up) // - init_global_v_cluster(&argc,&argv); - Vcluster & v_cl = *global_v_cluster; + openfpm_init(&argc,&argv); + Vcluster & v_cl = create_vcluster(); throw_on_alloc(10); // message_on_alloc(10); @@ -104,6 +104,6 @@ int main(int argc, char* argv[]) // // Deinitialize the library // - delete_global_v_cluster(); + openfpm_finalize(); } diff --git a/example/Vector/0_simple/main.cpp b/example/Vector/0_simple/main.cpp index fa568cfa13b1fbc78ff5e9a4fc0c609f029c757f..9f26e5fc60e1de089410ac4aca0c89fbcbfea264 100644 --- a/example/Vector/0_simple/main.cpp +++ b/example/Vector/0_simple/main.cpp @@ -44,8 +44,8 @@ int main(int argc, char* argv[]) // Here we Initialize the library, than we create a uniform random generator between 0 and 1 to to generate particles // randomly in the domain, we create a Box that define our domain, boundary conditions, and ghost // - init_global_v_cluster(&argc,&argv); - Vcluster & v_cl = *global_v_cluster; + openfpm_init(&argc,&argv); + Vcluster & v_cl = create_vcluster(); typedef Point<2,float> s; @@ -172,5 +172,5 @@ int main(int argc, char* argv[]) // // Deinitialize the library // - delete_global_v_cluster(); + openfpm_finalize(); } diff --git a/example/Vector/1_celllist/main.cpp b/example/Vector/1_celllist/main.cpp index f59df0495866a2618a21262acbbb3b1247da2d37..45d1e56b4f121a9c26726c08930cb50076b0016a 100644 --- a/example/Vector/1_celllist/main.cpp +++ b/example/Vector/1_celllist/main.cpp @@ -22,8 +22,8 @@ int main(int argc, char* argv[]) // Here we Initialize the library, we create a Box that define our domain, boundary conditions, ghost // and the grid size // - init_global_v_cluster(&argc,&argv); - Vcluster & v_cl = *global_v_cluster; + openfpm_init(&argc,&argv); + Vcluster & v_cl = create_vcluster(); // we create a 128x128x128 Grid iterator size_t sz[3] = {128,128,128}; @@ -173,7 +173,7 @@ int main(int argc, char* argv[]) // // Deinitialize the library // - delete_global_v_cluster(); + openfpm_finalize(); } diff --git a/example/Vector/1_verlet/main.cpp b/example/Vector/1_verlet/main.cpp index 637363b69fab5992a7d0856c4306d35ff6a77436..b9dae2ada113d923d23045db79668af015cbb36b 100644 --- a/example/Vector/1_verlet/main.cpp +++ b/example/Vector/1_verlet/main.cpp @@ -21,8 +21,8 @@ int main(int argc, char* argv[]) // Here we Initialize the library, we create a Box that define our domain, boundary conditions, ghost // and the grid size // - init_global_v_cluster(&argc,&argv); - Vcluster & v_cl = *global_v_cluster; + openfpm_init(&argc,&argv); + Vcluster & v_cl = create_vcluster(); // we create a 128x128x128 Grid iterator size_t sz[3] = {128,128,128}; @@ -174,6 +174,6 @@ int main(int argc, char* argv[]) // // Deinitialize the library // - delete_global_v_cluster(); + openfpm_finalize(); }