| 249 | } |
| 250 | |
| 251 | void OneDim::eval(size_t j, double* x, double* r, double rdt, int count) |
| 252 | { |
| 253 | clock_t t0 = clock(); |
| 254 | if (m_interrupt) { |
| 255 | m_interrupt->eval(m_nevals); |
| 256 | } |
| 257 | fill(r, r + m_size, 0.0); |
| 258 | if (j == npos) { |
| 259 | fill(m_mask.begin(), m_mask.end(), 0); |
| 260 | } |
| 261 | if (rdt < 0.0) { |
| 262 | rdt = m_rdt; |
| 263 | } |
| 264 | |
| 265 | // iterate over the bulk domains first |
| 266 | for (const auto& d : m_bulk) { |
| 267 | d->eval(j, x, r, m_mask.data(), rdt); |
| 268 | } |
| 269 | |
| 270 | // then over the connector domains |
| 271 | for (const auto& d : m_connect) { |
| 272 | d->eval(j, x, r, m_mask.data(), rdt); |
| 273 | } |
| 274 | |
| 275 | // increment counter and time |
| 276 | if (count) { |
| 277 | clock_t t1 = clock(); |
| 278 | m_evaltime += double(t1 - t0)/CLOCKS_PER_SEC; |
| 279 | m_nevals++; |
| 280 | } |
| 281 | } |
| 282 | |
| 283 | void OneDim::evalJacobian(double* x0) |
| 284 | { |
no test coverage detected