Combtooth.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 COMBTOOTH_H
6 #define COMBTOOTH_H
7 
8 #include "BaseWall.h"
9 #include "Math/Vector.h"
10 #include <cmath>
11 
12 class Combtooth : public BaseWall
13 {
14 public:
18  Combtooth();
19 
23  Combtooth(const Combtooth& ct);
24 
28  ~Combtooth() override;
29 
33  void set(Vec3D axis, Vec3D position, Mdouble radius);
34 
38  Combtooth* copy() const override;
39 
41  Mdouble& distance, Vec3D& normal_return) const override;
42 
44  unsigned timeStamp,
45  InteractionHandler* interactionHandler) override;
46 
47  void read(std::istream& is) override;
48 
49  void write(std::ostream& os) const override;
50 
51  std::string getName() const override;
52 
53 private:
54  Vec3D axis_; // unit vector pointing in direction of axis
55  Vec3D position_; // position vector of a point that the axis goes through
57 
58 };
59 
60 #endif
float * p
Definition: Tutorial_Map_using.cpp:9
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:39
Definition: BaseParticle.h:33
Basic class for walls.
Definition: BaseWall.h:28
Definition: Combtooth.h:13
Vec3D axis_
Definition: Combtooth.h:54
Mdouble radius_
Definition: Combtooth.h:56
Vec3D position_
Definition: Combtooth.h:55
~Combtooth() override
Default destructor.
void set(Vec3D axis, Vec3D position, Mdouble radius)
Set.
Definition: Combtooth.cc:29
void write(std::ostream &os) const override
Function that writes a BaseWall to an output stream, usually a restart file.
Definition: Combtooth.cc:89
BaseInteraction * getInteractionWith(BaseParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler) override
Returns the interaction between this wall and a given particle, nullptr if there is no interaction.
Definition: Combtooth.cc:61
Combtooth * copy() const override
Copy.
Definition: Combtooth.cc:36
bool getDistanceAndNormal(const BaseParticle &p, Mdouble &distance, Vec3D &normal_return) const override
Pure virtual function that computes the distance of a BaseParticle to this wall and returns the norma...
Definition: Combtooth.cc:41
Combtooth()
Default constructor.
Definition: Combtooth.cc:10
std::string getName() const override
A purely virtual function.
Definition: Combtooth.cc:97
void read(std::istream &is) override
Function that reads a BaseWall from an input stream, usually a restart file.
Definition: Combtooth.cc:80
Container to store Interaction objects.
Definition: InteractionHandler.h:25
Definition: Kernel/Math/Vector.h:30
radius
Definition: UniformPSDSelfTest.py:15
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286