Skip to content

Commit

Permalink
Extend error message on gradient data
Browse files Browse the repository at this point in the history
  • Loading branch information
davidscn committed Sep 23, 2022
1 parent 72a0cde commit 506de18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ void readData(Mesh &mesh, const std::string &filename)
}

if (gradX == nullptr || (dataDim > 1 && gradY == nullptr) || (dataDim == 3 && gradZ == nullptr)) {
std::cerr << "Error while parsing gradient data \"" << dataname << "\", please check your input mesh\n";
std::cerr << "Error while parsing gradient data for data called \"" << dataname << "\". ASTE searches in case of scalar data for \"" << dataname << "_gradient\", in case of vector-valued data for three gradient vectors called \"" << dataname << "_dx/dy/dz"
<< "\". Please ensure that the required gradient data fields are available on your input mesh. If you use the \"precice-aste-evaluate\" tool, you can add the \"--gradient\" flag when generating data in order to automatically add gradient data on the corresponding mesh.\n";
}

// Safety checks
Expand Down

0 comments on commit 506de18

Please sign in to comment.