From 352864b79c8d734ed65b2317ab87d7ffc36baace Mon Sep 17 00:00:00 2001 From: ageay Date: Tue, 9 Apr 2013 07:32:54 +0000 Subject: [PATCH] Micro imps of __repr__ of Fields --- src/MEDCoupling/MEDCouplingFieldDouble.cxx | 17 +++++++++++++++-- src/MEDCoupling/MEDCouplingFieldTemplate.cxx | 4 ++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/MEDCoupling/MEDCouplingFieldDouble.cxx b/src/MEDCoupling/MEDCouplingFieldDouble.cxx index 09f49923a..45908d984 100644 --- a/src/MEDCoupling/MEDCouplingFieldDouble.cxx +++ b/src/MEDCoupling/MEDCouplingFieldDouble.cxx @@ -1994,12 +1994,25 @@ void MEDCouplingFieldDouble::reprQuickOverview(std::ostream& stream) const throw fd->reprQuickOverview(stream); stream << std::endl; if(!_mesh) - stream << "No mesh support defined !"; + stream << "\nNo mesh support defined !"; else { std::ostringstream oss; _mesh->reprQuickOverview(oss); std::string tmp(oss.str()); - stream << "Mesh info : " << tmp.substr(0,tmp.find('\n')); + stream << "\nMesh info : " << tmp.substr(0,tmp.find('\n')); + } + if(_time_discr) + { + const DataArrayDouble *arr=_time_discr->getArray(); + if(arr) + { + stream << "\n\nArray info : "; + arr->reprQuickOverview(stream); + } + else + { + stream << "\n\nNo data array set !"; + } } } diff --git a/src/MEDCoupling/MEDCouplingFieldTemplate.cxx b/src/MEDCoupling/MEDCouplingFieldTemplate.cxx index 70202d069..235146889 100644 --- a/src/MEDCoupling/MEDCouplingFieldTemplate.cxx +++ b/src/MEDCoupling/MEDCouplingFieldTemplate.cxx @@ -148,12 +148,12 @@ void MEDCouplingFieldTemplate::reprQuickOverview(std::ostream& stream) const thr fd->reprQuickOverview(stream); stream << std::endl; if(!_mesh) - stream << "No mesh support defined !"; + stream << "\nNo mesh support defined !"; else { std::ostringstream oss; _mesh->reprQuickOverview(oss); std::string tmp(oss.str()); - stream << "Mesh info : " << tmp.substr(0,tmp.find('\n')); + stream << "\nMesh info : " << tmp.substr(0,tmp.find('\n')); } } -- 2.39.2