From 71f81cc9a9416fed2d51d63c35c0cb9138ecbbf2 Mon Sep 17 00:00:00 2001 From: geay Date: Fri, 7 Mar 2014 15:49:54 +0100 Subject: [PATCH] Addition of TRI7 shape functions. And addition of management of NORM_POINT1 type. --- .../GaussPoints/InterpKernelGaussCoords.cxx | 92 ++++++++++++++++--- .../GaussPoints/InterpKernelGaussCoords.hxx | 7 +- .../MEDCouplingFieldDiscretization.cxx | 12 +++ .../MEDCouplingFieldDiscretization.hxx | 1 + src/MEDCoupling_Swig/MEDCouplingBasicsTest.py | 24 +++++ 5 files changed, 123 insertions(+), 13 deletions(-) diff --git a/src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.cxx b/src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.cxx index 14f8af006..b049d6475 100644 --- a/src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.cxx +++ b/src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.cxx @@ -234,6 +234,14 @@ void GaussInfo::initLocalInfo() const CellModel& cellModel(CellModel::GetCellModel(_my_geometry)); switch( _my_geometry ) { + case NORM_POINT1: + _my_local_ref_dim = 0; + _my_local_nb_ref = 1; + point1Init(); + aSatify = isSatisfy(); + CHECK_MACRO; + break; + case NORM_SEG2: _my_local_ref_dim = 1; _my_local_nb_ref = 2; @@ -277,6 +285,14 @@ void GaussInfo::initLocalInfo() } break; + case NORM_TRI7: + _my_local_ref_dim = 2; + _my_local_nb_ref = 7; + tria7aInit(); + aSatify = isSatisfy(); + CHECK_MACRO; + break; + case NORM_QUAD4: { _my_local_ref_dim = 2; @@ -401,18 +417,19 @@ void GaussInfo::initLocalInfo() break; case NORM_PENTA15: - _my_local_ref_dim = 3; - _my_local_nb_ref = 15; - penta15aInit(); - aSatify = isSatisfy(); - - if(!aSatify) - { - penta15bInit(); - aSatify = isSatisfy(); - CHECK_MACRO; - } - break; + { + _my_local_ref_dim = 3; + _my_local_nb_ref = 15; + MapToShapeFunction PENTA15PTR[]={Penta15aInit,Penta15bInit}; + std::size_t NB_OF_PENTA15PTR(sizeof(PENTA15PTR)/sizeof(MapToShapeFunction)); + for(std::size_t i=0;i