Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

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 {
41 public:
43  LinearQuadtreeExpansion(uint32_t precision, const LinearQuadtree& tree);
44 
47 
49  void P2M(uint32_t point, uint32_t receiver);
50 
52  void M2M(uint32_t source, uint32_t receiver);
53 
55  void M2L(uint32_t source, uint32_t receiver);
56 
58  void L2L(uint32_t source, uint32_t receiver);
59 
61  void L2P(uint32_t source, uint32_t point, float& fx, float& fy);
62 
64  uint32_t sizeInBytes() const { return m_numExp*m_numCoeff*(uint32_t)sizeof(double)*4; }
65 
67  inline double* multiExp() const { return m_multiExp; }
68 
70  inline double* localExp() const { return m_localExp; }
71 
73  inline uint32_t numCoeff() const { return m_numCoeff; }
74 
76  const LinearQuadtree& tree() { return m_tree; }
77 private:
78 
80  void allocate();
81 
83  void deallocate();
84 
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:73
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:86
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:64
ogdf::fast_multipole_embedder::LinearQuadtreeExpansion::tree
const LinearQuadtree & tree()
the quadtree
Definition: LinearQuadtreeExpansion.h:76
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:67
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:70
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...