MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / numPts

Method numPts

Src/Base/AMReX_BoxArray.cpp:393–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391}
392
393Long
394BoxArray::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
430double
431BoxArray::d_numPts () const noexcept

Callers 15

mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
printGridSummaryMethod · 0.45
coarsenMethod · 0.45
tagsMethod · 0.45
tags_and_untagsMethod · 0.45

Calls 5

sizeFunction · 0.85
convertFunction · 0.85
is_nullMethod · 0.80
is_simpleMethod · 0.80
coarsenFunction · 0.70

Tested by

no test coverage detected