X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNEL%2FInterpKernelMatrixTools.cxx;h=80d5f1d022f7b1ec789588262739b9116d2cab1d;hb=d426837c21eca9b56b9b8a7a7434aaf3969c8977;hp=97ba6bff8968f0339993400e82617f9c5ae2bb2e;hpb=10f37bf6f33a762626d7f1093b2f5450c1688667;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNEL/InterpKernelMatrixTools.cxx b/src/INTERP_KERNEL/InterpKernelMatrixTools.cxx index 97ba6bff8..80d5f1d02 100644 --- a/src/INTERP_KERNEL/InterpKernelMatrixTools.cxx +++ b/src/INTERP_KERNEL/InterpKernelMatrixTools.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D +// Copyright (C) 2007-2016 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 @@ -16,10 +16,13 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// Author : Anthony Geay (CEA/DEN) #include "InterpKernelMatrixTools.hxx" +#include "InterpKernelException.hxx" #include "InterpKernelAutoPtr.hxx" +#include #include namespace INTERP_KERNEL @@ -395,6 +398,11 @@ namespace INTERP_KERNEL void matrixProduct(const double *A, int n1, int p1, const double *B, int n2, int p2, double *C) { + if(p1!=n2) + { + std::ostringstream oss; oss << "matrixProduct : the size of input matrix are not coherent the nb of cols of input matrix #0 is " << p1 << " whereas the number of rows of input matrix #1 is " << n2 << " !"; + throw INTERP_KERNEL::Exception(oss.str().c_str()); + } for(int i=0;i