{
gmx_domdec_constraints_t *dc;
const gmx_molblock_t *molb;
- int mb, ncon, c;
if (debug)
{
snew(dd->constraints, 1);
dc = dd->constraints;
- snew(dc->molb_con_offset, mtop->nmolblock);
- snew(dc->molb_ncon_mol, mtop->nmolblock);
+ snew(dc->molb_con_offset, mtop->molblock.size());
+ snew(dc->molb_ncon_mol, mtop->molblock.size());
- ncon = 0;
- for (mb = 0; mb < mtop->nmolblock; mb++)
+ int ncon = 0;
+ for (size_t mb = 0; mb < mtop->molblock.size(); mb++)
{
molb = &mtop->molblock[mb];
dc->molb_con_offset[mb] = ncon;
if (ncon > 0)
{
snew(dc->gc_req, ncon);
- for (c = 0; c < ncon; c++)
+ for (int c = 0; c < ncon; c++)
{
dc->gc_req[c] = 0;
}