Skip to content
Snippets Groups Projects
Commit ce74702b authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Use a while loop and no temporary

parent f7de7f2a
No related branches found
No related tags found
No related merge requests found
......@@ -243,13 +243,10 @@ int main(int argc, char *argv[]) {
auto const &neumannFunction = functions.get("neumannCondition");
// Find a (somewhat random) frictional node
size_t first_frictional_node;
for (size_t i = 0; i < frictionalNodes.size(); ++i) {
if (frictionalNodes[i][0]) {
first_frictional_node = i;
break;
}
}
size_t first_frictional_node = 0;
while (!frictionalNodes[first_frictional_node][0] &&
first_frictional_node < frictionalNodes.size())
++first_frictional_node;
for (size_t run = 1; run <= timesteps; ++run) {
double const time = h * run;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment