{
static const char msg0[]="No coordinates specified !";
std::ostringstream ret;
+ if(!_cm)
+ {
+ ret << "No geometric type specified" << std::endl;
+ return ret.str();
+ }
ret << "Single static geometic type (" << _cm->getRepr() << ") unstructured mesh with name : \"" << getName() << "\"\n";
ret << "Description of mesh : \"" << getDescription() << "\"\n";
int tmpp1,tmpp2;
void MEDCoupling1SGTUMesh::reprQuickOverview(std::ostream& stream) const
{
- stream << "MEDCoupling1SGTUMesh C++ instance at " << this << ". Type=" << _cm->getRepr() << ". Name : \"" << getName() << "\".";
+ stream << "MEDCoupling1SGTUMesh C++ instance at " << this << ". Type=";
+ if(!_cm)
+ {
+ stream << "Not set";
+ return ;
+ }
+ stream << _cm->getRepr() << ". Name : \"" << getName() << "\".";
stream << " Mesh dimension : " << getMeshDimension() << ".";
if(!_coords)
{ stream << " No coordinates set !"; return ; }
std::string MEDCoupling1DGTUMesh::simpleRepr() const
{
static const char msg0[]="No coordinates specified !";
+ if(!_cm)
+ return std::string("Cell type not specified");
std::ostringstream ret;
ret << "Single dynamic geometic type (" << _cm->getRepr() << ") unstructured mesh with name : \"" << getName() << "\"\n";
ret << "Description of mesh : \"" << getDescription() << "\"\n";
void MEDCoupling1DGTUMesh::reprQuickOverview(std::ostream& stream) const
{
- stream << "MEDCoupling1DGTUMesh C++ instance at " << this << ". Type=" << _cm->getRepr() << ". Name : \"" << getName() << "\".";
+ stream << "MEDCoupling1DGTUMesh C++ instance at " << this << ". Type=";
+ if(!_cm)
+ {
+ stream << "Not defined";
+ return ;
+ }
+ stream << _cm->getRepr() << ". Name : \"" << getName() << "\".";
stream << " Mesh dimension : " << getMeshDimension() << ".";
if(!_coords)
{ stream << " No coordinates set !"; return ; }