void MEDCouplingCMesh::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception)
{
- stream << "MEDCouplingCMesh C++ instance at " << this << ".";
+ stream << "MEDCouplingCMesh C++ instance at " << this << ". Name : \"" << getName() << "\".";
const DataArrayDouble *thisArr[3]={_x_array,_y_array,_z_array};
std::ostringstream stream2[3];
bool isDef[3];
void MEDCouplingCurveLinearMesh::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception)
{
- stream << "MEDCouplingCurveLinearMesh C++ instance at " << this << "." << std::endl;
+ stream << "MEDCouplingCurveLinearMesh C++ instance at " << this << ". Name : \"" << getName() << "\".";
stream << "Nodal structure : [";
for(std::size_t i=0;i<_structure.size();i++)
{
void MEDCouplingExtrudedMesh::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception)
{
- stream << "MEDCouplingExtrudedMesh C++ instance at " << this << ".";
+ stream << "MEDCouplingExtrudedMesh C++ instance at " << this << ". Name : \"" << getName() << "\".";
}
std::string MEDCouplingExtrudedMesh::getVTKDataSetType() const throw(INTERP_KERNEL::Exception)
void MEDCouplingFieldDouble::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception)
{
+ stream << "MEDCouplingFieldDouble C++ instance at " << this << ". Name : \"" << _name << "\"." << std::endl;
}
void MEDCouplingFieldTemplate::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception)
{
- stream << "MEDCouplingFieldTemplate C++ instance at " << this << "." << std::endl;
+ stream << "MEDCouplingFieldTemplate C++ instance at " << this << ". Name : \"" << _name << "\"." << std::endl;
const char *nat=0;
try
{
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'));
+ }
}
double tt=getTime(tmpp1,tmpp2);
ret << "Time attached to the mesh [unit] : " << tt << " [" << getTimeUnit() << "]\n";
ret << "Iteration : " << tmpp1 << " Order : " << tmpp2 << "\n";
- ret << "Mesh dimension : " << _mesh_dim << "\nSpace dimension : ";
+ if(_mesh_dim>=-1)
+ { ret << "Mesh dimension : " << _mesh_dim << "\nSpace dimension : "; }
+ else
+ { ret << " Mesh dimension has not been set or is invalid !"; }
if(_coords!=0)
{
const int spaceDim=getSpaceDimension();
void MEDCouplingUMesh::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception)
{
- stream << "MEDCouplingUMesh C++ instance at " << this << ".";
+ stream << "MEDCouplingUMesh C++ instance at " << this << ". Name : \"" << getName() << "\".";
if(_mesh_dim==-2)
{ stream << " Not set !"; return ; }
stream << " Mesh dimension : " << _mesh_dim << ".";
void MEDCouplingUMeshDesc::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception)
{
- stream << "MEDCouplingUMeshDesc C++ instance at " << this << ".";
+ stream << "MEDCouplingUMeshDesc C++ instance at " << this << ". Name : \"" << getName() << "\".";
}
}
std::string __str__() const throw(INTERP_KERNEL::Exception)
- {
- return self->simpleRepr();
- }
+ {
+ return self->simpleRepr();
+ }
+
+ std::string __repr__() const throw(INTERP_KERNEL::Exception)
+ {
+ std::ostringstream oss;
+ self->reprQuickOverview(oss);
+ return oss.str();
+ }
}
};
return self->simpleRepr();
}
+ std::string __repr__() const throw(INTERP_KERNEL::Exception)
+ {
+ std::ostringstream oss;
+ self->reprQuickOverview(oss);
+ return oss.str();
+ }
+
DataArrayDouble *getArray() throw(INTERP_KERNEL::Exception)
{
DataArrayDouble *ret=self->getArray();
}
/*!
- * Returns a pointer to mesh at the specified level.
+ * Returns a pointer to mesh at the specified level. ** WARNING **, if the input \a meshDimRelToMaxExt is set to one (nodes),
+ * The returned mesh ** will be not valid **. It is a feature, because MEDLoader do not creates cells that do not exist !
+ * To build a valid MEDCouplingUMesh instance from the returned value when \a meshDimRelToMaxExt is equal to one, simply
+ * call MEDCouplingUMesh::Build0DMeshFromCoords.
*
* \return a pointer to unstructured mesh that need to be managed by the caller.
* \warning the returned pointer has to be managed by the caller.