Salome HOME
Addition of QUAD9 to pass MEDReader tests.
authorageay <ageay>
Fri, 17 Jan 2014 07:03:11 +0000 (07:03 +0000)
committerageay <ageay>
Fri, 17 Jan 2014 07:03:11 +0000 (07:03 +0000)
src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.cxx
src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.hxx

index 82278ad732f272bbff899798a2dc7a92efa02dcd..bca5fb2af1ef4656613b923ee8fd0551f83ac58b 100644 (file)
@@ -267,6 +267,14 @@ void GaussInfo::initLocalInfo()
         }
       break;
 
+    case NORM_QUAD9:
+      _my_local_ref_dim = 2;
+      _my_local_nb_ref  = 9;
+      quad9aInit();
+      aSatify = isSatisfy();
+      CHECK_MACRO;
+      break;
+
     case NORM_TETRA4:
       _my_local_ref_dim = 3;
       _my_local_nb_ref  = 4;
@@ -431,7 +439,7 @@ void GaussInfo::seg3Init()
    LOCAL_COORD_MACRO_END;
 
    SHAPE_FUN_MACRO_BEGIN;
-   funValue[0] = 0.5*(1.0 - gc[0])*gc[0];
+   funValue[0] = -0.5*(1.0 - gc[0])*gc[0];
    funValue[1] = 0.5*(1.0 + gc[0])*gc[0];
    funValue[2] = (1.0 + gc[0])*(1.0 - gc[0]);
    SHAPE_FUN_MACRO_END;
@@ -760,6 +768,60 @@ void GaussInfo::quad8bInit()
    SHAPE_FUN_MACRO_END;
 }
 
+void GaussInfo::quad9aInit()
+{
+  LOCAL_COORD_MACRO_BEGIN;
+ case  0:
+   coords[0] = -1.0;
+   coords[1] = -1.0;
+   break;
+ case  1:
+   coords[0] =  1.0;
+   coords[1] = -1.0;
+   break;
+ case  2:
+   coords[0] =  1.0;
+   coords[1] =  1.0;
+   break;
+ case  3:
+   coords[0] = -1.0;
+   coords[1] =  1.0;
+   break;
+ case  4:
+   coords[0] =  0.0;
+   coords[1] = -1.0;
+   break;
+ case  5:
+   coords[0] =  1.0;
+   coords[1] =  0.0;
+   break;
+ case  6:
+   coords[0] =  0.0;
+   coords[1] =  1.0;
+   break;
+ case  7:
+   coords[0] = -1.0;
+   coords[1] =  0.0;
+   break;
+ case  8:
+   coords[0] =  0.0;
+   coords[1] =  0.0;
+   break;
+   LOCAL_COORD_MACRO_END;
+
+   SHAPE_FUN_MACRO_BEGIN;
+   funValue[0] = 0.25*gc[0]*gc[1]*(gc[0]-1.)*(gc[1]-1.);
+   funValue[1] = 0.25*gc[0]*gc[1]*(gc[0]+1.)*(gc[1]-1.);
+   funValue[2] = 0.25*gc[0]*gc[1]*(gc[0]+1.)*(gc[1]+1.);
+   funValue[3] = 0.25*gc[0]*gc[1]*(gc[0]-1.)*(gc[1]+1.);
+   funValue[4] = 0.5*(1.-gc[0]*gc[0])*gc[1]*(gc[1]-1.);
+   funValue[5] = 0.5*gc[0]*(gc[0]+1.)*(1.-gc[1]*gc[1]);
+   funValue[6] = 0.5*(1.-gc[0]*gc[0])*gc[1]*(gc[1]+1.);
+   funValue[7] = 0.5*gc[0]*(gc[0]-1.)*(1.-gc[1]*gc[1]);
+   funValue[8] = (1.-gc[0]*gc[0])*(1.-gc[1]*gc[1]);
+   SHAPE_FUN_MACRO_END;
+}
+
 /*!
  * Init Tetrahedron Reference coordinates ans Shape function.
  * Case A.
index 0e2d07e89b00c8569ed9e4d20f67a9c5346abb47..35194aeccc7a1fefa721aa9fb25a7b903d22a54c 100644 (file)
@@ -73,6 +73,7 @@ namespace INTERP_KERNEL
     void quad4bInit();
     void quad8aInit();
     void quad8bInit();
+    void quad9aInit();
 
     //3D
     void tetra4aInit();