main.cpp 15.9 KB
Newer Older
Pietro Incardona's avatar
Pietro Incardona committed
1 2 3 4 5

#include "Vector/vector_dist.hpp"
#include "Decomposition/CartDecomposition.hpp"
#include "data_type/aggregate.hpp"
#include "NN/CellList/CellListM.hpp"
incardon's avatar
incardon committed
6
#include "Vector/vector_dist_multiphase_functions.hpp"
Pietro Incardona's avatar
Pietro Incardona committed
7 8

/*!
incardon's avatar
incardon committed
9
 * \page Vector_4_mp_cl Vector 4 Multi Phase cell-list and verlet
Pietro Incardona's avatar
Pietro Incardona committed
10 11 12 13
 *
 * [TOC]
 *
 *
incardon's avatar
incardon committed
14
 * # Vector Multi Phase cell-list and Verlet # {#e4_ph_cl}
Pietro Incardona's avatar
Pietro Incardona committed
15
 *
incardon's avatar
incardon committed
16 17
 * This example show how to use multi-phase cell lists and Verlet-list.More in general
 * it show how to construct Verlet and Cell-list between multiple vector_dist.
Pietro Incardona's avatar
Pietro Incardona committed
18 19 20 21 22 23 24 25 26 27 28 29
 *
 *
 */

int main(int argc, char* argv[])
{
	/*!
	 * \page Vector_4_mp_cl Vector 4 Multi Phase cell-list
	 *
	 * ## Initialization ##
	 *
	 * Here we Initialize the library, and we create a set of distributed vectors all forced to have the same
incardon's avatar
incardon committed
30
	 * decomposition. Each vector identify one phase.
Pietro Incardona's avatar
Pietro Incardona committed
31
	 *
incardon's avatar
incardon committed
32 33 34 35 36 37
	 * \note Be carefull on how you initialize the other phases. All the other phases
	 *       must be forced to use the same decomposition. In order to do this we have
	 *       to use the special constructor where we pass the decomposition from the first
	 *       phase. The second parameter is just the the number of particles
	 *
	 * \snippet Vector/4_multiphase_celllist_verlet/main.cpp Initialization and parameters
Pietro Incardona's avatar
Pietro Incardona committed
38 39 40 41 42 43 44
	 *
	 */

	//! \cond [Initialization and parameters] \endcond

	openfpm_init(&argc,&argv);

incardon's avatar
incardon committed
45 46
	// Vcluster for general usage
	Vcluster & v_cl = create_vcluster();
Pietro Incardona's avatar
Pietro Incardona committed
47 48 49 50 51 52 53

	// The domain
	Box<3,float> box({0.0,0.0,0.0},{1.0,1.0,1.0});

	// Boundary conditions
	size_t bc[3]={PERIODIC,PERIODIC,PERIODIC};

incardon's avatar
incardon committed
54
	// cut-off radius
55 56
	float r_cut = 0.05;

Pietro Incardona's avatar
Pietro Incardona committed
57
	// ghost, big enough to contain the interaction radius
58
	Ghost<3,float> ghost(r_cut);
Pietro Incardona's avatar
Pietro Incardona committed
59

incardon's avatar
incardon committed
60
	// The set of phases
Pietro Incardona's avatar
Pietro Incardona committed
61 62 63 64 65 66
	openfpm::vector< vector_dist<3,float, aggregate<double,double>> > phases;

	// first phase
	phases.add( vector_dist<3,float, aggregate<double,double>>(4096,box,bc,ghost) );

	// The other 3 phases
67 68 69
	phases.add( vector_dist<3,float, aggregate<double,double>>(phases.get(0).getDecomposition(),4096) );
	phases.add( vector_dist<3,float, aggregate<double,double>>(phases.get(0).getDecomposition(),4096) );
	phases.add( vector_dist<3,float, aggregate<double,double>>(phases.get(0).getDecomposition(),4096) );
Pietro Incardona's avatar
Pietro Incardona committed
70

Pietro Incardona's avatar
Pietro Incardona committed
71

Pietro Incardona's avatar
Pietro Incardona committed
72 73 74 75 76 77
	//! \cond [Initialization and parameters] \endcond


	/*!
	 * \page Vector_4_mp_cl Vector 4 Multi Phase cell-list
	 *
incardon's avatar
incardon committed
78 79 80 81
	 * ## Create phases ##
	 *
	 * We initialize all the phases with particle randomly positioned in the space. Completed this
	 * iteration we redistribute the particles using the classical map, and we synchronize the ghost
Pietro Incardona's avatar
Pietro Incardona committed
82
	 *
incardon's avatar
incardon committed
83 84 85 86
	 * \warning we cannot use the same iterator for all the phases even if the number of particles for
	 *          each phase is the same. Consider that the number of particles (per-processor) can be
	 *          different. The case of the initialization ("before map") is the only case where we are
	 *          sure that the number of particles per processor is the same for each phase
Pietro Incardona's avatar
Pietro Incardona committed
87
	 *
incardon's avatar
incardon committed
88
	 * \snippet Vector/4_multiphase_celllist_verlet/main.cpp rand dist
Pietro Incardona's avatar
Pietro Incardona committed
89 90 91 92
	 *
	 */

	//! \cond [rand dist] \endcond
Pietro Incardona's avatar
Pietro Incardona committed
93

incardon's avatar
incardon committed
94
	// An iterator over the particles of the phase0
Pietro Incardona's avatar
Pietro Incardona committed
95 96
	auto it = phases.get(0).getDomainIterator();

incardon's avatar
incardon committed
97
	// For all the particles of phase0
Pietro Incardona's avatar
Pietro Incardona committed
98 99
	while (it.isNext())
	{
incardon's avatar
incardon committed
100 101
		// particle p
		auto p = it.get();
Pietro Incardona's avatar
Pietro Incardona committed
102

incardon's avatar
incardon committed
103 104 105 106 107 108 109
		// Assign the position of the particles to each phase
		for (size_t i = 0 ; i < phases.size(); i++)
		{
			// Assign random position
			phases.get(i).getPos(p)[0] = (float)rand() / RAND_MAX;
			phases.get(i).getPos(p)[1] = (float)rand() / RAND_MAX;
			phases.get(i).getPos(p)[2] = (float)rand() / RAND_MAX;
Pietro Incardona's avatar
Pietro Incardona committed
110
		}
incardon's avatar
incardon committed
111 112

		// Next particle
Pietro Incardona's avatar
Pietro Incardona committed
113 114 115 116
		++it;
	}


incardon's avatar
incardon committed
117 118 119
	// Redistribute and sync all the phases
	for (size_t i = 0 ; i < 4 ; i++)
	{
Pietro Incardona's avatar
Pietro Incardona committed
120
		phases.get(i).map();
incardon's avatar
incardon committed
121 122
		phases.get(i).ghost_get<>();
	}
Pietro Incardona's avatar
Pietro Incardona committed
123

Pietro Incardona's avatar
Pietro Incardona committed
124 125 126 127 128
	//! \cond [rand dist] \endcond

	/*!
	 * \page Vector_4_mp_cl Vector 4 Multi Phase cell-list
	 *
incardon's avatar
incardon committed
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
	 * ## Multi phase Verlet-list ##
	 *
	 * In general verlet-list can be constructed from the vector itself using **getVerlerList()**
	 *
	 * \see \ref Vector_3_md_vl
	 *
	 * In the multi-phase case if we use such function on phase0 such function
	 * produce a Verlet list where for each particle of the phase0 we get the neighborhood
	 *  particles within the phase0. Most of time we also want to construct Verlet-list across
	 *  phases, for example between phase0 and phase1. Let suppose now that we want to construct
	 *  a verlet-list that given the particles of the phase0 it return the neighborhood particles
	 *   in phase1. In order to do this we can create a Cell-list from phase1. Once we have the
	 *   Cell-list for phase 1 we give to **createVerlet()**
	 *  the particle set of phase0, the Cell-list of phase1 and the cut-off radius.
	 *  The function return a VerletList between phase0 and 1 that can be used to do computation.
	 *
	 *
	 * \snippet Vector/4_multiphase_celllist_verlet/main.cpp create multi-phase verlet
	 *
	 */

	//! \cond [create multi-phase verlet] \endcond

incardon's avatar
incardon committed
152 153
	{

incardon's avatar
incardon committed
154 155 156 157
	// Get the cell list of the phase1
	auto CL_phase1 = phases.get(1).getCellList(r_cut);

	// This function create a Verlet-list between phases 0 and 1
incardon's avatar
incardon committed
158
	auto NN_ver01 = createVerlet(phases.get(0),phases.get(1),CL_phase1,r_cut);
incardon's avatar
incardon committed
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176

	//! \cond [create multi-phase verlet] \endcond

	/*!
	 * \page Vector_4_mp_cl Vector 4 Multi Phase cell-list
	 *
	 * Once we have a Verlet-list, we can do easily computation with that. We can use
	 * the function **getNNIterator()** to get an iterator of the neighborhood particles
	 *  for a specified particle. In this case for each particle of the phase0 we count
	 *  the neighborhood particles in phase1
	 *
	 * \snippet Vector/4_multiphase_celllist_verlet/main.cpp count part from phase0 to 1
	 *
	 */

	//! \cond [count part from phase0 to 1] \endcond

	// Get an iterator of the particles of the phase0
incardon's avatar
incardon committed
177
	it = phases.get(0).getDomainIterator();
incardon's avatar
incardon committed
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208

	// For each particle of the phase0
	while (it.isNext())
	{
		// Get the particle p
		auto p = it.get();

		// reset the counter
		phases.get(0).getProp<0>(p) = 0;

		// Get an iterator over the neighborhood particles for the particle p
		auto Np = NN_ver01.template getNNIterator<NO_CHECK>(p.getKey());

		// For each neighborhood of the particle p
		while (Np.isNext())
		{
			// Neighborhood particle q
			auto q = Np.get();

			// Count the number of particles
			// Here in general we can do our computation
			phases.get(0).getProp<0>(p)++;

			// Next particle
			++Np;
		}

		// Next particle
		++it;
	}

incardon's avatar
incardon committed
209 210
	}

incardon's avatar
incardon committed
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
	//! \cond [count part from phase0 to 1] \endcond

	/*!
	 * \page Vector_4_mp_cl Vector 4 Multi Phase cell-list
	 *
	 * ## From one phase to all ##
	 *
	 * It is also possible to construct a Verlet-list from one phase to all the other phases.
	 * To do this we use the function **createCellListM<2>()** to first create a
	 * multi-phase cell-list. The template parameter is required to indicate how many bit
	 * to reserve for the phase information.
	 *
	 * \note In case of
	 * 	* 2 bit mean that you can store up to 4 phases (2^62 number of particles for each phase)
	 * 	* 3 bit mean that you can store up to 8 phases (2^61 number of particles for each phase)
Pietro Incardona's avatar
Pietro Incardona committed
226
	 *
incardon's avatar
incardon committed
227 228 229 230
	 * Once created the multiphase-cell list from the phases. We can use the function
	 * **createVerletM()** to create a verlet-list from one phase to all the others.
	 * The function requires the particle for which we are constructing the verlet list, in this case
	 * the phase0, the Cell-list containing all the other phases and the cut-off radius.
Pietro Incardona's avatar
Pietro Incardona committed
231
	 *
incardon's avatar
incardon committed
232 233
	 *
	 * \snippet Vector/4_multiphase_celllist_verlet/main.cpp create multi-phase multi verlet
Pietro Incardona's avatar
Pietro Incardona committed
234 235
	 *
	 */
Pietro Incardona's avatar
Pietro Incardona committed
236

incardon's avatar
incardon committed
237 238 239 240 241 242
	//! \cond [create multi-phase multi verlet] \endcond

	// This function create an "Empty" Multiphase Cell List from all the phases
	auto CL_all = createCellListM<2>(phases,r_cut);

	// This create a Verlet-list between phase0 and all the other phases
incardon's avatar
incardon committed
243
	auto NNver0_all = createVerletM<2>(0,phases.get(0),phases,CL_all,r_cut);
Pietro Incardona's avatar
Pietro Incardona committed
244

incardon's avatar
incardon committed
245
	//! \cond [create multi-phase multi verlet] \endcond
246

incardon's avatar
incardon committed
247 248 249 250 251 252 253 254 255 256 257
	/*!
	 * \page Vector_4_mp_cl Vector 4 Multi Phase cell-list
	 *
	 * Compute on a multiphase verlet-list is very similar to a non multi-phase.
	 * The only difference is that the function **get()** is substituted by two
	 * other functions **getP()** and **getV()** The first return the phase from where
	 * it come the particle the second it return the particle-id
	 *
	 * \snippet Vector/4_multiphase_celllist_verlet/main.cpp compute multi-phase multi verlet
	 *
	 */
Pietro Incardona's avatar
Pietro Incardona committed
258

incardon's avatar
incardon committed
259
	//! \cond [compute multi-phase multi verlet] \endcond
incardon's avatar
incardon committed
260

incardon's avatar
incardon committed
261 262
	// Get an iterator for the phase0 particles
	it = phases.get(0).getDomainIterator();
incardon's avatar
incardon committed
263

incardon's avatar
incardon committed
264
	while (it.isNext())
Pietro Incardona's avatar
Pietro Incardona committed
265
	{
incardon's avatar
incardon committed
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317
		// Get the particle p
		auto p = it.get();

		// Get an interator over the neighborhood of the particle p
		auto Np = NNver0_all.template getNNIterator<NO_CHECK>(p.getKey());

		// reset the counter
		phases.get(0).getProp<0>(p) = 0;

		// For each neighborhood of the particle p
		while (Np.isNext())
		{
			// Get the particle q near to p
			auto q = Np.getP();

			// Get from which phase it come from
			auto ph_q = Np.getV();

			// count
			phases.get(0).getProp<0>(p)++;

			// Next particle
			++Np;
		}

		// Next particle
		++it;
	}

	//! \cond [compute multi-phase multi verlet] \endcond

	/*!
	 * \page Vector_4_mp_cl Vector 4 Multi Phase cell-list
	 *
	 * ## Symmetric interaction case ##
	 *
	 * The same functions exist also in the case we want to construct
	 * symmetric-verlet list.
	 *
	 * \see \ref Vector_5_md_vl_sym For more details on how to use symmetric
	 * verlet-list in a real case.
	 *
	 * In general the main differences can be summarized in
	 * * we have to reset the **forces** or **interaction** variable(s)
	 * * calculate the interaction p-q and apply the result to p and q at the same time
	 * * merge with ghost_put the result is stored in the ghost part with the
	 *   real particles
	 *
	 * \snippet Vector/4_multiphase_celllist_verlet/main.cpp compute sym multi-phase two phase
	 *
	 */

incardon's avatar
incardon committed
318
	{
incardon's avatar
incardon committed
319 320 321
	//! \cond [compute sym multi-phase two phase] \endcond

	// Get the cell list of the phase1
incardon's avatar
incardon committed
322
	auto CL_phase1 = phases.get(1).getCellListSym(r_cut);
incardon's avatar
incardon committed
323 324

	// This function create a Verlet-list between phases 0 and 1
incardon's avatar
incardon committed
325
	auto NN_ver01 = createVerletSym(phases.get(0),phases.get(1),CL_phase1,r_cut);
incardon's avatar
incardon committed
326 327

	// Get an iterator over the real and ghost particles
incardon's avatar
incardon committed
328
	it = phases.get(0).getDomainAndGhostIterator();
incardon's avatar
incardon committed
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345

	// For each particles
	while (it.isNext())
	{
		// Get the particle p
		auto p = it.get();

		// Reset the counter
		phases.get(0).getProp<0>(p) = 0;

		// Next particle
		++it;
	}

	// Compute interaction from phase0 to phase1

	// Get an iterator over the real particles of phase0
incardon's avatar
incardon committed
346
	it = phases.get(0).getDomainIterator();
incardon's avatar
incardon committed
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378

	// For each particle of the phase0
	while (it.isNext())
	{
		// get particle p
		auto p = it.get();

		// Get the neighborhood of particle p
		auto Np = NN_ver01.template getNNIterator<NO_CHECK>(p.getKey());

		// For each neighborhood of the particle p
		while (Np.isNext())
		{
			// Neighborhood particle q of p
			auto q = Np.get();

			// increment the counter for the phase 0 and 1
			phases.get(0).getProp<0>(p)++;
			phases.get(1).getProp<0>(q)++;

			// Next particle
			++Np;
		}

		// Next particle
		++it;
	}

	// Merge the information of the ghost with the real particles
	phases.get(0).ghost_put<add_,0>();
	phases.get(1).ghost_put<add_,0>();

incardon's avatar
incardon committed
379 380
	}

incardon's avatar
incardon committed
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406
	//! \cond [compute sym multi-phase two phase] \endcond

	/*!
	 * \page Vector_4_mp_cl Vector 4 Multi Phase cell-list
	 *
	 * For the case of a Verlet-list between the phase0 and all the other phases.
	 * The code remain very similar to the previous one the only differences is that
	 * we have to create a Multi-phase cell list from the vector of the phases.
	 * When we compute with the verlet-list list now the simple function **get**
	 * is substituted by the function **getP** and **getV**. In this example we are
	 * creating 4 multiphase symmetric verlet-list
	 *
	 * * 0 to all
	 * * 1 to all
	 * * 2 to all
	 * * 3 to all
	 *
	 * The computation is an all to all
	 *
	 * \snippet Vector/4_multiphase_celllist_verlet/main.cpp create sym multi-phase multi verlet
	 *
	 */

	//! \cond [create sym multi-phase multi verlet] \endcond

	// Get an iterator over the phase0
incardon's avatar
incardon committed
407
	it = phases.get(0).getDomainAndGhostIterator();
incardon's avatar
incardon committed
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425

	// For each particle of the phase 0
	while (it.isNext())
	{
		// get the particle p
		auto p = it.get();

		// Reset the counter for the domain and ghost particles
		phases.get(0).getProp<0>(p) = 0;
		phases.get(1).getProp<0>(p) = 0;
		phases.get(2).getProp<0>(p) = 0;
		phases.get(3).getProp<0>(p) = 0;

		// next particle
		++it;
	}

	// This function create an "Empty" Multiphase Cell List
incardon's avatar
incardon committed
426
	CL_all = createCellListSymM<2>(phases,r_cut);
incardon's avatar
incardon committed
427 428

	// Type of the multiphase Verlet-list
incardon's avatar
incardon committed
429
	typedef decltype(createVerletSymM<2>(0,phases.get(0),phases,CL_all,r_cut)) verlet_type;
incardon's avatar
incardon committed
430 431 432 433 434 435 436 437

	// for each phase we create one Verlet-list that contain the neighborhood
	// from all the phases
	verlet_type NNver_all[4];

	// Here we create a Verlet-list between each phases

	// 0 to all
incardon's avatar
incardon committed
438
	NNver_all[0] = createVerletSymM<2>(0,phases.get(0),phases,CL_all,r_cut);
incardon's avatar
incardon committed
439 440

	// 1 to all
incardon's avatar
incardon committed
441
	NNver_all[1] = createVerletSymM<2>(1,phases.get(1),phases,CL_all,r_cut);
incardon's avatar
incardon committed
442 443

	// 2 to all
incardon's avatar
incardon committed
444
	NNver_all[2] = createVerletSymM<2>(2,phases.get(2),phases,CL_all,r_cut);
incardon's avatar
incardon committed
445 446

	// 3 to all
incardon's avatar
incardon committed
447
	NNver_all[3] = createVerletSymM<2>(3,phases.get(3),phases,CL_all,r_cut);
incardon's avatar
incardon committed
448 449 450 451 452 453 454 455

	// For each phase
	for (size_t i = 0 ; i < phases.size() ; i++)
	{
		// Get an iterator over the particles of that phase
		it = phases.get(i).getDomainIterator();

		// for each particle of the phase
Pietro Incardona's avatar
Pietro Incardona committed
456
		while (it.isNext())
Pietro Incardona's avatar
Pietro Incardona committed
457
		{
incardon's avatar
incardon committed
458 459 460 461 462 463 464 465 466 467 468
			// Get the particle p
			auto p = it.get();

			// Get an iterator for neighborhood of the particle p
			auto Np = NNver_all[i].template getNNIterator<NO_CHECK>(p.getKey());

			// For each neighborhood particle
			while (Np.isNext())
			{
				// Get the particle q near to p
				auto q = Np.getP();
Pietro Incardona's avatar
Pietro Incardona committed
469

incardon's avatar
incardon committed
470 471
				// Get from which phase it come from
				auto ph_q = Np.getV();
Pietro Incardona's avatar
Pietro Incardona committed
472

incardon's avatar
incardon committed
473 474 475 476 477 478 479 480 481
				// increment the counter on both p and q
				phases.get(i).getProp<0>(p)++;
				phases.get(ph_q).getProp<0>(q)++;

				// Next particle
				++Np;
			}

			// Next particle
Pietro Incardona's avatar
Pietro Incardona committed
482 483 484 485
			++it;
		}
	}

incardon's avatar
incardon committed
486 487 488 489 490 491 492
	// Merge the ghost part with the real particles
	phases.get(0).ghost_put<add_,0>();
	phases.get(1).ghost_put<add_,0>();
	phases.get(2).ghost_put<add_,0>();
	phases.get(3).ghost_put<add_,0>();

	//! \cond [create sym multi-phase multi verlet] \endcond
Pietro Incardona's avatar
Pietro Incardona committed
493 494 495 496 497 498

	/*!
	 * \page Vector_4_mp_cl Vector 4 Multi Phase cell-list
	 *
	 * ## Multi-phase cell-list usage ##
	 *
incardon's avatar
incardon committed
499 500
	 * The multiphase cell-list that we constructed before to create a Verlet-list can be also used
	 * directly. In this case we accumulate on the property
Pietro Incardona's avatar
Pietro Incardona committed
501 502
	 * 0 of the phase 0 the distance of the near particles from all the phases
	 *
incardon's avatar
incardon committed
503
	 * \snippet Vector/4_multiphase_celllist_verlet/main.cpp cl usage
Pietro Incardona's avatar
Pietro Incardona committed
504 505 506 507 508
	 *
	 */

	//! \cond [cl usage] \endcond

incardon's avatar
incardon committed
509
	// we create a reference to phase0 particle for convenience
Pietro Incardona's avatar
Pietro Incardona committed
510
	vector_dist<3,float, aggregate<double,double> > & current_phase = phases.get(0);
Pietro Incardona's avatar
Pietro Incardona committed
511 512 513 514 515 516 517 518 519 520 521 522 523

	// Get the iterator of the particles of phase 0
	auto it2 = current_phase.getIterator();

	// For each particle ...
	while (it2.isNext())
	{
		// ... p
		auto p = it2.get();

		// Get the position of the particle p
		Point<3,float> xp = current_phase.getPos(p);

incardon's avatar
incardon committed
524 525 526
		// Reset to zero the propety 0
		current_phase.getProp<0>(p) = 0.0;

Pietro Incardona's avatar
Pietro Incardona committed
527
		// Get an iterator of all the particles neighborhood of p
incardon's avatar
incardon committed
528
		auto Np = CL_all.getNNIterator(CL_all.getCell(current_phase.getPos(p)));
Pietro Incardona's avatar
Pietro Incardona committed
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548

		// For each particle near p
		while (Np.isNext())
		{
			// Get the particle q near to p
			auto q = Np.getP();

			// Get from which phase it come from
			auto ph_q = Np.getV();

			Point<3,float> xq = phases.get(ph_q).getPos(q);

			// we accumulate all the distances
			current_phase.getProp<0>(p) = norm(xp - xq);

			++Np;
		}

		// Next particle p
		++it2;
Pietro Incardona's avatar
Pietro Incardona committed
549
	}
Pietro Incardona's avatar
Pietro Incardona committed
550

Pietro Incardona's avatar
Pietro Incardona committed
551
	//! \cond [cl usage] \endcond
Pietro Incardona's avatar
Pietro Incardona committed
552 553

	/*!
Pietro Incardona's avatar
Pietro Incardona committed
554
	 * \page Vector_4_mp_cl Vector 4 Multi Phase cell-list
Pietro Incardona's avatar
Pietro Incardona committed
555 556 557
	 *
	 * ## Finalize ## {#finalize}
	 *
Pietro Incardona's avatar
Pietro Incardona committed
558
	 *  At the very end of the program we have always de-initialize the library
Pietro Incardona's avatar
Pietro Incardona committed
559
	 *
incardon's avatar
incardon committed
560
	 * \snippet Vector/4_multiphase_celllist_verlet/main.cpp finalize
Pietro Incardona's avatar
Pietro Incardona committed
561 562 563 564 565 566 567 568 569 570
	 *
	 */

	//! \cond [finalize] \endcond

	openfpm_finalize();

	//! \cond [finalize] \endcond

	/*!
Pietro Incardona's avatar
Pietro Incardona committed
571
	 * \page Vector_4_mp_cl Vector 4 Multi Phase cell-list
Pietro Incardona's avatar
Pietro Incardona committed
572 573 574
	 *
	 * # Full code # {#code}
	 *
incardon's avatar
incardon committed
575
	 * \include Vector/4_multiphase_celllist_verlet/main.cpp
Pietro Incardona's avatar
Pietro Incardona committed
576 577 578 579 580 581 582
	 *
	 */
}