From 62fa8bb10d8734e099bdcc820cab3a1ad8973f5c Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Thu, 6 Nov 2014 15:33:17 +0100 Subject: [PATCH] Components are now available in VTK output of double arrays. --- src/MEDCoupling/MEDCouplingMemArray.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/MEDCoupling/MEDCouplingMemArray.cxx b/src/MEDCoupling/MEDCouplingMemArray.cxx index ad0405710..685de65de 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.cxx +++ b/src/MEDCoupling/MEDCouplingMemArray.cxx @@ -1169,6 +1169,15 @@ void DataArrayDouble::writeVTK(std::ostream& ofs, int indent, const std::string& std::string idt(indent,' '); ofs.precision(17); ofs << idt << "::const_iterator it=_info_on_compo.begin();it!=_info_on_compo.end();it++) + if(!(*it).empty()) + areAllEmpty=false; + if(!areAllEmpty) + for(std::size_t i=0;i<_info_on_compo.size();i++) + ofs << " ComponentName" << i << "=\"" << _info_on_compo[i] << "\""; + // if(byteArr) { ofs << " format=\"appended\" offset=\"" << byteArr->getNumberOfTuples() << "\">"; -- 2.39.2