NiHu
2.0
|
CRTP base class of clusters. More...
#include <cluster.hpp>
Public Types | |
typedef cluster_traits< Derived > | traits_t |
Traits structure. | |
typedef bounding_box< dimension, double > | bounding_box_t |
Bounding box type. | |
typedef bounding_box_t::location_t | location_t |
Location type. | |
typedef std::vector< size_t > | idx_list_t |
Index list type for storing children and contained nodes. | |
typedef traits_t::multipole_t | multipole_t |
Multipole type. | |
typedef traits_t::local_t | local_t |
Local type. | |
Public Member Functions | |
NIHU_CRTP_HELPERS void | set_level (size_t level) |
Set cluster's level. More... | |
size_t | get_level () const |
Get cluster's level. More... | |
void | set_parent (size_t parent) |
Set the parent cluster's index. More... | |
size_t | get_parent () const |
return parent cluster's index More... | |
void | set_bounding_box (bounding_box_t const &bb) |
set the cluster's bounding box More... | |
const bounding_box_t & | get_bounding_box () const |
return cluster's bounding box More... | |
void | set_src_node_idx (idx_list_t const &node_idx) |
set indices of source nodes More... | |
template<class ForwardIt > | |
void | set_src_node_idx (ForwardIt begin, ForwardIt end) |
set indices of source nodes with range More... | |
const idx_list_t & | get_src_node_idx () const |
get indices of source nodes More... | |
size_t | get_n_src_nodes () const |
return number of sources contained in cluster More... | |
void | set_rec_node_idx (idx_list_t const &node_idx) |
set indices of receiver nodes More... | |
template<class ForwardIt > | |
void | set_rec_node_idx (ForwardIt begin, ForwardIt end) |
set indices of receiver nodes with range More... | |
const idx_list_t & | get_rec_node_idx () const |
get indices of receiver nodes More... | |
size_t | get_n_rec_nodes () const |
get number of receiver nodes contained in cluster More... | |
void | add_child (size_t child) |
add a new child to a cluster More... | |
const idx_list_t & | get_children () const |
get indices of children More... | |
bool | is_leaf () const |
indicates if cluster is leaf More... | |
bool | is_root () const |
indicates if cluster is root (0-level) More... | |
bool | is_source () const |
indicates if cluster is source More... | |
bool | is_receiver () const |
indicates if cluster is receiver More... | |
void | print_debug (std::ostream &os=std::cout) const |
prints debug information of the cluster to an output stream More... | |
multipole_t | zero_multipole () const |
return a cleared (zero) multipole contribution More... | |
local_t | zero_local () const |
return a cleared (zero) local contribution More... | |
Static Public Attributes | |
static const size_t | dimension = traits_t::dimension |
Space dimension. | |
CRTP base class of clusters.
Derived | CRTP derived class |
Definition at line 40 of file cluster.hpp.
|
inline |
add a new child to a cluster
[in] | child | the new child to add |
Does not add child if it is already contained
Definition at line 189 of file cluster.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
get number of receiver nodes contained in cluster
Definition at line 179 of file cluster.hpp.
|
inline |
return number of sources contained in cluster
Definition at line 145 of file cluster.hpp.
|
inline |
return parent cluster's index
Definition at line 95 of file cluster.hpp.
|
inline |
get indices of receiver nodes
Definition at line 171 of file cluster.hpp.
|
inline |
get indices of source nodes
Definition at line 137 of file cluster.hpp.
|
inline |
indicates if cluster is leaf
Definition at line 209 of file cluster.hpp.
|
inline |
indicates if cluster is receiver
Definition at line 235 of file cluster.hpp.
|
inline |
indicates if cluster is root (0-level)
Definition at line 217 of file cluster.hpp.
|
inline |
indicates if cluster is source
Definition at line 226 of file cluster.hpp.
|
inline |
prints debug information of the cluster to an output stream
[in] | os | the output stream |
Definition at line 243 of file cluster.hpp.
|
inline |
set the cluster's bounding box
[in] | bb | the bounding box |
Definition at line 103 of file cluster.hpp.
|
inline |
|
inline |
Set the parent cluster's index.
[in] | parent | the parent cluster's index |
Definition at line 87 of file cluster.hpp.
|
inline |
set indices of receiver nodes with range
[in] | begin | begin iterator |
[in] | end | end iterator |
Definition at line 163 of file cluster.hpp.
|
inline |
set indices of receiver nodes
[in] | node_idx | indices of receiver nodes |
Definition at line 153 of file cluster.hpp.
|
inline |
set indices of source nodes with range
[in] | begin | begin iterator |
[in] | end | end iterator |
Definition at line 129 of file cluster.hpp.
|
inline |
set indices of source nodes
[in] | node_idx | indices of source nodes |
Definition at line 119 of file cluster.hpp.
|
inline |
return a cleared (zero) local contribution
Definition at line 266 of file cluster.hpp.
|
inline |
return a cleared (zero) multipole contribution
Definition at line 258 of file cluster.hpp.