SPHInteraction.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 SPHINTERACTION_H
6 #define SPHINTERACTION_H
7 
9 
10 class BaseInteractable;
11 
12 class SPHNormalSpecies;
13 
18 class SPHInteraction : public virtual BaseInteraction
19 {
20 public:
25 
29  SPHInteraction(BaseInteractable* P, BaseInteractable* I, unsigned timeStamp);
30 
31  //used for mpi
33 
38 
42  ~SPHInteraction() override;
46  //LinearViscoelasticInteraction* copy() const;
50  void computeNormalForce();
51 
55  void read(std::istream& is) override;
56 
60  void write(std::ostream& os) const override;
61 
65  std::string getBaseName() const;
66 
70  Mdouble getElasticEnergy() const override;
71 
75  const SPHNormalSpecies* getSpecies() const;
76 
78 
79  Mdouble getElasticEnergyAtEquilibrium(Mdouble adhesiveForce) const override;
80 
81 };
82 
83 #endif
float * p
Definition: Tutorial_Map_using.cpp:9
Defines the basic properties that a interactable object can have.
Definition: BaseInteractable.h:34
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:39
Enables the use of SPH particles within MercuryDPM.
Definition: SPHInteraction.h:19
Mdouble getElasticEnergyAtEquilibrium(Mdouble adhesiveForce) const override
Definition: SPHInteraction.cc:131
Mdouble getElasticEnergy() const override
Returns the amount of energy stored in the spring due to head on collision.
Definition: SPHInteraction.cc:113
std::string getBaseName() const
Returns the type/name of interaction (linear visco-elastic interaction).
Definition: SPHInteraction.cc:75
void write(std::ostream &os) const override
Interaction write function, which accepts an std::ostream as input.
Definition: SPHInteraction.cc:58
SPHInteraction()
Definition: SPHInteraction.cc:28
void read(std::istream &is) override
Interaction read function, which accepts an std::istream as input.
Definition: SPHInteraction.cc:67
const SPHNormalSpecies * getSpecies() const
Returns a const pointer of type LinearViscoelasticNormalSpecies*.
Definition: SPHInteraction.cc:124
void computeNormalForce()
Creates a copy of an object of this class. (Deep copy)
Definition: SPHInteraction.cc:83
void copyHistoryInteraction()
SPHNormalSpecies SpeciesType
An alias for SPHNormalSpecies.
Definition: SPHInteraction.h:24
~SPHInteraction() override
Destructor.
Definition: SPHInteraction.cc:47
SPHNormalSpecies contains the parameters used to describe a SPH model.
Definition: SPHNormalSpecies.h:18
#define I
Definition: main.h:127
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:77
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286