SubcriticalMaserBoundaryTEST.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 SUBCRITICALMASERBOUNDARYTEST_H
6 #define SUBCRITICALMASERBOUNDARYTEST_H
7 
10 
11 class ParticleSpecies;
12 
14 {
15 public:
20 
25 
29  SubcriticalMaserBoundaryTEST* copy() const override;
30 
34  void read(std::istream& is) override;
35 
39  void write(std::ostream& os) const override;
40 
44  std::string getName() const override;
45 
46  void actionsBeforeTimeLoop() override;
47 
53 
60 
65 
69  void activateMaser();
70 
74  void deactivateMaser();
75 
79  bool isActivated() const;
80 
84  void setActivationTime(Mdouble time);
85 
89  Mdouble getDistance(const Vec3D& position) const override;
90 
94  Mdouble getDistanceFromRight(const Vec3D& position) const;
95 
99  void modifyPeriodicComplexity(std::vector<int>& complexity, int& totalPeriodicComplexity,
100  BaseParticle* particle, int i) const override;
101 
102  void modifyGhostAfterCreation(BaseParticle* particle, int i) override;
103 
104 
108  void performActionsBeforeAddingParticles() override;
109 
110  void extendBottom() const;
111 
112  void copyExtraParticles() const;
113 
114  void setCopyFlowParticles(bool copyFlowParticles);
115 
116 private:
121 
126 
131 
132 };
133 
134 #endif
int i
Definition: BiCGSTAB_step_by_step.cpp:9
float * p
Definition: Tutorial_Map_using.cpp:9
Definition: BaseParticle.h:33
Container to store pointers to all particles.
Definition: ParticleHandler.h:28
Definition: ParticleSpecies.h:16
Defines a pair of periodic walls. Inherits from BaseBoundary.
Definition: PeriodicBoundary.h:20
Definition: SubcriticalMaserBoundaryTEST.h:14
void deactivateMaser()
Stops copying particles, and act merely as a periodic domain.
Definition: SubcriticalMaserBoundaryTEST.cc:239
Mdouble getDistance(const Vec3D &position) const override
gets the distance to the closest wall if maser is inactive, otherwise distance to right wall
Definition: SubcriticalMaserBoundaryTEST.cc:284
void actionsBeforeTimeLoop() override
Definition: SubcriticalMaserBoundaryTEST.cc:79
void setActivationTime(Mdouble time)
sets the activate time of the maser
Definition: SubcriticalMaserBoundaryTEST.cc:271
Mdouble getDistanceFromRight(const Vec3D &position) const
returns the distance to the right wall
Definition: SubcriticalMaserBoundaryTEST.cc:301
void modifyPeriodicComplexity(std::vector< int > &complexity, int &totalPeriodicComplexity, BaseParticle *particle, int i) const override
modifies the periodic complexity to support a maser boundary
Definition: SubcriticalMaserBoundaryTEST.cc:318
void checkBoundaryAfterParticlesMove(ParticleHandler &pH) override
Evaluates what the particles have to do after they have changed position.
Definition: SubcriticalMaserBoundaryTEST.cc:177
void setCopyFlowParticles(bool copyFlowParticles)
Definition: SubcriticalMaserBoundaryTEST.cc:71
std::string getName() const override
Returns the name of the object.
Definition: SubcriticalMaserBoundaryTEST.cc:66
void extendBottom() const
Definition: SubcriticalMaserBoundaryTEST.cc:388
void write(std::ostream &os) const override
writes boundary properties to ostream
Definition: SubcriticalMaserBoundaryTEST.cc:55
bool checkBoundaryAfterParticleMoved(BaseParticle *p, ParticleHandler &pH) const
Shifts the particle to its 'periodic' position if it is a maser particle and has crossed either of th...
Definition: SubcriticalMaserBoundaryTEST.cc:139
Mdouble activationTime_
Time at which the maser opens.
Definition: SubcriticalMaserBoundaryTEST.h:125
void copyExtraParticles() const
Definition: SubcriticalMaserBoundaryTEST.cc:480
~SubcriticalMaserBoundaryTEST() override
destructor
Definition: SubcriticalMaserBoundaryTEST.cc:23
SubcriticalMaserBoundaryTEST()
MaserBoundary constructor.
Definition: SubcriticalMaserBoundaryTEST.cc:11
void activateMaser()
Activates the maser functionaly of this periodic boundary.
Definition: SubcriticalMaserBoundaryTEST.cc:209
void performActionsBeforeAddingParticles() override
Checks before adding particles if the maser needs to be activated.
Definition: SubcriticalMaserBoundaryTEST.cc:371
void read(std::istream &is) override
reads boundary properties from istream
Definition: SubcriticalMaserBoundaryTEST.cc:42
bool maserIsActivated_
Flag whether or not the gap is created and particles transformed already.
Definition: SubcriticalMaserBoundaryTEST.h:120
bool isActivated() const
Returns whether the maser is activated or not.
Definition: SubcriticalMaserBoundaryTEST.cc:261
SubcriticalMaserBoundaryTEST * copy() const override
Creates a copy of this maser on the heap.
Definition: SubcriticalMaserBoundaryTEST.cc:33
void createPeriodicParticle(BaseParticle *p, ParticleHandler &pH) override
Creates periodic particles when the particle is a maser particle and is sufficiently close to one of ...
Definition: SubcriticalMaserBoundaryTEST.cc:105
bool copyFlowParticles_
Flag for whether or not we copy a few blocks of flow particles in the front when activating the maser...
Definition: SubcriticalMaserBoundaryTEST.h:130
void modifyGhostAfterCreation(BaseParticle *particle, int i) override
Definition: SubcriticalMaserBoundaryTEST.cc:352
Definition: Kernel/Math/Vector.h:30
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286