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

Method d_numPts

Src/Base/AMReX_BoxArray.cpp:430–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428}
429
430double
431BoxArray::d_numPts () const noexcept
432{
433 double result = 0;
434 const int N = static_cast<int>(size());
435 auto const& bxs = this->m_ref->m_abox;
436 if (m_bat.is_null()) {
437#ifdef AMREX_USE_OMP
438#pragma omp parallel for reduction(+:result)
439#endif
440 for (int i = 0; i < N; ++i)
441 {
442 result += bxs[i].d_numPts();
443 }
444 } else if (m_bat.is_simple()) {
445 IndexType t = ixType();
446 IntVect cr = crseRatio();
447#ifdef AMREX_USE_OMP
448#pragma omp parallel for reduction(+:result)
449#endif
450 for (int i = 0; i < N; ++i)
451 {
452 result += amrex::convert(amrex::coarsen(bxs[i],cr),t).d_numPts();
453 }
454 } else {
455#ifdef AMREX_USE_OMP
456#pragma omp parallel for reduction(+:result)
457#endif
458 for (int i = 0; i < N; ++i)
459 {
460 result += m_bat.m_op.m_bndryReg(bxs[i]).d_numPts();
461 }
462 }
463
464 return result;
465}
466
467int
468BoxArray::readFrom (std::istream& is)

Callers 15

solveMethod · 0.80
compute_dSdtMethod · 0.80
compute_dSdtMethod · 0.80
mainFunction · 0.80
make_rhsFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
printGridSummaryMethod · 0.80
okMethod · 0.80
effMethod · 0.80
solveMethod · 0.80

Calls 5

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

Tested by 1

solveMethod · 0.64