Skip to content
Snippets Groups Projects
Commit c7d65522 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

allow direct creation of ElementNodeData views

parent abafc640
No related branches found
No related tags found
No related merge requests found
......@@ -98,8 +98,18 @@ PView::PView(std::string name, std::string type,
double time)
{
_init();
PViewDataGModel *d = new PViewDataGModel
((type == "NodeData") ? PViewDataGModel::NodeData : PViewDataGModel::ElementData);
PViewDataGModel::DataType t;
if(type == "NodeData")
t = PViewDataGModel::NodeData;
else if(type == "ElementData")
t = PViewDataGModel::ElementData;
else if(type == "ElementNodeData")
t = PViewDataGModel::ElementNodeData;
else{
Msg::Error("Unknown type of view to create '%s'", type.c_str());
return;
}
PViewDataGModel *d = new PViewDataGModel(t);
d->addData(model, data, 0, time, 1);
d->setName(name);
d->setFileName(name + ".msh");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment