NiHu
2.0
|
Matrix representation of the FMM method. More...
#include <fmm_matrix.hpp>
Public Types | |
typedef std::decay< P2P >::type | p2p_t |
typedef std::decay< P2M >::type | p2m_t |
typedef std::decay< P2L >::type | p2l_t |
typedef std::decay< M2P >::type | m2p_t |
typedef std::decay< L2P >::type | l2p_t |
typedef std::decay< M2M >::type | m2m_t |
typedef std::decay< L2L >::type | l2l_t |
typedef std::decay< M2L >::type | m2l_t |
typedef m2l_t::cluster_t | cluster_t |
typedef cluster_t::multipole_t | multipole_t |
typedef cluster_t::local_t | local_t |
typedef p2p_t::sparse_t | sparse_t |
typedef scalar< sparse_t >::type | scalar_t |
typedef Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > | excitation_t |
typedef Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > | response_t |
typedef cluster_tree< cluster_t > | cluster_tree_t |
Public Member Functions | |
fmm_matrix (P2P &&p2p, P2M &&p2m, P2L &&p2l, M2P &&m2p, L2P &&l2p, M2M &&m2m, L2L &&l2l, M2L &&m2l, cluster_tree_t const &tree, interaction_lists const &lists) | |
constructor from operator instances More... | |
void | set_cut_ratio (double cut_ratio) |
set the cut ratio More... | |
double | get_cut_ratio () const |
return the cut ratio More... | |
size_t | get_dfs_cut_level () const |
determine cut level between bfs and dfs traverse sections More... | |
size_t | rows () const |
return number of rows of the matrix More... | |
size_t | cols () const |
return number of columns of the matrix More... | |
template<class RhsDerived > | |
void | reorder_excitation (Eigen::MatrixBase< RhsDerived > const &rhs) |
cluster-continuous reordering of the excitation data More... | |
void | upward_pass_dfs_rec (std::vector< multipole_t > &multipoles, size_t root) |
recursive depth first search single thread upward pass More... | |
void | downward_pass_dfs_rec (std::vector< local_t > &locals, std::vector< multipole_t > const &multipoles, size_t to) |
recursive depth first search single thread downward pass More... | |
void | upward_pass_dfs (std::vector< multipole_t > &multipoles) |
depth first search upward pass More... | |
void | downward_pass_dfs (std::vector< local_t > &locals, std::vector< multipole_t > const &multipoles) |
void | upward_pass_bfs (std::vector< multipole_t > &multipoles) |
void | upward_pass_bfs (std::vector< multipole_t > &multipoles, size_t lowest_to_level) |
void | downward_pass_bfs (std::vector< local_t > &locals, std::vector< multipole_t > const &multipoles) |
void | downward_pass_bfs (std::vector< local_t > &locals, std::vector< multipole_t > const &multipoles, size_t max_to_level) |
template<class Derived > | |
void | reorder_response (Eigen::MatrixBase< Derived > &lhs) const |
cluster-continuous inverse-reordering of the response data More... | |
template<class ExcType > | |
response_t | operator* (ExcType const &rhs) |
matrix vector multiplication More... | |
const fmm_timer & | get_timer () const |
fmm_timer & | get_timer () |
Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > | get_diagonal () const |
return the diagonal of the matrix ins a single column vector More... | |
Static Public Attributes | |
static const size_t | num_dof_per_src = p2p_t::num_dof_per_src |
number of DOF for a source node in the mesh | |
static const size_t | num_dof_per_rec = p2p_t::num_dof_per_rec |
number of DOF for a receiver node in the mesh | |
Matrix representation of the FMM method.
P2P | P2P operator type |
P2M | the P2M operator's type |
P2L | the P2L operator's type |
M2P | the M2P operator's type |
L2P | the L2P operator's type |
M2M | the M2M operator's type |
M2L | the M2L operator's type |
L2L | the L2L operator's type @ |
Definition at line 69 of file fmm_matrix.hpp.
|
inline |
constructor from operator instances
[in] | p2p | the P2P operator |
[in] | p2m | the P2M operator |
[in] | p2l | the P2L operator |
[in] | m2p | the M2P operator |
[in] | l2p | the L2P operator |
[in] | m2m | the M2M operator |
[in] | l2l | the L2L operator |
[in] | m2l | the M2L operator |
[in] | tree | the cluster tree |
[in] | lists | the interaction lists |
Definition at line 108 of file fmm_matrix.hpp.
|
inline |
return number of columns of the matrix
Definition at line 191 of file fmm_matrix.hpp.
|
inline |
recursive depth first search single thread downward pass
[in,out] | locals | the vector of local contributions |
[in] | multipoles | the vector of multipole contributions |
[in] | to | index of the destination cluster |
this function comutes M2L and L2L interactions to the "to" cluster, and calls itself or each child of the "to" cluster recursively
Definition at line 238 of file fmm_matrix.hpp.
|
inline |
return the cut ratio
the cut ratio is the number of clusters on the cut level divided by the number of threads
Definition at line 156 of file fmm_matrix.hpp.
|
inline |
determine cut level between bfs and dfs traverse sections
Definition at line 163 of file fmm_matrix.hpp.
|
inline |
return the diagonal of the matrix ins a single column vector
Definition at line 588 of file fmm_matrix.hpp.
|
inline |
matrix vector multiplication
[in] | rhs | the excitation vector |
Definition at line 404 of file fmm_matrix.hpp.
|
inline |
cluster-continuous reordering of the excitation data
after reordering, the data associated with a specific cluster can be reached as a continuous block (segment) of the internally stored excitation vector
[in] | rhs | the right hand side vector |
Definition at line 201 of file fmm_matrix.hpp.
|
inline |
cluster-continuous inverse-reordering of the response data
after reordering, the response data contains the response in the same order as defined by the excitation
[out] | lhs | the response vector |
Definition at line 386 of file fmm_matrix.hpp.
|
inline |
return number of rows of the matrix
Definition at line 184 of file fmm_matrix.hpp.
|
inline |
set the cut ratio
cut_ratio | the cut ratio to be set |
The cut ratio is the number of clusters on the cut level divided by the number of threads
Definition at line 147 of file fmm_matrix.hpp.
|
inline |
depth first search upward pass
[in,out] | multipoles | the vector of multipole contributions |
Definition at line 256 of file fmm_matrix.hpp.
|
inline |
recursive depth first search single thread upward pass
[in,out] | multipoles | the vector of multipole contributions |
[in] | root | index of the root cluster |
this upward pass computes the multipole contribution in the root cluster by recursively evaluating M2M interactions
Definition at line 220 of file fmm_matrix.hpp.