return _arrays[0]->getNumberOfTS();
}
-void MEDFileFieldRepresentationLeaves::feedSIL(vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, const std::string& tsName, const std::string& meshName, const std::string& comSupStr, std::vector<std::string>& names) const
+/*!
+ * \param [in] ms is the meshes pointer. It can be used only for information of geometric types. No special processing will be requested on ms.
+ */
+void MEDFileFieldRepresentationLeaves::feedSIL(const ParaMEDMEM::MEDFileMeshes *ms, vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, const std::string& tsName, const std::string& meshName, const std::string& comSupStr, std::vector<std::string>& names) const
{
+ vtkIdType root2(sil->AddChild(root,edge));
+ names.push_back(std::string("Arrs"));
for(std::vector<MEDFileFieldRepresentationLeavesArrays>::const_iterator it=_arrays.begin();it!=_arrays.end();it++)
- (*it).feedSIL(sil,root,edge,tsName,meshName,comSupStr,names);
+ (*it).feedSIL(sil,root2,edge,tsName,meshName,comSupStr,names);
+ //
+ vtkIdType root3(sil->AddChild(root,edge));
+ names.push_back(std::string("InfoOnGeoType"));
+ const ParaMEDMEM::MEDFileMesh *m(0);
+ if(ms)
+ m=ms->getMeshWithName(meshName);
+ const ParaMEDMEM::MEDFileFastCellSupportComparator *fsp(_fsp);
+ if(!fsp || fsp->getNumberOfTS()==0)
+ return ;
+ std::vector< INTERP_KERNEL::NormalizedCellType > gts(fsp->getGeoTypesAt(0,m));
+ for(std::vector< INTERP_KERNEL::NormalizedCellType >::const_iterator it2=gts.begin();it2!=gts.end();it2++)
+ {
+ const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(*it2));
+ std::string cmStr(cm.getRepr()); cmStr=cmStr.substr(5);//skip "NORM_"
+ sil->AddChild(root3,edge);
+ names.push_back(cmStr);
+ }
}
bool MEDFileFieldRepresentationLeaves::containId(int id) const
std::string comSupStr(oss2.str());
vtkIdType typeId2(sil->AddChild(typeId1,edge));
names.push_back(comSupStr);
- (*it2).feedSIL(sil,typeId2,edge,tsName,meshName,comSupStr,names);
+ (*it2).feedSIL(_ms,sil,typeId2,edge,tsName,meshName,comSupStr,names);
}
}
}
std::string getMeshName() const;
int getNumberOfArrays() const;
int getNumberOfTS() const;
- void feedSIL(vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, const std::string& tsName, const std::string& meshName, const std::string& compSupStr, std::vector<std::string>& names) const;
+ void feedSIL(const ParaMEDMEM::MEDFileMeshes *ms, vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, const std::string& tsName, const std::string& meshName, const std::string& compSupStr, std::vector<std::string>& names) const;
bool containId(int id) const;
bool containZeName(const char *name, int& id) const;
bool isActivated() const;
{
vtkIdType id3(it2->Next());
QString name2(QString::fromStdString((const char *)verticesNames2->GetValue(id3))); QList<QString> strs2; strs2.append(name2);
- QString toolTipName2(name2);
pqTreeWidgetItemObject *item2(new pqTreeWidgetItemObject(item1,strs2));
item2->setData(0,Qt::UserRole,name2);
- item2->setData(0,Qt::ToolTipRole,toolTipName2);
item2->setData(0,Qt::CheckStateRole,0);
vtkAdjacentVertexIterator *it3(vtkAdjacentVertexIterator::New());//fields !
g2->GetAdjacentVertices(id3,it3);
- while(it3->HasNext())
+ vtkIdType id3Arrs(it3->Next());
+ vtkAdjacentVertexIterator *it3Arrs(vtkAdjacentVertexIterator::New());//arrs in fields !
+ g2->GetAdjacentVertices(id3Arrs,it3Arrs);
+ while(it3Arrs->HasNext())
{
- vtkIdType id4(it3->Next());
+ vtkIdType id4(it3Arrs->Next());
std::string name3CppFull((const char *)verticesNames2->GetValue(id4));
std::size_t pos(name3CppFull.find_first_of(ZE_SEP));
std::string name3Only(name3CppFull.substr(0,pos)); std::string spatialDiscr(name3CppFull.substr(pos+sizeof(ZE_SEP)-1));
connect(item3,SIGNAL(checkedStateChanged(bool)),this,SLOT(aLev4HasBeenFired()));
ll++;
}
+ vtkIdType id3Gts(it3->Next());
+ vtkAdjacentVertexIterator *it3Gts(vtkAdjacentVertexIterator::New());//geo types in fields !
+ g2->GetAdjacentVertices(id3Gts,it3Gts);
+ QString toolTipName2(name2);
+ while(it3Gts->HasNext())
+ {
+ vtkIdType idGt(it3Gts->Next());
+ std::string gtName((const char *)verticesNames2->GetValue(idGt));
+ toolTipName2=QString("%1\n- %2").arg(toolTipName2).arg(QString(gtName.c_str()));
+ }
+ item2->setData(0,Qt::ToolTipRole,toolTipName2);
+ it3Gts->Delete();
it3->Delete();
+ it3Arrs->Delete();
if(kk==0)
item2->setChecked(true);
kk++;