00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // This library is free software; you can redistribute it and/or 00004 // modify it under the terms of the GNU Lesser General Public 00005 // License as published by the Free Software Foundation; either 00006 // version 2.1 of the License. 00007 // 00008 // This library is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 // Lesser General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU Lesser General Public 00014 // License along with this library; if not, write to the Free Software 00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 // 00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00018 // 00019 00020 // File : MED_GaussDef.hxx 00021 // Module : MED 00022 // Author : Edward AGAPOV (eap) 00023 // $Header: 00024 // 00025 #ifndef MED_GaussDef_HeaderFile 00026 #define MED_GaussDef_HeaderFile 00027 00028 #include "MED_WrapperBase.hxx" 00029 00030 //#include "MED_GaussUtils.hxx" <<<---- avoid dependence on boost 00031 #include <vector> 00032 00033 namespace MED 00034 { 00035 class TShapeFun; 00036 typedef std::vector<double> TDoubleVector; 00040 struct TGaussDef 00041 { 00042 int myType; 00043 TDoubleVector myRefCoords; 00044 TDoubleVector myCoords; 00045 TDoubleVector myWeights; 00046 00059 MEDWRAPPER_EXPORT TGaussDef(const int geomType, const int nbPoints, const int variant=1); 00060 00061 MEDWRAPPER_EXPORT int dim() const { return myType/100; } 00062 MEDWRAPPER_EXPORT int nbPoints() const { return myWeights.capacity(); } 00063 00064 private: 00065 void add(const double x, const double weight); 00066 void add(const double x, const double y, const double weight); 00067 void add(const double x, const double y, const double z, const double weight); 00068 void setRefCoords(const TShapeFun& aShapeFun); 00069 }; 00070 } 00071 00072 #endif