Decomposition.hpp 1.54 KB
Newer Older
incardon's avatar
incardon committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
#include "Space/SpaceBox.hpp"

#ifndef DECOMPOSITION_HPP_
#define DECOMPOSITION_HPP_

/**
 *
 * \brief class that store Internal part external and border part of a dataset
 *
 */

template <typename T> class dataDiv
{
	//! Border part of the data
	boost::shared_ptr<T> bord;
	//! internal part of your data
	boost::shared_ptr<T> inte;
	//! external part of your data
	boost::shared_ptr<T> ext;
};

/*! \brief This class define the domain decomposition interface
 *
 * This class define the domain decomposition interface, its main functionality
 * is to divide a domain in several subspaces
 *
 * \tparam T structure that store the dataset
 * \tparam S type of space is decomposing Real integer complex ...
 *
 */

template<typename T, typename S>
class Decomposition
{
	/*! \brief The the internal part of the data set, or the data that
	 * does not depend from the ghosts layers
	 *
	 * \return The internal part of the dataset
	 *
	 */
	virtual T getInternal();


	/*! Get the ghost part of the dataset
	 *
	 * \return The internal part of the dataset
	 *
	 */
	virtual T getBorder();

	/*! Get the external part of the dataset (outside the ghost)
	 *
	 * \return The external part of the dataset
	 *
	 */
	virtual T getExternal();

	//! divide the dataset from internal part and border
	virtual dataDiv<T> divide();

	//! Get the number of hyper-cube the space id is divided into
	virtual size_t getNHyperCube(size_t id);

	//! Get the hyper-cube margins
	virtual std::vector<T> & getHyperCube(size_t id, size_t id_c);

	//! destructor
	virtual ~Decomposition(){}
};

#endif