From: ageay Date: Fri, 17 Jan 2014 07:03:11 +0000 (+0000) Subject: Addition of QUAD9 to pass MEDReader tests. X-Git-Tag: V7_3_1b1^2~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=177af402991534401ff3026e2422f98c2b2b9351;p=modules%2Fmed.git Addition of QUAD9 to pass MEDReader tests. --- diff --git a/src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.cxx b/src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.cxx index 82278ad73..bca5fb2af 100644 --- a/src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.cxx +++ b/src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.cxx @@ -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. diff --git a/src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.hxx b/src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.hxx index 0e2d07e89..35194aecc 100644 --- a/src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.hxx +++ b/src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.hxx @@ -73,6 +73,7 @@ namespace INTERP_KERNEL void quad4bInit(); void quad8aInit(); void quad8bInit(); + void quad9aInit(); //3D void tetra4aInit();