Skip to content
Snippets Groups Projects
Commit ecacdb56 authored by Ansgar Burchardt's avatar Ansgar Burchardt
Browse files

Check return value also inside loop

parent c6d4ec03
No related branches found
No related tags found
1 merge request!150UGGrid: append to-be-visited sons at the end of the list
......@@ -410,19 +410,21 @@ void Dune::UGGrid<dim>::getChildrenOfSubface(const typename Traits::template Cod
if (UG_NS<dim>::myLevel(theElement) < maxl) {
Get_Sons_of_ElementSide(theElement,
side, // Input element side number
&Sons_of_Side, // Number of topological sons of the element side
SonList, // Output elements
SonSides, // Output element side numbers
true,
true);
int rv = Get_Sons_of_ElementSide(theElement,
side, // Input element side number
&Sons_of_Side, // Number of topological sons of the element side
SonList, // Output elements
SonSides, // Output element side numbers
true,
true);
if (rv != 0)
DUNE_THROW(GridError, "Get_Sons_of_ElementSide returned with error value " << rv);
for (int i=0; i<Sons_of_Side; i++)
list.emplace_back(SonList[i], SonSides[i]);
}
}
// //////////////////////////////
......
......@@ -734,14 +734,17 @@ void Dune::UGGridLeafIntersection<GridImp>::constructLeafSubfaces() {
if (!UG_NS<dim>::isLeaf(theElement)) {
Get_Sons_of_ElementSide(theElement,
f.second, // Input element side number
&Sons_of_Side, // Number of topological sons of the element side
SonList, // Output elements
SonSides, // Output element side numbers
true,
false,
true);
int rv = Get_Sons_of_ElementSide(theElement,
f.second, // Input element side number
&Sons_of_Side, // Number of topological sons of the element side
SonList, // Output elements
SonSides, // Output element side numbers
true,
false,
true);
if (rv!=0)
DUNE_THROW(GridError, "Get_Sons_of_ElementSide returned with error value " << rv);
for (int i=0; i<Sons_of_Side; i++)
list.emplace_back(SonList[i], SonSides[i]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment