ie_loc_ghost.hpp 17.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
/*
 * ie_ghost.hpp
 *
 *  Created on: Aug 8, 2015
 *      Author: i-bird
 */

#ifndef SRC_DECOMPOSITION_GHOST_DEC_IE_GHOST_HPP_
#define SRC_DECOMPOSITION_GHOST_DEC_IE_GHOST_HPP_

#include "Space/Shape/Box.hpp"
#include "Space/Ghost.hpp"
#include "Space/SpaceBox.hpp"
#include "common.hpp"
15
#include "VTKWriter/VTKWriter.hpp"
16
#include "nn_processor.hpp"
17 18

/*! \brief structure that store and compute the internal and external local ghost box
19 20 21
 *
 * \tparam dim is the dimensionality of the physical domain we are going to decompose.
 * \tparam T type of the space we decompose, Real, Integer, Complex ...
22 23 24 25 26 27 28
 *
 * \see CartDecomposition
 *
 */
template<unsigned int dim, typename T>
class ie_loc_ghost
{
incardon's avatar
incardon committed
29
	//! It contain the calculated local ghost boxes
30 31
	openfpm::vector<lBox_dom<dim,T>> loc_ghost_box;

32 33
	//! temporal added sub-domains
	openfpm::vector<Box_loc_sub<dim,T>> sub_domains_tmp;
34 35 36

	/*! \brief Create the external local ghost boxes
	 *
incardon's avatar
incardon committed
37 38 39
	 * \param ghost part
	 * \param sub_domains list of local sub-domains
	 * \param sub_domains_prc list of sub-domains from the neighborhood processors
40 41
	 *
	 */
incardon's avatar
incardon committed
42 43 44
	void create_loc_ghost_ebox(Ghost<dim,T> & ghost,
			                   openfpm::vector<SpaceBox<dim,T>> & sub_domains,
							   openfpm::vector<Box_loc_sub<dim,T>> & sub_domains_prc)
45
	{
46 47 48
		comb<dim> zero;
		zero.zero();

49 50 51 52 53 54 55 56 57 58 59
		loc_ghost_box.resize(sub_domains.size());

		// For each sub-domain
		for (size_t i = 0 ; i < sub_domains.size() ; i++)
		{
			SpaceBox<dim,T> sub_with_ghost = sub_domains.get(i);

			// enlarge the sub-domain with the ghost
			sub_with_ghost.enlarge(ghost);

			// intersect with the other local sub-domains
60
			for (size_t j = 0 ; j < sub_domains_prc.size() ; j++)
61
			{
62
				size_t rj = sub_domains_prc.get(j).sub;
63

64 65 66
				if (rj == i && sub_domains_prc.get(j).cmb == zero)
					continue;

67 68
				::Box<dim,T> bi;

69
				bool intersect = sub_with_ghost.Intersect(sub_domains_prc.get(j).bx,bi);
70 71 72

				if (intersect == true)
				{
incardon's avatar
incardon committed
73
					Box_sub_k<dim,T> b;
74
					b.sub = rj;
Pietro Incardona's avatar
Pietro Incardona committed
75 76
					b.bx = bi;
					b.cmb = sub_domains_prc.get(j).cmb;
77 78 79 80 81

					// local external ghost box
					loc_ghost_box.get(i).ebx.add(b);

					// search this box in the internal box of the sub-domain j
82
					for (size_t k = 0; k < loc_ghost_box.get(rj).ibx.size() ; k++)
83
					{
84
						if (loc_ghost_box.get(rj).ibx.get(k).sub == i && loc_ghost_box.get(rj).ibx.get(k).cmb == sub_domains_prc.get(j).cmb.operator-())
85
						{
86
							loc_ghost_box.get(rj).ibx.get(k).k = loc_ghost_box.get(i).ebx.size()-1;
incardon's avatar
incardon committed
87
							loc_ghost_box.get(i).ebx.last().k = k;
88 89 90 91 92 93 94 95 96 97
							break;
						}
					}
				}
			}
		}
	}

	/*! \brief Create the internal local ghost boxes
	 *
incardon's avatar
incardon committed
98 99 100
	 * \param ghost part
	 * \param sub_domains local sub-domains
	 * \param sub_domains_prc list of sub-domains from the neighborhood processors
101 102
	 *
	 */
incardon's avatar
incardon committed
103 104 105
	void create_loc_ghost_ibox(Ghost<dim,T> & ghost,
			                   openfpm::vector<SpaceBox<dim,T>> & sub_domains,
							   openfpm::vector<Box_loc_sub<dim,T>> & sub_domains_prc)
106
	{
107 108 109
		comb<dim> zero;
		zero.zero();

110 111 112 113 114 115
		loc_ghost_box.resize(sub_domains.size());

		// For each sub-domain
		for (size_t i = 0 ; i < sub_domains.size() ; i++)
		{
			// intersect with the others local sub-domains
116
			for (size_t j = 0 ; j < sub_domains_prc.size() ; j++)
117
			{
118 119
				SpaceBox<dim,T> sub_with_ghost = sub_domains_prc.get(j).bx;
				size_t rj = sub_domains_prc.get(j).sub;
120

121
				// Avoid to intersect the box with itself
122 123 124
				if (rj == i && sub_domains_prc.get(j).cmb == zero)
					continue;

125 126 127 128 129 130 131 132 133 134
				// enlarge the sub-domain with the ghost
				sub_with_ghost.enlarge(ghost);

				::Box<dim,T> bi;

				bool intersect = sub_with_ghost.Intersect(::SpaceBox<dim,T>(sub_domains.get(i)),bi);

				if (intersect == true)
				{
					Box_sub_k<dim,T> b;
135
					b.sub = rj;
Pietro Incardona's avatar
Pietro Incardona committed
136
					b.bx = bi;
137
					b.k = -1;
138
					b.cmb = sub_domains_prc.get(j).cmb;
139 140 141 142 143 144 145

					loc_ghost_box.get(i).ibx.add(b);
				}
			}
		}
	}

146
	/*! \brief In case of periodic boundary conditions we replicate the sub-domains at the border
147
	 *
incardon's avatar
incardon committed
148
	 * \param sub_domains list of sub-domains
149
	 * \param domain Domain box
incardon's avatar
incardon committed
150 151
	 * \param ghost part
	 * \param bc boundary conditions
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
	 *
	 */
	void applyBC(openfpm::vector<Box_loc_sub<dim,T>> & sub_domains, const Box<dim,T> & domain, const Ghost<dim,T> & ghost, const size_t (&bc)[dim])
	{
		HyperCube<dim> hyp;

		// first we create boxes at the border of the domain used to detect the sub-domain
		// that must be adjusted, each of this boxes define a shift in case of periodic boundary condition
		for (long int i = dim-1 ; i >= 0 ; i--)
		{
			std::vector<comb<dim>> cmbs = hyp.getCombinations_R(i);

			for (size_t j = 0 ; j < cmbs.size() ; j++)
			{
				if (nn_prcs<dim,T>::check_valid(cmbs[j],bc) == false)
					continue;

				Box<dim,T> bp;
				Point<dim,T> shift;

				for (size_t k = 0 ; k < dim ; k++)
				{
					switch (cmbs[j][k])
					{
					case 1:
						bp.setLow(k,domain.getHigh(k)+ghost.getLow(k));
						bp.setHigh(k,domain.getHigh(k));
179
						shift.get(k) = -domain.getHigh(k)+domain.getLow(k);
180 181 182 183 184 185 186 187 188
						break;
					case 0:
						bp.setLow(k,domain.getLow(k));
						bp.setHigh(k,domain.getHigh(k));
						shift.get(k) = 0;
						break;
					case -1:
						bp.setLow(k,domain.getLow(k));
						bp.setHigh(k,ghost.getHigh(k));
189
						shift.get(k) = domain.getHigh(k)-domain.getLow(k);
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
						break;
					}
				}

				// Detect all the sub-domain involved, shift them and add to the list
				// Detection is performed intersecting the sub-domains with the ghost
				// parts near the domain borders
				for (size_t k = 0 ; k < sub_domains.size() ; k++)
				{
					Box<dim,T> sub = sub_domains.get(k).bx;
					Box<dim,T> b_int;

					if (sub.Intersect(bp,b_int) == true)
					{
						sub += shift;
						add_subdomain(Box_loc_sub<dim,T>(sub,k,cmbs[j]));
					}
				}
			}
		}

		flush(sub_domains);
	}



	/*! \brief add sub-domains to a temporal list
	 *
	 * \param bx Box to add
	 *
	 */
	inline void add_subdomain(const Box_loc_sub<dim,T> & bx)
	{
		sub_domains_tmp.add(bx);
	}

	/*! \brief Flush the temporal added sub-domain to the sub-domain list
	 *
incardon's avatar
incardon committed
228 229
	 * \param sub_domains to add (In general they come from mirroring periodic
	 *        boundary conditions)
230 231 232 233 234 235 236 237 238 239 240 241
	 *
	 */
	void flush(openfpm::vector<Box_loc_sub<dim,T>> & sub_domains)
	{
		for (size_t i = 0 ; i < sub_domains_tmp.size() ; i++)
		{
			sub_domains.add(sub_domains_tmp.get(i));
		}

		sub_domains_tmp.clear();
	}

242 243
public:

244 245
	/*! \brief Create external and internal local ghosts
	 *
incardon's avatar
incardon committed
246 247
	 * \param sub_domains list of local sub-domains
	 * \param domain simulation domain
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
	 * \param ghost boundary
	 * \param bc Boundary conditions
	 *
	 */
	void create(openfpm::vector<SpaceBox<dim,T>> & sub_domains, Box<dim,T> & domain , Ghost<dim,T> & ghost , const size_t (&bc)[dim] )
	{
		// It will store local sub-domains + borders
		openfpm::vector<Box_loc_sub<dim,T>> sub_domains_prc;

		comb<dim> zero;
		zero.zero();

		// Copy sub_domains into sub_domains_prc
		for (size_t i = 0 ; i < sub_domains.size() ; i++)
		{
			Box_loc_sub<dim,T> bls(SpaceBox<dim,T>(sub_domains.get(i)),i,zero);
			sub_domains_prc.add(bls);
			sub_domains_prc.last().sub = i;
		}

		applyBC(sub_domains_prc,domain,ghost,bc);

		create_loc_ghost_ibox(ghost,sub_domains,sub_domains_prc);
		create_loc_ghost_ebox(ghost,sub_domains,sub_domains_prc);
	}

274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292
	//! Default constructor
	ie_loc_ghost()	{};

	//! Constructor from another ie_loc_ghost
	ie_loc_ghost(const ie_loc_ghost<dim,T> & ilg)
	{
		this->operator=(ilg);
	};

	//! Constructor from temporal ie_loc_ghost
	ie_loc_ghost(ie_loc_ghost<dim,T> && ilg)
	{
		this->operator=(ilg);
	}

	/*! \brief copy the ie_loc_ghost
	 *
	 * \param ilg object to copy
	 *
incardon's avatar
incardon committed
293 294
	 * \return itself
	 *
295 296 297 298 299 300 301 302 303 304 305
	 */
	ie_loc_ghost<dim,T> & operator=(const ie_loc_ghost<dim,T> & ilg)
	{
		loc_ghost_box = ilg.loc_ghost_box;
		return *this;
	}

	/*! \brief copy the ie_loc_ghost
	 *
	 * \param ilg object to copy
	 *
incardon's avatar
incardon committed
306 307
	 * \return itself
	 *
308 309 310 311 312 313 314
	 */
	ie_loc_ghost<dim,T> & operator=(ie_loc_ghost<dim,T> && ilg)
	{
		loc_ghost_box.swap(ilg.loc_ghost_box);
		return *this;
	}

315 316 317 318
	/*! \brief Get the number of local sub-domains
	 *
	 * \return the number of local sub-domains
	 *
incardon's avatar
incardon committed
319
	 *
320 321 322 323 324 325
	 */
	inline size_t getNLocalSub()
	{
		return loc_ghost_box.size();
	}

326 327 328 329
	/*! \brief Get the number of external local ghost box for each sub-domain
	 *
	 * \param id sub-domain id
	 *
incardon's avatar
incardon committed
330
	 * \return the number of external ghost box
331 332 333 334 335 336 337 338 339 340 341
	 *
	 */
	inline size_t getLocalNEGhost(size_t id)
	{
		return loc_ghost_box.get(id).ebx.size();
	}

	/*! \brief Get the number of internal local ghost box for each sub-domain
	 *
	 * \param id sub-domain id
	 *
incardon's avatar
incardon committed
342
	 * \return the number of internal ghost box
343 344 345 346 347 348 349
	 *
	 */
	inline size_t getLocalNIGhost(size_t id)
	{
		return loc_ghost_box.get(id).ibx.size();
	}

incardon's avatar
incardon committed
350 351 352 353 354
	/*! \brief For the sub-domain i intersected with a surrounding sub-domain enlarged. Produce a internal ghost box from
	 *        the prospecive of i and an associated external ghost box from the prospective of j.
	 *        In order to retrieve the information about the external ghost box we have to use getLocalEGhostBox(x,k).
	 *        where k is the value returned by getLocalIGhostE(i,j) and x is the value returned by
	 *        getLocalIGhostSub(i,j)
355
	 *
incardon's avatar
incardon committed
356 357 358 359
	 * \param i
	 * \param j
	 *
	 * \return k
360 361 362 363 364 365 366
	 *
	 */
	inline size_t getLocalIGhostE(size_t i, size_t j)
	{
		return loc_ghost_box.get(i).ibx.get(j).k;
	}

incardon's avatar
incardon committed
367
	/*! \brief Get the j internal local ghost box for the i sub-domain
368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383
	 *
	 * \note For the sub-domain i intersected with the sub-domain j enlarged, the associated
	 *       external ghost box is located in getLocalIGhostBox(j,k) with
	 *       getLocalIGhostSub(j,k) == i
	 *
	 * To get k use getLocalIGhostE
	 *
	 * \see getLocalIGhostE
	 *
	 * \param i sub-domain
	 * \param j box
	 * \return the box
	 *
	 */
	inline const ::Box<dim,T> & getLocalIGhostBox(size_t i, size_t j) const
	{
384
		return loc_ghost_box.get(i).ibx.get(j).bx;
385 386
	}

387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441
	/*! \brief Get the j internal local ghost box boundary position for the i sub-domain of the local processor
	 *
	 * \note For the sub-domain i intersected with the sub-domain j enlarged, the associated
	 *       external ghost box is located in getLocalIGhostBox(j,k) with
	 *       getLocalIGhostSub(j,k) == i
	 *
	 * To get k use getLocalIGhostE
	 *
	 * \see getLocalIGhostE
	 *
	 * Some of the intersection boxes has special position, because they are at the boundary, this function
	 * return their position at the border
	 *
		\verbatim

															[1,1]
			+---------+------------------------+---------+
			| (1,-1)  |                        | (1,1)   |
			|   |     |    (1,0) --> 7         |   |     |
			|   v     |                        |   v     |
			|   6     |                        |   8     |
			+--------------------------------------------+
			|         |                        |         |
			|         |                        |         |
			|         |                        |         |
			| (-1,0)  |                        | (1,0)   |
			|    |    |                        |   |     |
			|    v    |      (0,0) --> 4       |   v     |
			|    3    |                        |   5     |
			|         |                        |         |
		 	|         |                        |         |
			|         |                        |         |
			|         |                        |         |
			|         |                        |         |
			|         |                        |         |
			+--------------------------------------------+
			| (-1,-1) |                        | (-1,1)  |
			|    |    |   (-1,0) --> 1         |    |    |
			|    v    |                        |    v    |
			|    0    |                        |    2    |
			+---------+------------------------+---------+


		\endverbatim
	 *
	 * \param i sub-domain
	 * \param j box
	 * \return the box
	 *
	 */
	inline const comb<dim> & getLocalIGhostPos(size_t i, size_t j) const
	{
		return loc_ghost_box.get(i).ibx.get(j).cmb;
	}

442 443 444 445 446 447 448 449 450
	/*! \brief Get the j external local ghost box for the local processor
	 *
	 * \param i sub-domain
	 * \param j box
	 * \return the box
	 *
	 */
	inline const ::Box<dim,T> & getLocalEGhostBox(size_t i, size_t j) const
	{
451
		return loc_ghost_box.get(i).ebx.get(j).bx;
452 453
	}

Pietro Incardona's avatar
Pietro Incardona committed
454 455 456 457 458 459 460 461 462 463 464 465
	/*! \brief Get the j external local ghost box for the local processor
	 *
	 * \param i sub-domain
	 * \param j box
	 * \return the box
	 *
	 */
	inline const comb<dim> & getLocalEGhostPos(size_t i, size_t j) const
	{
		return loc_ghost_box.get(i).ebx.get(j).cmb;
	}

incardon's avatar
incardon committed
466
	/*! \brief Considering that sub-domains has N internal local ghost box identified
467
	 *         with the 0 <= k < N that come from the intersection of 2 sub-domains i and j
incardon's avatar
incardon committed
468 469
	 *         where j is enlarged, given the sub-domain i and the id k of the internal box,
	 *         it return the id of the other sub-domain that produced the intersection
470 471 472
	 *
	 * \param i sub-domain
	 * \param k id
incardon's avatar
incardon committed
473
	 * \return j
474 475
	 *
	 */
incardon's avatar
incardon committed
476
	inline size_t getLocalIGhostSub(size_t i, size_t k) const
477
	{
incardon's avatar
incardon committed
478
		return loc_ghost_box.get(i).ibx.get(k).sub;
479 480
	}

incardon's avatar
incardon committed
481
	/*! \brief Considering that sub-domains has N external local ghost box identified
482
	 *         with the 0 <= k < N that come from the intersection of 2 sub-domains i and j
incardon's avatar
incardon committed
483 484
	 *         where i is enlarged, given the sub-domain i and the id k of the external box,
	 *         it return the id of the other sub-domain that produced the intersection
485 486 487
	 *
	 * \param i sub-domain
	 * \param k id
incardon's avatar
incardon committed
488
	 * \return j
489 490
	 *
	 */
incardon's avatar
incardon committed
491
	inline size_t getLocalEGhostSub(size_t i, size_t k) const
492
	{
incardon's avatar
incardon committed
493
		return loc_ghost_box.get(i).ebx.get(k).sub;
494 495 496 497 498 499 500 501 502 503 504 505 506 507
	}

	/*! \brief Write the decomposition as VTK file
	 *
	 * The function generate several files
	 *
	 * 5) local_internal_ghost_X.vtk internal local ghost boxes for the local processor (X)
	 * 6) local_external_ghost_X.vtk external local ghost boxes for the local processor (X)
	 *
	 * where X is the local processor rank
	 *
	 * \param output directory where to write the files
	 * \param p_id id of the local processor
	 *
incardon's avatar
incardon committed
508 509
	 * \return true if the file is written correctly
	 *
510 511 512
	 */
	bool write(std::string output, size_t p_id) const
	{
513 514 515
		// Copy the Box_sub_k into a vector of boxes
		openfpm::vector<openfpm::vector<Box<dim,T>>> vv5;

516 517
		for (size_t p = 0 ; p < loc_ghost_box.size() ; p++)
		{
518 519 520 521 522 523 524 525 526 527
			vv5.add();
			for (size_t i = 0 ; i < loc_ghost_box.get(p).ibx.size() ; i++)
				vv5.last().add(loc_ghost_box.get(p).ibx.get(i).bx);
		}

		//! local_internal_ghost_X.vtk internal local ghost boxes for the local processor (X)
		VTKWriter<openfpm::vector<Box<dim,T>>,VECTOR_BOX> vtk_box5;
		for (size_t p = 0 ; p < vv5.size() ; p++)
		{
			vtk_box5.add(vv5.get(p));
528 529 530
		}
		vtk_box5.write(output + std::string("local_internal_ghost_") + std::to_string(p_id) + std::string(".vtk"));

531 532 533
		// Copy the Box_sub_k into a vector of boxes
		openfpm::vector<openfpm::vector<Box<dim,T>>> vv6;

534 535
		for (size_t p = 0 ; p < loc_ghost_box.size() ; p++)
		{
536 537 538 539 540 541 542 543 544 545
			vv6.add();
			for (size_t i = 0 ; i < loc_ghost_box.get(p).ebx.size() ; i++)
				vv6.last().add(loc_ghost_box.get(p).ebx.get(i).bx);
		}

		//! local_external_ghost_X.vtk external local ghost boxes for the local processor (X)
		VTKWriter<openfpm::vector<Box<dim,T>>,VECTOR_BOX> vtk_box6;
		for (size_t p = 0 ; p < vv6.size() ; p++)
		{
			vtk_box6.add(vv6.get(p));
546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566
		}
		vtk_box6.write(output + std::string("local_external_ghost_") + std::to_string(p_id) + std::string(".vtk"));

		return true;
	}

	/*! \brief function to check the consistency of the information of the decomposition
	 *
	 * \param n_sub Number of sub_domain
	 *
	 * \return false if is inconsistent
	 *
	 */
	bool check_consistency(size_t n_sub)
	{
		//! for each sub-domain
		for (size_t i = 0 ; i < loc_ghost_box.size() ; i++)
		{
			for (size_t j = 0 ; j < loc_ghost_box.get(i).ibx.size() ; j++)
			{
				if (loc_ghost_box.get(i).ibx.get(j).k == -1)
567
				{
incardon's avatar
incardon committed
568 569 570 571 572 573 574 575 576 577
					std::cout << __FILE__ << ":" << __LINE__ << " Error: inconsistent decomposition no ibx link" << "\n";
					return false;
				}

				size_t k = loc_ghost_box.get(i).ibx.get(j).k;
				size_t sub = loc_ghost_box.get(i).ibx.get(j).sub;

				if (loc_ghost_box.get(sub).ebx.get(k).k != (long int)j)
				{
					std::cout << __FILE__ << ":" << __LINE__ << " Error: inconsistent link between an external ghost box and an internal ghost box" << "\n";
578
					return false;
579
				}
580 581 582 583 584
			}
		}

		return true;
	}
incardon's avatar
incardon committed
585 586 587

	/*! \brief Check if the ie_loc_ghosts contain the same information
	 *
incardon's avatar
incardon committed
588 589 590
	 * \param ilg Element to check
	 *
	 * \return true if they match
incardon's avatar
incardon committed
591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627
	 *
	 */
	bool is_equal(ie_loc_ghost<dim,T> & ilg)
	{
		if (ilg.loc_ghost_box.size() != loc_ghost_box.size())
			return false;

		// Explore all the subdomains
		for (size_t i = 0 ; i < loc_ghost_box.size() ; i++)
		{
			if (getLocalNIGhost(i) != ilg.getLocalNIGhost(i))
				return false;

			if (getLocalNEGhost(i) != ilg.getLocalNEGhost(i))
				return false;

			for (size_t j = 0 ; j < getLocalNIGhost(i) ; j++)
			{
				if (getLocalIGhostE(i,j) != ilg.getLocalIGhostE(i,j))
					return false;
				if (getLocalIGhostBox(i,j) != ilg.getLocalIGhostBox(i,j))
					return false;
				if (getLocalIGhostSub(i,j) != ilg.getLocalIGhostSub(i,j))
					return false;
			}
			for (size_t j = 0 ; j < getLocalNEGhost(i) ; j++)
			{
				if (getLocalEGhostBox(i,j) != ilg.getLocalEGhostBox(i,j))
					return false;
				if (getLocalEGhostSub(i,j) != ilg.getLocalEGhostSub(i,j))
					return false;
			}

		}

		return true;
	}
628 629 630 631 632 633



	/*! \brief Check if the ie_loc_ghosts contain the same information
	 * with the exception of the ghost part
	 *
incardon's avatar
incardon committed
634 635 636 637
	 * \param ilg Element to check
	 *
	 * \return true if the two objects are equal with the exception of the
	 *         ghost part
638 639 640 641 642 643
	 *
	 */
	bool is_equal_ng(ie_loc_ghost<dim,T> & ilg)
	{
		return true;
	}
644 645 646 647 648 649 650 651 652

	/*! \brief Reset the ie_loc_ghost
	 *
	 */
	void reset()
	{
		loc_ghost_box.clear();
		sub_domains_tmp.clear();
	}
653 654 655 656
};


#endif /* SRC_DECOMPOSITION_GHOST_DEC_IE_GHOST_HPP_ */