28 typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> dmatrix_t;
50 C(
int argc,
char const *argv[])
51 : m_kernel(kernel_t::field_variance_t(1.0), .1)
53 , m_mesh(NiHu::read_off_mesh(argv[1],
elem_tag_t()))
54 , m_space(NiHu::constant_view(m_mesh))
55 , m_tree(NiHu::fmm::create_elem_center_iterator(m_mesh.begin<
elem_t>()),
56 NiHu::fmm::create_elem_center_iterator(m_mesh.end<
elem_t>()),
61 m_tree[i].set_chebyshev_order(5);
63 auto int_fctr = NiHu::fmm::create_integrated_functor(
66 auto idx_fctr = NiHu::fmm::create_indexed_functor(
73 auto pre_fctr = NiHu::fmm::create_precompute_functor(m_tree, m_lists);
75 m_mat =
new mat_t(NiHu::fmm::create_fmm_matrix(
76 pre_fctr(idx_fctr(int_fctr(m_bbfmm.
create_p2p()))),
77 pre_fctr(idx_fctr(int_fctr(m_bbfmm.
create_p2m()))),
78 pre_fctr(idx_fctr(int_fctr(m_bbfmm.
create_p2l()))),
79 pre_fctr(idx_fctr(int_fctr(m_bbfmm.
create_m2p()))),
80 pre_fctr(idx_fctr(int_fctr(m_bbfmm.
create_l2p()))),
87 Eigen::Matrix<double, Eigen::Dynamic, 1> xct(m_mat->
cols(), 1);
89 auto res = (*m_mat) * xct;
93 std::cout << res << std::endl;
107 int main(
int argc,
char const *argv[])
Metafunction assigning a tag to a type.
class describing a volume element that has no normal vector
auto create_p2m() const
return the p2m operator instance
Black box FMM for a smooth kernel.
A mesh extended with a Field generating option.
auto create_l2p() const
return the l2p operator instance
size_t get_n_clusters() const
return number of clusters
Precomputed P2P operator.
Cluster class of the Black Box FMM.
Implementation of kernels representing covariance functions of stochastic processes.
Operator pre-computation interface.
traits_t::template iterator< FieldType >::type field_end() const
last field of given element type
auto create_m2p() const
return the m2p operator instance
Matrix representation of the FMM method.
Precomputation for M2M, M2L, and L2L operators.
Class representing a cluster division based on number of nodes.
m2l create_m2l() const
return the m2l operator instance
Implementation of class NiHu::fmm::cluster_tree.
Definition of class NiHu::fmm::interaction_lists.
export NiHu mesh from OFF format
Integrated operators (P2P, P2X, X2P)
Cluster division strategies.
Implementation of NiHu::fmm::fmm_operator_collection.
auto create_p2p() const
return the p2p operator instance
Implementation of the Black Box FMM using Chebyshev interpolation.
traits_t::template iterator< FieldType >::type field_begin() const
first field of given element type
Field automatically generated from an element using a field generation option.
Classes for iterating through elements and fields.
Class NiHu::fmm::fmm_matrix.
declaration of class function_space
size_t cols() const
return number of columns of the matrix
container class for a mesh
class storing the different interaction lists of a tree
Interface for indexing FMM operators.
l2l create_l2l() const
return the l2l operator instance
p2l create_p2l() const
return the p2l operator instance
m2m create_m2m() const
return the m2m operator instance