1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef __INTERPKERNELGAUSS_HXX__
21 #define __INTERPKERNELGAUSS_HXX__
23 #include "INTERPKERNELDefines.hxx"
24 #include "NormalizedUnstructuredMesh.hxx"
25 #include "InterpKernelException.hxx"
29 namespace INTERP_KERNEL
31 typedef std::vector<double> DataVector;
32 typedef std::vector<int> IndexVector;
34 //Class to store Gauss Points information
35 class INTERPKERNEL_EXPORT GaussInfo
38 GaussInfo( NormalizedCellType theGeometry,
39 const DataVector& theGaussCoord,
41 const DataVector& theReferenceCoord,
46 NormalizedCellType getCellType() const;
48 int getGaussCoordDim() const;
49 int getReferenceCoordDim() const;
51 int getNbGauss() const;
54 const double* getFunctionValues( const int theGaussId ) const;
56 void initLocalInfo() throw (INTERP_KERNEL::Exception);
100 //INFORMATION from MEDMEM
101 NormalizedCellType _my_geometry; //Cell type
103 int _my_nb_gauss; //Nb of the gauss points for element
104 DataVector _my_gauss_coord; //Gauss coordinates
106 int _my_nb_ref; //Nb of the nodes for element:
112 DataVector _my_reference_coord; //Reference coordinates
115 DataVector _my_local_reference_coord; //Vector to store reference coordinates
116 int _my_local_ref_dim; //Dimension of the local reference coordinates:
119 // (x, y, z) - 3D case
120 int _my_local_nb_ref; //Nb of the local reference coordinates
122 DataVector _my_function_value; //Shape Function values
126 //Class for calculation of the coordinates of the gauss points
127 class INTERPKERNEL_EXPORT GaussCoords
134 void addGaussInfo( NormalizedCellType theGeometry,
136 const double* theGaussCoord,
138 const double* theReferenceCoord,
139 int theNbRef) throw (INTERP_KERNEL::Exception);
141 double* calculateCoords( NormalizedCellType theGeometry,
142 const double* theNodeCoords,
143 const int theSpaceDim,
144 const int* theIndex) throw(INTERP_KERNEL::Exception);
146 void calculateCoords( NormalizedCellType theGeometry,
147 const double* theNodeCoords,
148 const int theSpaceDim,
150 double *result) throw(INTERP_KERNEL::Exception);
152 const GaussInfo *getInfoGivenCellType(NormalizedCellType cellType);
153 void calculateCoordsAlg(const GaussInfo *info, const double* theNodeCoords, const int theSpaceDim, const int *theIndex,
156 typedef std::vector<GaussInfo*> GaussInfoVector;
157 GaussInfoVector _my_gauss_info;
160 #endif //INTERPKERNELGAUSS