| 391 | } |
| 392 | |
| 393 | Long |
| 394 | BoxArray::numPts () const noexcept |
| 395 | { |
| 396 | Long result = 0; |
| 397 | const int N = static_cast<int>(size()); |
| 398 | auto const& bxs = this->m_ref->m_abox; |
| 399 | if (m_bat.is_null()) { |
| 400 | #ifdef AMREX_USE_OMP |
| 401 | #pragma omp parallel for reduction(+:result) |
| 402 | #endif |
| 403 | for (int i = 0; i < N; ++i) |
| 404 | { |
| 405 | result += bxs[i].numPts(); |
| 406 | } |
| 407 | } else if (m_bat.is_simple()) { |
| 408 | IndexType t = ixType(); |
| 409 | IntVect cr = crseRatio(); |
| 410 | #ifdef AMREX_USE_OMP |
| 411 | #pragma omp parallel for reduction(+:result) |
| 412 | #endif |
| 413 | for (int i = 0; i < N; ++i) |
| 414 | { |
| 415 | result += amrex::convert(amrex::coarsen(bxs[i],cr),t).numPts(); |
| 416 | } |
| 417 | } else { |
| 418 | #ifdef AMREX_USE_OMP |
| 419 | #pragma omp parallel for reduction(+:result) |
| 420 | #endif |
| 421 | for (int i = 0; i < N; ++i) |
| 422 | { |
| 423 | result += m_bat.m_op.m_bndryReg(bxs[i]).numPts(); |
| 424 | } |
| 425 | } |
| 426 | |
| 427 | return result; |
| 428 | } |
| 429 | |
| 430 | double |
| 431 | BoxArray::d_numPts () const noexcept |
no test coverage detected