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

Function test

Tests/complementIn/main.cpp:20–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20void test ()
21{
22 BL_PROFILE("test");
23 const int ngrids = 10;
24 Vector<Box> domains(ngrids);
25 Vector<BoxArray> grids(ngrids);
26
27 for (int igrid=0; igrid < ngrids; ++igrid)
28 {
29 grids[igrid] = readBoxList("grids/grids_"+std::to_string(igrid+1), domains[igrid]);
30 }
31
32 for (int igrid=0; igrid < ngrids; ++igrid)
33 {
34 amrex::Print() << "grid # " << igrid+1 << ": size " << grids[igrid].size()
35 << " min box " << grids[igrid].minimalBox()
36 << "\n "
37 << " domain box " << domains[igrid] << "\n";
38 BL_PROFILE("BoxList::"+std::to_string(igrid+1));
39 BoxList bl;
40 bl.complementIn(domains[igrid], grids[igrid]);
41 amrex::Print() << "BoxList # " << igrid+1 << ": size " << bl.size() << "\n\n";
42 }
43}
44
45BoxArray
46readBoxList (const std::string& file, Box& domain)

Callers 1

mainFunction · 0.70

Calls 5

PrintClass · 0.85
complementInMethod · 0.80
readBoxListFunction · 0.70
sizeMethod · 0.45
minimalBoxMethod · 0.45

Tested by

no test coverage detected