#include "gmxpre.h"
#include <assert.h>
+#include <cmath>
#include <stdio.h>
#include "gromacs/legacyheaders/domdec.h"
sfree(div);
sfree(mdiv);
- npp_root3 = (int)(pow(nnodes-npme, 1.0/3.0) + 0.5);
- npme_root2 = (int)(sqrt(npme) + 0.5);
+ npp_root3 = static_cast<int>(std::pow(nnodes-npme, 1.0/3.0) + 0.5);
+ npme_root2 = static_cast<int>(std::sqrt(static_cast<double>(npme)) + 0.5);
/* The check below gives a reasonable division:
* factor 5 allowed at 5 or more PP nodes,
int nnodes)
{
float ratio;
- int npme, nkx, nky;
- t_inputrec ir_try;
+ int npme;
ratio = pme_load_estimate(mtop, ir, box);
real comm_box_frac(ivec dd_nc, real cutoff, gmx_ddbox_t *ddbox)
{
- int i, j, k, npp;
+ int i, j, k;
rvec bt, nw;
real comm_vol;
nw[i] = dd_nc[i]*cutoff/bt[i];
}
- npp = 1;
comm_vol = 0;
for (i = 0; i < DIM; i++)
{
if (dd_nc[i] > 1)
{
- npp *= dd_nc[i];
comm_vol += nw[i];
for (j = i+1; j < DIM; j++)
{
int npme_tot, ivec nc)
{
ivec npme = {1, 1, 1};
- int i, j, k, nk, overlap;
+ int i, j, nk, overlap;
rvec bt;
float comm_vol, comm_vol_xf, comm_pme, cost_pbcdx;
/* This is the cost of a pbc_dx call relative to the cost
float pbcdxr, int npme,
int ndiv, int *div, int *mdiv, ivec ir_try, ivec opt)
{
- int x, y, z, i;
+ int x, y, i;
float ce;
if (ndiv == 0)