1 | #include "Space/SpaceBox.hpp" |
2 | |
3 | #ifndef DECOMPOSITION_HPP_ |
4 | #define DECOMPOSITION_HPP_ |
5 | |
6 | /** |
7 | * |
8 | * \brief class that store Internal part external and border part of a dataset |
9 | * |
10 | */ |
11 | |
12 | template <typename T> class dataDiv |
13 | { |
14 | //! Border part of the data |
15 | boost::shared_ptr<T> bord; |
16 | //! internal part of your data |
17 | boost::shared_ptr<T> inte; |
18 | //! external part of your data |
19 | boost::shared_ptr<T> ext; |
20 | }; |
21 | |
22 | /*! \brief This class define the domain decomposition interface |
23 | * |
24 | * This class define the domain decomposition interface, its main functionality |
25 | * is to divide a domain in several subspaces |
26 | * |
27 | * \tparam T structure that store the dataset |
28 | * \tparam S type of space is decomposing Real integer complex ... |
29 | * |
30 | */ |
31 | |
32 | template<typename T, typename S> |
33 | class Decomposition |
34 | { |
35 | /*! \brief The the internal part of the data set, or the data that |
36 | * does not depend from the ghosts layers |
37 | * |
38 | * \return The internal part of the dataset |
39 | * |
40 | */ |
41 | virtual T getInternal(); |
42 | |
43 | |
44 | /*! Get the ghost part of the dataset |
45 | * |
46 | * \return The internal part of the dataset |
47 | * |
48 | */ |
49 | virtual T getBorder(); |
50 | |
51 | /*! Get the external part of the dataset (outside the ghost) |
52 | * |
53 | * \return The external part of the dataset |
54 | * |
55 | */ |
56 | virtual T getExternal(); |
57 | |
58 | //! divide the dataset from internal part and border |
59 | virtual dataDiv<T> divide(); |
60 | |
61 | //! Get the number of hyper-cube the space id is divided into |
62 | virtual size_t getNHyperCube(size_t id); |
63 | |
64 | //! Get the hyper-cube margins |
65 | virtual std::vector<T> & getHyperCube(size_t id, size_t id_c); |
66 | |
67 | //! destructor |
68 | virtual ~Decomposition(){} |
69 | }; |
70 | |
71 | #endif |
72 | |