]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
End of __repr__ implementation for fielddouble and fieldtemplate
authorageay <ageay>
Thu, 4 Apr 2013 06:00:13 +0000 (06:00 +0000)
committerageay <ageay>
Thu, 4 Apr 2013 06:00:13 +0000 (06:00 +0000)
src/MEDCoupling/MEDCouplingFieldDouble.cxx
src/MEDCoupling/MEDCouplingFieldTemplate.cxx

index d8b115566ec7287c8f62db5dc5d6b74306c572c3..1a92c0bf42d1dab0155f9c1a7c671f6b8585a1cb 100644 (file)
@@ -1847,4 +1847,27 @@ void MEDCouplingFieldDouble::WriteVTK(const char *fileName, const std::vector<co
 void MEDCouplingFieldDouble::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception)
 {
   stream << "MEDCouplingFieldDouble C++ instance at " << this << ". Name : \"" << _name << "\"." << std::endl;
+  const char *nat=0;
+  try
+    {
+      nat=MEDCouplingNatureOfField::GetRepr(_nature);
+      stream << "Nature of field : " << nat << ".\n";
+    }
+  catch(INTERP_KERNEL::Exception& e)
+    {  }
+  const MEDCouplingFieldDiscretization *fd(_type);
+  if(!fd)
+    stream << " No spatial discretization set !";
+  else
+    fd->reprQuickOverview(stream);
+  stream << std::endl;
+  if(!_mesh)
+    stream << "No mesh support defined !";
+  else
+    {
+      std::ostringstream oss;
+      _mesh->reprQuickOverview(oss);
+      std::string tmp(oss.str());
+      stream << "Mesh info : " << tmp.substr(0,tmp.find('\n'));
+    }
 }
index da3cd7a862783a92ce4777a9c40ac942671439a9..5a5a41c4472280eee2a2c860ee1adcfb95d027f4 100644 (file)
@@ -129,7 +129,7 @@ void MEDCouplingFieldTemplate::reprQuickOverview(std::ostream& stream) const thr
   try
     {
       nat=MEDCouplingNatureOfField::GetRepr(_nature);
-      stream << "Nature of field : " << nat << ".\n";
+      stream << "Nature of field template : " << nat << ".\n";
     }
   catch(INTERP_KERNEL::Exception& e)
     {  }