Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix quaternion default initialisation #300

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/molecules/AutoPasSimpleMolecule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Component* AutoPasSimpleMolecule::_component = nullptr;
Quaternion AutoPasSimpleMolecule::_quaternion = Quaternion(1.0, 0.0, 0.0, 0.0);

AutoPasSimpleMolecule::AutoPasSimpleMolecule(unsigned long id, Component* component, double rx, double ry, double rz,
double vx, double vy, double vz, double q0, double q1, double q2,
double q3, double Dx, double Dy, double Dz)
double vx, double vy, double vz, double qw, double qx, double qy,
double qz, double Dx, double Dy, double Dz)
: autopas::ParticleFP64({rx, ry, rz}, {vx, vy, vz}, id) {
if (_component == nullptr) {
_component = component;
Expand Down
4 changes: 2 additions & 2 deletions src/molecules/AutoPasSimpleMolecule.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
class AutoPasSimpleMolecule final : public MoleculeInterface, public autopas::ParticleFP64 {
public:
explicit AutoPasSimpleMolecule(unsigned long id = 0, Component* component = nullptr, double rx = 0., double ry = 0.,
double rz = 0., double vx = 0., double vy = 0., double vz = 0., double q0 = 1.,
double q1 = 1., double q2 = 0., double q3 = 0., double Dx = 0., double Dy = 0.,
double rz = 0., double vx = 0., double vy = 0., double vz = 0., double qw = 1.,
double qx = 0., double qy = 0., double qz = 0., double Dx = 0., double Dy = 0.,
double Dz = 0.);

AutoPasSimpleMolecule(const AutoPasSimpleMolecule& m) = default;
Expand Down
4 changes: 2 additions & 2 deletions src/molecules/FullMolecule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
FullMolecule::FullMolecule(unsigned long id, Component *component,
double rx, double ry, double rz,
double vx, double vy, double vz,
double q0, double q1, double q2, double q3,
double qw, double qx, double qy, double qz,
double Dx, double Dy, double Dz
)
: _q(q0, q1, q2, q3) {
: _q(qw, qx, qy, qz) {
_id = id;
_component = component;
_r[0] = rx;
Expand Down
2 changes: 1 addition & 1 deletion src/molecules/FullMolecule.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class FullMolecule : public MoleculeInterface {
FullMolecule(unsigned long id = 0, Component *component = nullptr,
double rx = 0., double ry = 0., double rz = 0.,
double vx = 0., double vy = 0., double vz = 0.,
double q0 = 1., double q1 = 1., double q2 = 0., double q3 = 0.,
double qw = 1., double qx = 0., double qy = 0., double qz = 0.,
double Dx = 0., double Dy = 0., double Dz = 0.
);
FullMolecule(const FullMolecule& m);
Expand Down
4 changes: 2 additions & 2 deletions src/molecules/MoleculeRMM.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class MoleculeRMM : public MoleculeInterface {
MoleculeRMM(unsigned long id = 0, Component *component = nullptr,
double rx = 0., double ry = 0., double rz = 0.,
double vx = 0., double vy = 0., double vz = 0.,
double = 0., double = 0., double = 0., double = 0., /*q0, q1, q2, q3*/
double = 0., double = 0., double = 0. /*Dx, Dy, Dz*/
double qw = 0., double qx = 0., double qy = 0., double qz = 0.,
double Dx = 0., double Dy = 0., double Dz = 0.
) {
_state = STORAGE_AOS;
_r[0] = rx;
Expand Down
2 changes: 1 addition & 1 deletion src/molecules/Quaternion.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
class Quaternion {
public:
Quaternion(double qw = 1., double qx = 1., double qy = 0., double qz = 0.)
Quaternion(double qw = 1., double qx = 0., double qy = 0., double qz = 0.)
: m_qw(qw), m_qx(qx), m_qy(qy), m_qz(qz) {
}

Expand Down
Loading