Salome HOME
[EDF26877] : Improvement of precision of integral computation of fields on Gauss...
[tools/medcoupling.git] / src / INTERP_KERNEL / GaussPoints / InterpKernelGaussCoords.hxx
index 409cbc5f256873d41ca24f61ace3f1a3f294739e..5afdfa7d293c5a041447ca181a86673c6c050b95 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2022  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
@@ -23,6 +23,7 @@
 #include "INTERPKERNELDefines.hxx"
 #include "NormalizedUnstructuredMesh.hxx"
 #include "InterpKernelException.hxx"
+#include "MCIdType.hxx"
 
 #include <vector>
 
@@ -56,12 +57,14 @@ namespace INTERP_KERNEL
 
     INTERPKERNEL_EXPORT GaussInfo convertToLinear() const;
 
-    INTERPKERNEL_EXPORT const double* getFunctionValues( const int theGaussId ) const;
+    INTERPKERNEL_EXPORT const double *getFunctionValues( const int theGaussId ) const;
+    INTERPKERNEL_EXPORT const double *getDerivativeOfShapeFunctionAt( const int theGaussId ) const;
 
     INTERPKERNEL_EXPORT void initLocalInfo();
     
     INTERPKERNEL_EXPORT static std::vector<double> NormalizeCoordinatesIfNecessary(NormalizedCellType ct, int inputDim, const std::vector<double>& inputArray);
-
+    INTERPKERNEL_EXPORT static std::vector<double> GetDefaultReferenceCoordinatesOf(NormalizedCellType ct);
+    INTERPKERNEL_EXPORT static bool IsInOrOutForReference(NormalizedCellType ct, const double *ptInRefCoo, double eps);
   public:
     static const double SEG2A_REF[2];
     static const double SEG2B_REF[2];
@@ -88,6 +91,8 @@ namespace INTERP_KERNEL
     static const double PENTA6B_REF[18];
     static const double PENTA15A_REF[45];
     static const double PENTA15B_REF[45];
+    static const double PENTA18A_REF[54];
+    static const double PENTA18B_REF[54];
     static const double HEXA8A_REF[24];
     static const double HEXA8B_REF[24];
     static const double HEXA20A_REF[60];
@@ -147,6 +152,10 @@ namespace INTERP_KERNEL
     static void Penta15aInit(GaussInfo& obj) { obj.penta15aInit(); }
     void penta15bInit();
     static void Penta15bInit(GaussInfo& obj) { obj.penta15bInit(); }
+    void penta18aInit();
+    static void Penta18aInit(GaussInfo& obj) { obj.penta18aInit(); }
+    void penta18bInit();
+    static void Penta18bInit(GaussInfo& obj) { obj.penta18bInit(); }
 
     void hexa8aInit();
     static void Hexa8aInit(GaussInfo& obj) { obj.hexa8aInit(); }
@@ -186,6 +195,7 @@ namespace INTERP_KERNEL
     int                _my_local_nb_ref;             //Nb of the local reference coordinates
 
     DataVector         _my_function_value;          //Shape Function values
+    DataVector         _my_derivative_func_value;   //Derivative of the shape function
   };
 
 
@@ -200,23 +210,23 @@ namespace INTERP_KERNEL
     INTERPKERNEL_EXPORT void addGaussInfo( NormalizedCellType theGeometry,
                                            int coordDim,
                                            const double* theGaussCoord,
-                                           int theNbGauss,
+                                           mcIdType theNbGauss,
                                            const double* theReferenceCoord,
-                                           int theNbRef);
+                                           mcIdType theNbRef);
 
     INTERPKERNEL_EXPORT double* calculateCoords( NormalizedCellType theGeometry, 
                                                  const double* theNodeCoords, 
                                                  const int theSpaceDim,
-                                                 const int* theIndex);
+                                                 const mcIdType* theIndex);
 
     INTERPKERNEL_EXPORT void calculateCoords( NormalizedCellType theGeometry, 
                                               const double* theNodeCoords, 
                                               const int theSpaceDim,
-                                              const int* theIndex,
+                                              const mcIdType* theIndex,
                                               double *result);
   private:
     const GaussInfo *getInfoGivenCellType(NormalizedCellType cellType);
-    void calculateCoordsAlg(const GaussInfo *info, const double* theNodeCoords, const int theSpaceDim, const int *theIndex,
+    void calculateCoordsAlg(const GaussInfo *info, const double* theNodeCoords, const int theSpaceDim, const mcIdType *theIndex,
                             double *result);
   private:
     typedef std::vector<GaussInfo*> GaussInfoVector;