if(arrays1[i]!=0 && arrays2[i]!=0)
arrays1[i]->setSelectedComponents(arrays2[i],compoIds);
else if(arrays1[i]!=0 || arrays2[i]!=0)
- throw INTERP_KERNEL::Exception("TimeDiscretization::setSelectedComponents : some time array in correspondance are not defined symetrically !");
+ throw INTERP_KERNEL::Exception("TimeDiscretization::setSelectedComponents : some time array in correspondence are not defined symmetrically !");
}
}
case MEDCouplingTimeDiscretizationInt::DISCRETIZATION:
return new MEDCouplingTimeDiscretizationInt;
default:
- throw INTERP_KERNEL::Exception("Time discretization not implemented yet for intergers !");
+ throw INTERP_KERNEL::Exception("Time discretization not implemented yet for integers !");
}
}
case MEDCouplingTimeDiscretizationFloat::DISCRETIZATION:
return new MEDCouplingTimeDiscretizationFloat;
default:
- throw INTERP_KERNEL::Exception("Time discretization not implemented yet for intergers !");
+ throw INTERP_KERNEL::Exception("Time discretization not implemented yet for integers !");
}
}
bool MEDCouplingTimeDiscretizationFloat::isEqualIfNotWhy(const MEDCouplingTimeDiscretizationTemplate<float> *other, float prec, std::string& reason) const
{
- if(prec!=0)
- throw INTERP_KERNEL::Exception("isEqualIfNotWhy : only precision equal to 0 supported for int !");
if(!other)
{
reason="Time discretization is NULL.";
{
std::ostringstream stream;
stream << REPR;
- stream << "\nTime unit is : \"" << _time_unit << "\"";
+ stream << "\nTime unit is : \"" << getTimeUnit() << "\"";
return stream.str();
}
{
std::ostringstream stream;
stream << REPR << " Time is defined by iteration=" << _tk.getIteration() << " order=" << _tk.getOrder() << " and time=" << _tk.getTimeValue() << ".";
- stream << "\nTime unit is : \"" << _time_unit << "\"";
+ stream << "\nTime unit is : \"" << getTimeUnit() << "\"";
return stream.str();
}
int it=-1,order=-1;
double val=mesh->getTime(it,order);
_tk.setAllInfo(val,it,order);
- std::string tUnit=mesh->getTimeUnit();
- _time_unit=tUnit;
+ std::string tUnit(mesh->getTimeUnit());
+ setTimeUnit(tUnit);
}
void MEDCouplingWithTimeStep::getTinySerializationIntInformation(std::vector<int>& tinyInfo) const
std::ostringstream stream;
stream << REPR << " Time interval is defined by :\niteration_start=" << _start.getIteration() << " order_start=" << _start.getOrder() << " and time_start=" << _start.getTimeValue() << "\n";
stream << "iteration_end=" << _end.getIteration() << " order_end=" << _end.getOrder() << " and end_time=" << _end.getTimeValue() << "\n";
- stream << "\nTime unit is : \"" << _time_unit << "\"";
+ stream << "\nTime unit is : \"" << getTimeUnit() << "\"";
return stream.str();
}
_start.setAllInfo(val,it,order);
_end.setAllInfo(val,it,order);
std::string tUnit(mesh->getTimeUnit());
- _time_unit=tUnit;
+ setTimeUnit(tUnit);
}
MEDCouplingTimeDiscretization *MEDCouplingConstOnTimeInterval::performCopyOrIncrRef(bool deepCopy) const
double val=mesh->getTime(it,order);
_start.setAllInfo(val,it,order);
_end.setAllInfo(val,it,order);
- std::string tUnit=mesh->getTimeUnit();
- _time_unit=tUnit;
+ std::string tUnit(mesh->getTimeUnit());
+ setTimeUnit(tUnit);
}
std::size_t MEDCouplingTwoTimeSteps::getHeapMemorySizeWithoutChildren() const
std::ostringstream stream;
stream << REPR << " Time interval is defined by :\niteration_start=" << _start.getIteration() << " order_start=" << _start.getOrder() << " and time_start=" << _start.getTimeValue() << "\n";
stream << "iteration_end=" << _end.getIteration() << " order_end=" << _end.getOrder() << " and end_time=" << _end.getTimeValue() << "\n";
- stream << "Time unit is : \"" << _time_unit << "\"";
+ stream << "Time unit is : \"" << getTimeUnit() << "\"";
return stream.str();
}