double Total = 0; Pos p; for(p.x = 0; p.x < nextGrid.getRange().x; ++p.x) for(p.y = 0; p.y < nextGrid.getRange().y; ++p.y) { // // Degradation of sTNF // nextGrid.setTNF(p, nextGrid.TNF(p) * TNFdegRate); // Total += nextGrid.TNF(p); // Degradation of sTNF nextGrid.incTNF(p, (-1.0 * nextGrid.TNF(p) * _PARAM(PARAM_GR_K_DEG) * dt)); Total += nextGrid.TNF(p); // Degradation of il10 nextGrid.incil10(p, (-1.0 * nextGrid.il10(p) * _PARAM(PARAM_GR_I_K_DEG) * dt)); // Degradation of CCL2 nextGrid.incCCL2(p, (-1.0 * nextGrid.CCL2(p) * _PARAM(PARAM_GR_CHEMOKINE_K_DEG) * dt)); // Degradation of CCL5 nextGrid.incCCL5(p, (-1.0 * nextGrid.CCL5(p) * _PARAM(PARAM_GR_CHEMOKINE_K_DEG) * dt)); // Degradation of CXCL9 nextGrid.incCXCL9(p, (-1.0 * nextGrid.CXCL9(p) * _PARAM(PARAM_GR_CHEMOKINE_K_DEG) * dt)); if (_PARAM(PARAM_GR_SEC_RATE_ATTRACTANT) != 0) { // Degradation of MacAttractant nextGrid.incmacAttractant(p, (-1.0 * nextGrid.macAttractant(p) * _PARAM(PARAM_GR_CHEMOKINE_K_DEG) * dt)); } // Unbinding of sTNF from ShedTNFR2 nextGrid.incshedTNFR2(p, (-1.0 * nextGrid.shedTNFR2(p) * _PARAM(PARAM_GR_KD2) * _PARAM(PARAM_GR_K_ON2) * dt)); // Addition of sTNF from unbinding from ShedTNFR2 nextGrid.incTNF(p, (1.0 * nextGrid.shedTNFR2(p) * _PARAM(PARAM_GR_KD2) * _PARAM(PARAM_GR_K_ON2) * dt)); } std::cout << "Total Conc: " << Total << std::endl;