From: geay Date: Wed, 12 Feb 2014 11:54:59 +0000 (+0100) Subject: Addition of new reference coords including degenerated cells. X-Git-Tag: V7_3_1b1^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=105e922749ed7f81c8090c878f896244b856939e;p=tools%2Fmedcoupling.git Addition of new reference coords including degenerated cells. --- diff --git a/src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.cxx b/src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.cxx index bca5fb2af..121a2c255 100644 --- a/src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.cxx +++ b/src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.cxx @@ -187,13 +187,51 @@ bool GaussInfo::isSatisfy() return anIsSatisfy; } +std::vector GaussInfo::NormalizeCoordinatesIfNecessary(NormalizedCellType ct, int inputDim, const std::vector& inputArray) +{ + std::size_t sz(inputArray.size()),dim((std::size_t)inputDim); + if(dim==0) + throw INTERP_KERNEL::Exception("GaussInfo::NormalizeCoordinatesIfNecessary : invalid dimension ! Must be !=0 !"); + if(sz%dim!=0) + throw INTERP_KERNEL::Exception("GaussInfo::NormalizeCoordinatesIfNecessary : invalid input array ! Inconsistent with the given dimension !"); + const CellModel& cm(CellModel::GetCellModel(ct)); + std::size_t baseDim((std::size_t)cm.getDimension()); + if(baseDim==dim) + return inputArray; + std::size_t nbOfItems(sz/dim); + std::vector ret(nbOfItems*baseDim); + if(baseDim>dim) + { + for(std::size_t i=0;i NormalizeCoordinatesIfNecessary(NormalizedCellType ct, int inputDim, const std::vector& inputArray); protected: @@ -70,7 +72,13 @@ namespace INTERP_KERNEL void tria6bInit(); void quad4aInit(); + static void Quad4aInit(GaussInfo& obj) { obj.quad4aInit(); } void quad4bInit(); + static void Quad4bInit(GaussInfo& obj) { obj.quad4bInit(); } + void quad4cInit(); + static void Quad4cInit(GaussInfo& obj) { obj.quad4cInit(); } + void quad4DegSeg2Init(); + static void Quad4DegSeg2Init(GaussInfo& obj) { obj.quad4DegSeg2Init(); } void quad8aInit(); void quad8bInit(); void quad9aInit(); @@ -87,12 +95,27 @@ namespace INTERP_KERNEL void pyra13bInit(); void penta6aInit(); + static void Penta6aInit(GaussInfo& obj) { obj.penta6aInit(); } void penta6bInit(); + static void Penta6bInit(GaussInfo& obj) { obj.penta6bInit(); } + void penta6DegTria3aInit(); + static void Penta6DegTria3aInit(GaussInfo& obj) { obj.penta6DegTria3aInit(); } + void penta6DegTria3bInit(); + static void Penta6DegTria3bInit(GaussInfo& obj) { obj.penta6DegTria3bInit(); } + void penta15aInit(); void penta15bInit(); void hexa8aInit(); + static void Hexa8aInit(GaussInfo& obj) { obj.hexa8aInit(); } void hexa8bInit(); + static void Hexa8bInit(GaussInfo& obj) { obj.hexa8bInit(); } + void hexa8DegQuad4aInit(); + static void Hexa8DegQuad4aInit(GaussInfo& obj) { obj.hexa8DegQuad4aInit(); } + void hexa8DegQuad4bInit(); + static void Hexa8DegQuad4bInit(GaussInfo& obj) { obj.hexa8DegQuad4bInit(); } + void hexa8DegQuad4cInit(); + static void Hexa8DegQuad4cInit(GaussInfo& obj) { obj.hexa8DegQuad4cInit(); } void hexa20aInit(); void hexa20bInit();