Skip to content

Commit

Permalink
Merge pull request #366 from fweik/master
Browse files Browse the repository at this point in the history
Fix some compiler warnings and init order in SystemInterface.
  • Loading branch information
fweik committed Jul 20, 2015
2 parents eeaa531 + 4512e6e commit 5a343ea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/core/SystemInterface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ class SystemInterface {
bool m_needsR;
bool m_needsV;
bool m_needsQ;
bool m_needsQuatu;
bool m_needsDip;
bool m_needsTorque;
bool m_needsQuatu;
bool m_needsRGpu;
bool m_needsVGpu;
bool m_needsQGpu;
Expand Down
11 changes: 4 additions & 7 deletions src/core/minimize_energy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,7 @@ bool steepest_descent_step(void) {

// Positional increments
double dp, dp2, dp2_max = -std::numeric_limits<double>::max();

// Rotational increment
double dq[3]; // Vector parallel to torque

const double skin2 = SQR(skin);



// Iteration over all local particles
for (c = 0; c < local_cells.n; c++) {
cell = local_cells.cell[c];
Expand Down Expand Up @@ -106,6 +100,9 @@ bool steepest_descent_step(void) {
}
}
#ifdef ROTATION
// Rotational increment
double dq[3]; // Vector parallel to torque

for (int j=0;j<3;j++){
dq[j]=0;
// Square of torque
Expand Down
2 changes: 1 addition & 1 deletion src/core/statistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ void momentum_calc(double *momentum)
*/
std::vector<double> calc_linear_momentum(int include_particles, int include_lbfluid)
{
double momentum_fluid[3] = { 0., 0., 0. };
double momentum_particles[3] = { 0., 0., 0. };
std::vector<double> linear_momentum(3,0.0);
if (include_particles) {
Expand All @@ -276,6 +275,7 @@ std::vector<double> calc_linear_momentum(int include_particles, int include_lbfl
}
if (include_lbfluid) {
#ifdef LB
double momentum_fluid[3] = { 0., 0., 0. };
mpi_gather_stats(6, momentum_fluid, NULL, NULL, NULL);
linear_momentum[0] += momentum_fluid[0];
linear_momentum[1] += momentum_fluid[1];
Expand Down

0 comments on commit 5a343ea

Please sign in to comment.