Skip to content
Snippets Groups Projects
Commit d57eda01 authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Fixing examples

parent d93e4a34
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
......@@ -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();
}
......@@ -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();
}
......@@ -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();
}
......@@ -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();
}
......@@ -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();
}
......
......@@ -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();
}
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