Salome HOME
typo-fix by Kunda
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingTimeDiscretization.cxx
index 40f7921bd5f60c6e5a0a8a3b61d0e1c3683045a8..1a2b029d44349a801e237600729de45703c95e0f 100644 (file)
@@ -374,7 +374,7 @@ void MEDCouplingTimeDiscretization::setSelectedComponents(const MEDCouplingTimeD
       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 !");
     }
 }
 
@@ -710,7 +710,7 @@ MEDCouplingTimeDiscretizationInt *MEDCouplingTimeDiscretizationInt::New(TypeOfTi
     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 !");
   }
 }
 
@@ -771,14 +771,12 @@ MEDCouplingTimeDiscretizationFloat *MEDCouplingTimeDiscretizationFloat::New(Type
     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.";
@@ -828,7 +826,7 @@ std::string MEDCouplingNoTimeLabel::getStringRepr() const
 {
   std::ostringstream stream;
   stream << REPR;
-  stream << "\nTime unit is : \"" << _time_unit << "\"";
+  stream << "\nTime unit is : \"" << getTimeUnit() << "\"";
   return stream.str();
 }
 
@@ -1217,7 +1215,7 @@ std::string MEDCouplingWithTimeStep::getStringRepr() const
 {
   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();
 }
 
@@ -1228,8 +1226,8 @@ void MEDCouplingWithTimeStep::synchronizeTimeWith(const MEDCouplingMesh *mesh)
   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
@@ -1705,7 +1703,7 @@ std::string MEDCouplingConstOnTimeInterval::getStringRepr() 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();
 }
 
@@ -1718,7 +1716,7 @@ void MEDCouplingConstOnTimeInterval::synchronizeTimeWith(const MEDCouplingMesh *
   _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
@@ -2090,8 +2088,8 @@ void MEDCouplingTwoTimeSteps::synchronizeTimeWith(const MEDCouplingMesh *mesh)
   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
@@ -2399,7 +2397,7 @@ std::string MEDCouplingLinearTime::getStringRepr() 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();
 }