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

Method AddFArrayBox

Src/Extern/amrdata/AMReX_XYPlotDataList.cpp:85–110  ·  view source on GitHub ↗

-------------------------------------------------------------------

Source from the content-addressed store, hash-verified

83
84// -------------------------------------------------------------------
85void XYPlotDataList::AddFArrayBox(FArrayBox &fab, int whichdir, int level) {
86 BL_ASSERT(level >= 0);
87 BL_ASSERT(level <= maxLevel);
88
89 whichDir = whichdir;
90 if(fabBoxLists[level].isEmpty()) { // set correct index type
91 fabBoxLists[level].convert(fab.box().ixType());
92 }
93 fabBoxLists[level].push_back(fab.box());
94 updatedQ = false;
95 int istartx(fab.smallEnd()[whichdir]);
96 XYPlotDataListLink *pdll = new XYPlotDataListLink(fab.dataPtr(), istartx,
97 fab.length()[whichdir]);
98 std::list<XYPlotDataListLink *>::iterator li = dataSets[level].begin();
99 if(li == dataSets[level].end()) {
100 dataSets[level].push_back(pdll);
101 } else {
102 while((*li)->StartXi() < istartx && li != dataSets[level].end()) {
103 ++li;
104 if(li == dataSets[level].end()) {
105 break;
106 }
107 }
108 dataSets[level].insert(li, pdll);
109 }
110}
111
112
113// -------------------------------------------------------------------

Callers 1

LineValuesMethod · 0.80

Calls 10

StartXiMethod · 0.80
isEmptyMethod · 0.45
ixTypeMethod · 0.45
boxMethod · 0.45
push_backMethod · 0.45
dataPtrMethod · 0.45
lengthMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected