Math/Helpers.h
Go to the documentation of this file.
1 //Copyright (c) 2013-2023, The MercuryDPM Developers Team. All rights reserved.
2 //For the list of developers, see <http://www.MercuryDPM.org/Team>.
3 //
4 //Redistribution and use in source and binary forms, with or without
5 //modification, are permitted provided that the following conditions are met:
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above copyright
9 // notice, this list of conditions and the following disclaimer in the
10 // documentation and/or other materials provided with the distribution.
11 // * Neither the name MercuryDPM nor the
12 // names of its contributors may be used to endorse or promote products
13 // derived from this software without specific prior written permission.
14 //
15 //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 //ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 //WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 //DISCLAIMED. IN NO EVENT SHALL THE MERCURYDPM DEVELOPERS TEAM BE LIABLE FOR ANY
19 //DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 //(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 //LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 //ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 //(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 
26 #ifndef MECURYDPM_HELPERS_H
27 #define MECURYDPM_HELPERS_H
28 
35 #include "Helpers/Helpers.h"
36 
40 // /*!
41 // * \brief Set disp and k such that is matches a given collision time tc and restitution coefficient r
42 // * for a collision of effective/reduced mass m.
43 // * \deprecated use species->setCollisionTimeAndRestitutionCoefficient
44 // * (collisionTime, dissipationTimeScale, 2.0*effectiveMass) instead
45 // */
46 // MERCURYDPM_DEPRECATED
47 // KAndDisp computeKAndDispFromCollisionTimeAndRestitutionCoefficientAndEffectiveMass(Mdouble tc, Mdouble r, Mdouble mass);
48 //
49 // /*!
50 // * \brief Calculates the collision time for a given stiffness, dissipation, and effective mass
51 // * \deprecated use species->computeCollisionTime(2.0*effectiveMass) instead
52 // * \todo This does not result in the same value as the given alternative.
53 // */
54 // MERCURYDPM_DEPRECATED
55 // Mdouble computeCollisionTimeFromKAndDispAndEffectiveMass(Mdouble k, Mdouble disp, Mdouble mass);
56 //
57 // /*!
58 // * \brief Calculates the restitution coefficient time for a given stiffness, dissipation, and effective mass
59 // * \deprecated use species->computeRestitutionCoefficient(2.0*effectiveMass) instead
60 // */
61 // MERCURYDPM_DEPRECATED
62 // Mdouble computeRestitutionCoefficientFromKAndDispAndEffectiveMass(Mdouble k, Mdouble disp, Mdouble mass);
63 //
64 // /*!
65 // * \brief Calculates the dissipation for a given stiffness, restitution coefficient, and effective mass
66 // */
67 // MERCURYDPM_DEPRECATED
68 // Mdouble computeDispFromKAndRestitutionCoefficientAndEffectiveMass(Mdouble k, Mdouble r, Mdouble mass);
69 //
70 // /*!
71 // * \brief Calculates the collision time for a given stiffness, restitution coefficient, and effective mass
72 // * \deprecated use species->computeCollisionTime(2.0*effectiveMass) instead
73 // */
74 // MERCURYDPM_DEPRECATED
75 // Mdouble computeCollisionTimeFromKAndRestitutionCoefficientAndEffectiveMass(Mdouble k, Mdouble r, Mdouble mass);
76 //
77 // /*!
78 // * \brief Calculates the dissipation for a given stiffness, collision time, and effective mass
79 // * \deprecated use species->setStiffnessAndRestitutionCoefficient(2.0*effectiveMass) instead
80 // */
81 // MERCURYDPM_DEPRECATED
82 // Mdouble computeDispFromKAndCollisionTimeAndEffectiveMass(Mdouble k, Mdouble tc, Mdouble mass);
83 //
84 // /*!
85 // * \brief Calculates the restitution coefficient for a given stiffness, collision time, and effective mass
86 // * \deprecated use species->computeRestitutionCoefficient(2.0*effectiveMass) instead
87 // */
88 // MERCURYDPM_DEPRECATED
89 // Mdouble computeRestitutionCoefficientFromKAndCollisionTimeAndEffectiveMass(Mdouble k, Mdouble tc, Mdouble mass);
90 //
91 // /*!
92 // * \brief Calculates the dissipation for a given collision time, restitution coefficient, and effective mass
93 // * \deprecated use species->setCollisionTimeAndRestitutionCoefficient(2.0*effectiveMass) instead
94 // */
95 // MERCURYDPM_DEPRECATED
96 // Mdouble computeDispFromCollisionTimeAndRestitutionCoefficientAndEffectiveMass(Mdouble tc, Mdouble r, Mdouble mass);
97 //
98 // /*!
99 // * \brief Calculates the stiffness for a given collision time, restitution coefficient, and effective mass
100 // * \deprecated use species->setCollisionTimeAndRestitutionCoefficient(2.0*effectiveMass) instead
101 // */
102 // MERCURYDPM_DEPRECATED
103 // Mdouble computeKFromCollisionTimeAndRestitutionCoefficientAndEffectiveMass(Mdouble tc, Mdouble r, Mdouble mass);
104 //
105 // /*!
106 // * \brief Calculates the stiffness for a given collision time, dissipation, and effective mass
107 // */
108 // MERCURYDPM_DEPRECATED
109 // Mdouble computeKFromCollisionTimeAndDispAndEffectiveMass(Mdouble tc, Mdouble disp, Mdouble mass);
110 //
111 // /*!
112 // * \brief Calculates the resitution coefficient for a given collision time, dissipation, and effective mass
113 // * \deprecated use species->computeRestitutionCoefficient(2.0*effectiveMass) instead
114 // */
115 // MERCURYDPM_DEPRECATED
116 // Mdouble computeRestitutionCoefficientFromCollisionTimeAndDispAndEffectiveMass(Mdouble tc, Mdouble disp, Mdouble mass);
117 //
118 // /*!
119 // * \brief Calculates the stiffness for a given dissipation, restitution coefficient, and effective mass
120 // */
121 // MERCURYDPM_DEPRECATED
122 // Mdouble computeKFromDispAndRestitutionCoefficientAndEffectiveMass(Mdouble disp, Mdouble r, Mdouble mass);
123 //
124 // /*!
125 // * \brief Calculates the collision time for a given dissipation, restitution coefficient, and effective mass
126 // * \deprecated use species->computeCollisionTime(2.0*effectiveMass) instead
127 // */
128 // MERCURYDPM_DEPRECATED
129 // Mdouble computeCollisionTimeFromDispAndRestitutionCoefficientAndEffectiveMass(Mdouble disp, Mdouble r, Mdouble mass);
130 
131 #endif