CircularPeriodicBoundary.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
5 #ifndef CircularPeriodicBoundary_H
6 #define CircularPeriodicBoundary_H
7 
8 #include "BaseBoundary.h"
9 
10 class ParticleHandler;
11 
12 class BaseParticle;
13 
19 {
20 public:
25 
29  explicit CircularPeriodicBoundary(double innerRadius);
30 
34  ~CircularPeriodicBoundary() override;
35 
39  CircularPeriodicBoundary* copy() const override;
40 
45  void rotateParticle(BaseParticle* P, double angle);
46 
52 
53  void createPeriodicParticles(ParticleHandler& pH) override;
54 
59 
62 
66  void read(std::istream& is) override;
67 
71  void oldRead(std::istream& is);
72 
76  void write(std::ostream& os) const override;
77 
82  std::string getName() const override;
83 
84 private:
85 
89  double innerRadius_;
90 
91  //A particle is between to Radii in plane (i) and has two (straight) walls (plane 0 defines centre)
92  //If it is close to its inner Radius it should be copied once with a positive rotation of 2*pi/2^i
93  //If it is close to one of its straight walls is should be rotative with +/- 2*pi/2^i
94 
95  //Particles can only apply forces to real particles
96 
97  //If a particle crosses a straight wall it should simply be shifted
98  //If a particle crosses its inner Radius it should be copied
99  //If a particle crosses its outer Radius it may need to be deleted
100 
101 };
102 
103 #endif
float * p
Definition: Tutorial_Map_using.cpp:9
Definition: BaseBoundary.h:28
Definition: BaseParticle.h:33
used to create a circular periodic boundary
Definition: CircularPeriodicBoundary.h:19
CircularPeriodicBoundary()
default constructor
Definition: CircularPeriodicBoundary.cc:9
~CircularPeriodicBoundary() override
destructor
Definition: CircularPeriodicBoundary.cc:34
void oldRead(std::istream &is)
Definition: CircularPeriodicBoundary.cc:212
bool checkBoundaryAfterParticleMoved(BaseParticle *P, ParticleHandler &pH)
Definition: CircularPeriodicBoundary.cc:121
CircularPeriodicBoundary * copy() const override
Used to create a copy of the object NB: purely virtual function.
Definition: CircularPeriodicBoundary.cc:41
void read(std::istream &is) override
reads the CircularPeriodicBoundary
Definition: CircularPeriodicBoundary.cc:205
void createPeriodicParticles(ParticleHandler &pH) override
Definition: CircularPeriodicBoundary.cc:112
void checkBoundaryAfterParticlesMove(ParticleHandler &pH) override
Definition: CircularPeriodicBoundary.cc:194
double innerRadius_
Definition: CircularPeriodicBoundary.h:89
std::string getName() const override
Returns the name of the object.
Definition: CircularPeriodicBoundary.cc:224
void write(std::ostream &os) const override
outputs the CircularPeriodicBoundary
Definition: CircularPeriodicBoundary.cc:218
void createPeriodicParticle(BaseParticle *p, ParticleHandler &pH) override
Definition: CircularPeriodicBoundary.cc:63
void rotateParticle(BaseParticle *P, double angle)
Definition: CircularPeriodicBoundary.cc:49
Container to store pointers to all particles.
Definition: ParticleHandler.h:28
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:77
double angle(const double &t)
Angular position as a function of time t.
Definition: jeffery_orbit.cc:98
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286