Salome HOME
Debug on Colinearize2D.
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingGaussLocalization.cxx
index 334873850d0623209dcaf1784cbe7c231d504091..327013db9335f8aa8aa280a12969145b6e340612 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #include <algorithm>
 
 ParaMEDMEM::MEDCouplingGaussLocalization::MEDCouplingGaussLocalization(INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
-                                                                       const std::vector<double>& gsCoo, const std::vector<double>& w) throw(INTERP_KERNEL::Exception)
+                                                                       const std::vector<double>& gsCoo, const std::vector<double>& w)
 try:_type(type),_ref_coord(refCoo),_gauss_coord(gsCoo),_weight(w)
-  {
-    checkCoherency();
-  }
+{
+  checkCoherency();
+}
 catch(INTERP_KERNEL::Exception& e)
-  {
+{
     _type=INTERP_KERNEL::NORM_ERROR;
     _ref_coord.clear();
     _gauss_coord.clear();
     _weight.clear();
     throw e;
-  }
+}
 
 ParaMEDMEM::MEDCouplingGaussLocalization::MEDCouplingGaussLocalization(INTERP_KERNEL::NormalizedCellType typ)
 try:_type(typ)
@@ -48,10 +48,10 @@ try:_type(typ)
   INTERP_KERNEL::CellModel::GetCellModel(_type);
 }
 catch(INTERP_KERNEL::Exception& e)
-  {
+{
     _type=INTERP_KERNEL::NORM_ERROR;
     throw e;
-  }
+}
 
 void ParaMEDMEM::MEDCouplingGaussLocalization::setType(INTERP_KERNEL::NormalizedCellType typ)
 {
@@ -74,8 +74,8 @@ void ParaMEDMEM::MEDCouplingGaussLocalization::checkCoherency() const
     }
   if(_gauss_coord.size()!=dim*_weight.size())
     {
-       std::ostringstream oss; oss << "Invalid gsCoo size and weight size : gsCoo.size() must be equal to _weight.size() * " << dim << " (dim) !";
-       throw INTERP_KERNEL::Exception(oss.str().c_str());
+      std::ostringstream oss; oss << "Invalid gsCoo size and weight size : gsCoo.size() must be equal to _weight.size() * " << dim << " (dim) !";
+      throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
 }