Template Class FmmBase

Inheritance Relationships

Derived Types

Class Documentation

template<typename T>
class exafmm_t::FmmBase

Base FMM class.

Subclassed by exafmm_t::DummyFmm< T >, exafmm_t::Fmm< T >, exafmm_t::FmmScaleInvariant< T >

Public Functions

inline FmmBase()
inline FmmBase(int p_, int ncrit_, std::string filename_ = std::string())
virtual void potential_P2P(RealVec &src_coord, std::vector<T> &src_value, RealVec &trg_coord, std::vector<T> &trg_value) = 0
virtual void gradient_P2P(RealVec &src_coord, std::vector<T> &src_value, RealVec &trg_coord, std::vector<T> &trg_value) = 0
virtual void M2L(Nodes<T> &nodes) = 0

M2L operator.

virtual void M2M(Node<T> *node) = 0

M2M operator.

virtual void L2L(Node<T> *node) = 0

L2L operator.

virtual void P2M(NodePtrs<T> &leafs) = 0

P2M operator.

virtual void L2P(NodePtrs<T> &leafs) = 0

L2P operator.

inline void kernel_matrix(RealVec &src_coord, RealVec &trg_coord, std::vector<T> &matrix)

Compute the kernel matrix of a given kernel.

Parameters
  • src_coord – Vector of source coordinates.

  • trg_coord – Vector of target coordinates.

  • matrix – Kernel matrix.

inline void P2P(NodePtrs<T> &leafs)

P2P operator.

inline void M2P(NodePtrs<T> &leafs)

M2P operator.

inline void P2L(Nodes<T> &nodes)

P2L operator.

inline void upward_pass(Nodes<T> &nodes, NodePtrs<T> &leafs, bool verbose = true)

Evaluate upward equivalent charges for all nodes in a post-order traversal.

Parameters
  • nodes – Vector of all nodes.

  • leafs – Vector of pointers to leaf nodes.

inline void downward_pass(Nodes<T> &nodes, NodePtrs<T> &leafs, bool verbose = true)

Evaluate potentials and gradients for all targets in a pre-order traversal.

Parameters
  • nodes – Vector of all nodes.

  • leafs – Vector of pointers to leaf nodes.

inline RealVec verify(NodePtrs<T> &leafs, bool sample = false)

Check FMM accuracy.

Parameters

leafs – Vector of leaves.

Returns

The relative error of potential and gradient in L2 norm.

Public Members

int p

Order of expansion.

int nsurf

Number of points on equivalent / check surface.

int nconv

Number of points on convolution grid.

int nfreq

Number of coefficients in DFT (depending on whether T is real_t)

int ncrit

Max number of bodies per leaf.

int depth

Depth of the tree.

real_t r0

Half of the side length of the bounding box.

vec3 x0

Coordinates of the center of root box.

bool is_precomputed

Whether the matrix file is found.

bool is_real

Whether template parameter T is real_t.

std::string filename

File name of the precomputation matrices.