ls1-MarDyn
ls1-MarDyn molecular dynamics code
AdaptivePseudoParticleContainer.h
1#ifndef ADAPTIVEPSEUDOPARTICLECONTAINER_H_
2#define ADAPTIVEPSEUDOPARTICLECONTAINER_H_
3
4#include "bhfmm/utils/Vector3.h"
5#include "PseudoParticleContainer.h"
6#include "DttNode.h"
8
9#include <vector>
10#include <cmath>
11#include <math.h>
12#include <stdlib.h>
13
14
15
16namespace bhfmm {
17
18typedef struct {
19 DttNode *target, *source;
20 Vector3<double> shift;
22
24public:
25 AdaptivePseudoParticleContainer(double domainLength[3], int threshold,
26 int orderOfExpansions, bool periodic = true) :
27 PseudoParticleContainer(orderOfExpansions), _periodicBC(periodic), _threshold(
28 threshold), root(0), halo_node(0), _domainLength(
29 domainLength), _subdivisionFactor(0) {
30 mardyn_assert(_threshold > 0);
31 }
32
33 AdaptivePseudoParticleContainer(double domainLength[3],
34 int orderOfExpansions, double cellLength[3], int subdivisionFactor,
35 bool periodic) :
36 PseudoParticleContainer(orderOfExpansions), _periodicBC(periodic), _threshold(
37 0), root(0), _domainLength(domainLength), _cellLength(
38 cellLength), _subdivisionFactor(subdivisionFactor) {
39 }
40
42 delete root;
43 }
44 ;
45
46 void clear();
47 void build(ParticleContainer* pc);
48 void upwardPass(P2MCellProcessor * cp);
49 void horizontalPass(VectorizedChargeP2PCellProcessor * cp);
50 void downwardPass(L2PCellProcessor *cp);
51
52 void processMultipole(ParticleCellPointers& /*cell*/) {
53 }
54 void processFarField(ParticleCellPointers& /*cell*/) {
55 }
56 void processTree() {
57 }
58 void printTimers() {
59 }
60 ;
61
62private:
63 bool _periodicBC;
64
66 std::vector<Molecule *> _particles;
67 int _threshold;
68 std::vector<TargetSourceTupel> stack;
69 DttNode *root, *halo_node;
70 Vector3<double> _domainLength, _cellLength;
71 int _subdivisionFactor;
72
73 void buildHaloTrees();
74 void work_on_stack();
75 void push_on_stack(DttNode * trg, DttNode * src,
76 Vector3<double> shift, int split);
77 void print_stack_op(int op, DttNode * t = NULL,
78 DttNode * s = NULL);
79
80};
81//AdaptivePseudoParticleContainer
82
83}//nemspace bhfmm
84
85#endif //ADAPTIVEPSEUDOPARTICLECONTAINER_H_
VectorizedChargeP2PCellProcessor.h.
This Interface is used to get access to particles and pairs of particles.
Definition: ParticleContainer.h:69
Definition: AdaptivePseudoParticleContainer.h:23
Definition: DttNode.h:18
Definition: L2PCellProcessor.h:17
Definition: P2MCellProcessor.h:18
Definition: ParticleCellPointers.h:44
Definition: PseudoParticleContainer.h:46
Definition: Vector3.h:34
Vectorized calculation of the force.
Definition: VectorizedChargeP2PCellProcessor.h:32
Definition: L2PCellProcessor.cpp:15
Definition: AdaptivePseudoParticleContainer.h:18