Skip to content
Snippets Groups Projects
Commit 1a7771ad authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Avoid crash if there is no 'neumannValues' parameter

parent 8ee80a96
Branches
No related tags found
No related merge requests found
......@@ -447,7 +447,7 @@ int main (int argc, char *argv[]) try
averageDef += x[i].r;
averageDef /= neumannNodes.count();
if (mpiHelper.rank()==0)
if (mpiHelper.rank()==0 and parameterSet.hasKey("neumannValues"))
{
std::cout << "Neumann values = " << parameterSet.get<FieldVector<double, 3> >("neumannValues") << " "
<< ", average deflection: " << averageDef << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment