-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
-// 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.
+// 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.
//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef GAUSS_LOCALIZATION_HXX
#define GAUSS_LOCALIZATION_HXX
template <class INTERLACING_TAG=FullInterlace> class GAUSS_LOCALIZATION;
template <class INTERLACING_TAG> ostream & operator<< (ostream &os,
- const GAUSS_LOCALIZATION<INTERLACING_TAG> &loc);
+ const GAUSS_LOCALIZATION<INTERLACING_TAG> &loc);
template <class INTERLACING_TAG> class GAUSS_LOCALIZATION : public GAUSS_LOCALIZATION_{
public:
public:
friend ostream & operator<< <INTERLACING_TAG>(ostream &os,
- const GAUSS_LOCALIZATION<INTERLACING_TAG> &loc);
+ const GAUSS_LOCALIZATION<INTERLACING_TAG> &loc);
GAUSS_LOCALIZATION() throw (MEDEXCEPTION);
GAUSS_LOCALIZATION(const string & locName,
- const MED_EN::medGeometryElement typeGeo,
- const int nGauss,
- const ArrayNoGauss & cooRef,
- const ArrayNoGauss & cooGauss,
- const vector<double> & wg) throw (MEDEXCEPTION);
+ const MED_EN::medGeometryElement typeGeo,
+ const int nGauss,
+ const ArrayNoGauss & cooRef,
+ const ArrayNoGauss & cooGauss,
+ const vector<double> & wg) throw (MEDEXCEPTION);
GAUSS_LOCALIZATION(const string & locName,
- const MED_EN::medGeometryElement typeGeo,
- const int nGauss,
- const double * const cooRef,
- const double * const cooGauss,
- const double * const wg) throw (MEDEXCEPTION);
+ const MED_EN::medGeometryElement typeGeo,
+ const int nGauss,
+ const double * const cooRef,
+ const double * const cooGauss,
+ const double * const wg) throw (MEDEXCEPTION);
//GAUSS_LOCALIZATION(const GAUSS_LOCALIZATION & loc); constructeur de recopie par défaut correct
virtual ~GAUSS_LOCALIZATION() {};
{}
template <class INTERLACING_TAG> GAUSS_LOCALIZATION<INTERLACING_TAG>::GAUSS_LOCALIZATION(const string & locName,
- const MED_EN::medGeometryElement typeGeo,
- const int nGauss,
- const ArrayNoGauss & cooRef,
- const ArrayNoGauss & cooGauss,
- const vector<double> & wg) throw (MEDEXCEPTION) :
+ const MED_EN::medGeometryElement typeGeo,
+ const int nGauss,
+ const ArrayNoGauss & cooRef,
+ const ArrayNoGauss & cooGauss,
+ const vector<double> & wg) throw (MEDEXCEPTION) :
_locName(locName),_typeGeo(typeGeo),_nGauss(nGauss),_cooRef(cooRef),_cooGauss(cooGauss),_wg(wg),
_interlacingType(SET_INTERLACING_TYPE<INTERLACING_TAG>::_interlacingType)
{
if (_cooRef.getArraySize() != (_typeGeo%100)*(_typeGeo/100) )
throw MEDEXCEPTION( LOCALIZED( STRING(LOC) <<"cooRef size is " << _cooRef.getArraySize()
- << " and should be (_typeGeo%100)*(_typeGeo/100) "
- << (_typeGeo%100)*(_typeGeo/100))) ;
+ << " and should be (_typeGeo%100)*(_typeGeo/100) "
+ << (_typeGeo%100)*(_typeGeo/100))) ;
if (_cooGauss.getArraySize() != _nGauss*(_typeGeo/100) )
throw MEDEXCEPTION( LOCALIZED( STRING(LOC) <<"cooGauss must be of size nGauss*(_typeGeo/100) "
- << _nGauss*(_typeGeo/100) ));
- if (_wg.size() != _nGauss )
+ << _nGauss*(_typeGeo/100) ));
+ if ((int)_wg.size() != _nGauss )
throw MEDEXCEPTION( LOCALIZED( STRING(LOC) <<"wg must be of size nGauss "
- << _nGauss ));
+ << _nGauss ));
END_OF_MED(LOC);
}
if (_cooRef.getArraySize() != (_typeGeo%100)*(_typeGeo/100) )
throw MEDEXCEPTION( LOCALIZED( STRING(LOC) <<"cooRef must be of size (_typeGeo%100)*(_typeGeo/100) "
- << (_typeGeo%100)*(_typeGeo/100))) ;
+ << (_typeGeo%100)*(_typeGeo/100))) ;
if (_cooGauss.getArraySize() != _nGauss*(_typeGeo/100) )
throw MEDEXCEPTION( LOCALIZED( STRING(LOC) <<"cooGauss must be of size nGauss*(_typeGeo/100) "
- << _nGauss*(_typeGeo/100) ));
- if (_wg.size() != _nGauss )
+ << _nGauss*(_typeGeo/100) ));
+ if ((int)_wg.size() != _nGauss )
throw MEDEXCEPTION( LOCALIZED( STRING(LOC) <<"wg must be of size nGauss "
- << _nGauss ));
+ << _nGauss ));
END_OF_MED(LOC);
}
template <class INTERLACING_TAG> bool
GAUSS_LOCALIZATION<INTERLACING_TAG>::operator == (const GAUSS_LOCALIZATION & gaussLoc) const {
return (
- _locName == gaussLoc._locName &&
- _typeGeo == gaussLoc._typeGeo &&
- _nGauss == gaussLoc._nGauss &&
- _cooRef == gaussLoc._cooRef && //utilisation de la copie superficielle par défaut n'est pas une bonne idée
- _cooGauss == gaussLoc._cooGauss && //dans l'opérateur = de MEDnArray
- _wg == gaussLoc._wg
- );
+ _locName == gaussLoc._locName &&
+ _typeGeo == gaussLoc._typeGeo &&
+ _nGauss == gaussLoc._nGauss &&
+ _cooRef == gaussLoc._cooRef && //utilisation de la copie superficielle par défaut n'est pas une bonne idée
+ _cooGauss == gaussLoc._cooGauss && //dans l'opérateur = de MEDnArray
+ _wg == gaussLoc._wg
+ );
}
template <class INTERLACING_TAG> ostream & operator<<(ostream &os,
- const GAUSS_LOCALIZATION<INTERLACING_TAG> &loc) {
+ const GAUSS_LOCALIZATION<INTERLACING_TAG> &loc) {
os << "Localization Name : " << loc._locName << endl;
os << "Geometric Type : " << MED_EN::geoNames[loc._typeGeo]<< endl;
os << "Number Of GaussPoints : " << loc._nGauss << endl;
os << "Ref. Element Coords : " << endl << loc._cooRef << endl;
os << "Gauss points Coords : " << endl << loc._cooGauss << endl;
os << "Gauss points weigth : " << endl ;
- for(int i=0; i<loc._wg.size();++i)
+ for(unsigned i=0; i<loc._wg.size();++i)
os << "_wg[" << i << "] = " << loc._wg[i] << endl;
return os;
}