NonSphericalParticle.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 NonSphericalParticle_H
6 #define NonSphericalParticle_H
7 
8 
9 #include "BaseParticle.h"
10 
16 {
17 public:
21  NonSphericalParticle() = default;
22 
27 
33 
37  ~NonSphericalParticle() override = default;
38 
42  NonSphericalParticle* copy() const override = 0;
43 
47  std::string getName() const override = 0;
48 
52  bool isSphericalParticle() const override {
53  return false;
54  }
55 
60  virtual Mdouble getKineticEnergy() const override{
62  }
63 
64  virtual Mdouble getRotationalEnergy() const override{
66  }
67 
71  virtual Mdouble getSurfaceArea() const override
72  {
73  logger(ERROR, "This function is not implemented for non-spherical particles!");
74  return 0.0;
75  }
76 
77 };
78 
79 #endif
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
@ ERROR
float * p
Definition: Tutorial_Map_using.cpp:9
Definition: BaseParticle.h:33
virtual Mdouble getKineticEnergy() const
Calculates the particle's translational kinetic energy.
Definition: BaseParticle.cc:446
virtual Mdouble getRotationalEnergy() const
Calculates the particle's rotational kinetic energy.
Definition: BaseParticle.cc:455
Base class for all non-spherical particle types.
Definition: NonSphericalParticle.h:16
virtual Mdouble getSurfaceArea() const override
Definition: NonSphericalParticle.h:71
virtual Mdouble getKineticEnergy() const override
Definition: NonSphericalParticle.h:60
std::string getName() const override=0
NonSphericalParticle(const BaseParticle &p)
Base class copy constructor. Creates a NonSphericalParticle particle from a BaseParticle.
Definition: NonSphericalParticle.h:32
virtual Mdouble getRotationalEnergy() const override
Calculates the particle's rotational kinetic energy.
Definition: NonSphericalParticle.h:64
bool isSphericalParticle() const override
Definition: NonSphericalParticle.h:52
NonSphericalParticle()=default
NonSphericalParticle * copy() const override=0
NonSphericalParticle(const NonSphericalParticle &p)=default
~NonSphericalParticle() override=default
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286