Skip to content
Snippets Groups Projects
Commit 72890f78 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[A] Add mesh check in ProjectData::parseProcessVariables.

Also clarify an error message and the TODO for meshes.
parent bb171dcf
No related branches found
No related tags found
No related merge requests found
...@@ -177,16 +177,23 @@ void ProjectData::parseProcessVariables( ...@@ -177,16 +177,23 @@ void ProjectData::parseProcessVariables(
{ {
DBUG("Parse process variables:") DBUG("Parse process variables:")
if (_geoObjects == nullptr) { if (_geoObjects == nullptr) {
ERR("Geometric objects are needed to defined process variables."); ERR("Geometric objects are required to define process variables.");
ERR("No geometric objects present.");
return;
}
// TODO at the moment we have only one mesh, later there
// can be several meshes. Then we have to check for correct mesh here and
// assign the referenced mesh below.
if (_mesh_vec.empty() || _mesh_vec[0] == nullptr) {
ERR("A mesh is required to define process variables.");
ERR("No geometric objects are read."); ERR("No geometric objects are read.");
return; return;
} }
for (auto it : process_variables_config) { for (auto it : process_variables_config) {
ConfigTree const& var_config = it.second; ConfigTree const& var_config = it.second;
// TODO at the moment we have only one mesh, later there // TODO Extend to referenced meshes.
// can be several meshes. Then we have to assign the referenced mesh
// here.
_process_variables.emplace_back(var_config,*_mesh_vec[0],*_geoObjects); _process_variables.emplace_back(var_config,*_mesh_vec[0],*_geoObjects);
} }
} }
......
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