Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

LinearQuadtreeExpansion.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 namespace ogdf {
37 namespace fast_multipole_embedder {
38 
40 public:
42  LinearQuadtreeExpansion(uint32_t precision, const LinearQuadtree& tree);
43 
46 
48  void P2M(uint32_t point, uint32_t receiver);
49 
51  void M2M(uint32_t source, uint32_t receiver);
52 
54  void M2L(uint32_t source, uint32_t receiver);
55 
57  void L2L(uint32_t source, uint32_t receiver);
58 
60  void L2P(uint32_t source, uint32_t point, float& fx, float& fy);
61 
63  uint32_t sizeInBytes() const { return m_numExp * m_numCoeff * (uint32_t)sizeof(double) * 4; }
64 
66  inline double* multiExp() const { return m_multiExp; }
67 
69  inline double* localExp() const { return m_localExp; }
70 
72  inline uint32_t numCoeff() const { return m_numCoeff; }
73 
75  const LinearQuadtree& tree() { return m_tree; }
76 
77 private:
79  void allocate();
80 
82  void deallocate();
83 
86 
87 public:
89  double* m_multiExp;
90 
92  double* m_localExp;
93 
94 public:
96  uint32_t m_numExp;
97 
99  uint32_t m_numCoeff;
100 
102 };
103 
104 }
105 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
LinearQuadtree.h
Declaration of class LinearQuadtree.
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::allocate
void allocate()
allocates the space for the coeffs
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::numCoeff
uint32_t numCoeff() const
number of coefficients per expansions
Definition: LinearQuadtreeExpansion.h:72
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion
Definition: LinearQuadtreeExpansion.h:39
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::P2M
void P2M(uint32_t point, uint32_t receiver)
adds a point with the given charge to the receiver expansion
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::L2L
void L2L(uint32_t source, uint32_t receiver)
shifts the source local coefficient to the center of the receiver and adds them
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::m_numExp
uint32_t m_numExp
the number of multipole (locale) expansions
Definition: LinearQuadtreeExpansion.h:96
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::m_localExp
double * m_localExp
the big local expansion coeff array
Definition: LinearQuadtreeExpansion.h:92
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::binCoef
BinCoeff< double > binCoef
Definition: LinearQuadtreeExpansion.h:101
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::m_tree
const LinearQuadtree & m_tree
the Quadtree reference
Definition: LinearQuadtreeExpansion.h:85
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::m_multiExp
double * m_multiExp
the big multipole expansione coeff array
Definition: LinearQuadtreeExpansion.h:89
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::~LinearQuadtreeExpansion
~LinearQuadtreeExpansion(void)
destructor
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::sizeInBytes
uint32_t sizeInBytes() const
returns the size in bytes
Definition: LinearQuadtreeExpansion.h:63
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::tree
const LinearQuadtree & tree()
the quadtree
Definition: LinearQuadtreeExpansion.h:75
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::deallocate
void deallocate()
releases the memory for the coeffs
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::M2M
void M2M(uint32_t source, uint32_t receiver)
shifts the source multipole coefficient to the center of the receiver and adds them
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::multiExp
double * multiExp() const
returns the array with multipole coefficients
Definition: LinearQuadtreeExpansion.h:66
ogdf::fast_multipole_embedder::LinearQuadtree
Definition: LinearQuadtree.h:47
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::m_numCoeff
uint32_t m_numCoeff
the number of coeff per expansions
Definition: LinearQuadtreeExpansion.h:99
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::LinearQuadtreeExpansion
LinearQuadtreeExpansion(uint32_t precision, const LinearQuadtree &tree)
constructor
ogdf::fast_multipole_embedder::BinCoeff< double >
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::localExp
double * localExp() const
returns the array with local coefficients
Definition: LinearQuadtreeExpansion.h:69
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::L2P
void L2P(uint32_t source, uint32_t point, float &fx, float &fy)
evaluates the derivate of the local expansion at the point and adds the forces to fx fy
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::M2L
void M2L(uint32_t source, uint32_t receiver)
converts the source multipole coefficient in to a local coefficients at the center of the receiver an...