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

Fix condition for printEvolution

parent bedd5eec
No related branches found
No related tags found
No related merge requests found
......@@ -478,30 +478,29 @@ int main(int argc, char *argv[]) {
}
}
}
if (parset.get<bool>("printEvolution")) {
// Find the first node that belongs to the frictional boundary
for (size_t i = 0; i < frictionalNodes.size(); ++i) {
if (!frictionalNodes[i][0])
continue;
boost::format const formatter("s[%03d] = %+3e, "
"%|40t|u[%03d] = %+3e");
std::cout << boost::format(formatter) % run % (*s4_new)[i] % run %
u4[i] << std::endl;
double out;
functions.get("sampleFunction").evaluate(h * run, out);
octave_writer << (*s4_new)[i] << " " << u4[i][0] * 1e6 << " " << out
<< std::endl;
break;
}
}
}
u4 += u4_diff;
s4_old = *s4_new;
if (!parset.get<bool>("printEvolution"))
continue;
// Find the first node that belongs to the frictional boundary
for (size_t i = 0; i < frictionalNodes.size(); ++i) {
if (!frictionalNodes[i][0])
continue;
boost::format const formatter("s[%03d] = %+3e, "
"%|40t|u[%03d] = %+3e");
std::cout << boost::format(formatter) % run % (*s4_new)[i] % run % u4[i]
<< std::endl;
double out;
functions.get("sampleFunction").evaluate(h * run, out);
octave_writer << (*s4_new)[i] << " " << u4[i][0] * 1e6 << " " << out
<< std::endl;
break;
}
// Compute von Mises stress and write everything to a file
if (parset.get<bool>("writeVTK")) {
auto const displacement =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment