X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNEL%2FOrientationInverter.cxx;h=d8b191802c3d196877838571d78a20ba98839d29;hb=b33408f1dc045a4d0f2e16d22f4930d7029996a3;hp=c23a75b902e2f87d2e7a2d9d5276e4131150014a;hpb=4e3de127a60f9ffb63abae1d17ed01f3f6711fd2;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNEL/OrientationInverter.cxx b/src/INTERP_KERNEL/OrientationInverter.cxx index c23a75b90..d8b191802 100644 --- a/src/INTERP_KERNEL/OrientationInverter.cxx +++ b/src/INTERP_KERNEL/OrientationInverter.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2019 CEA/DEN, EDF R&D +// Copyright (C) 2007-2021 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 @@ -72,7 +72,7 @@ OrientationInverter *OrientationInverter::BuildInstanceFrom(NormalizedCellType g } } -void OrientationInverterChecker::check(int *beginPt, int *endPt) const +void OrientationInverterChecker::check(mcIdType *beginPt, mcIdType *endPt) const { if(std::distance(beginPt,endPt)!=getNbNodes()) { @@ -81,72 +81,72 @@ void OrientationInverterChecker::check(int *beginPt, int *endPt) const } } -void OrientationInverterSEG2::operateAndShutUp(int *beginPt) const +void OrientationInverterSEG2::operateAndShutUp(mcIdType *beginPt) const { std::swap(beginPt[0],beginPt[1]); } -void OrientationInverterSEG3::operateAndShutUp(int *beginPt) const +void OrientationInverterSEG3::operateAndShutUp(mcIdType *beginPt) const { std::swap(beginPt[0],beginPt[2]); } -void OrientationInverter2DLinear::operateAndShutUp(int *beginPt) const +void OrientationInverter2DLinear::operateAndShutUp(mcIdType *beginPt) const { std::reverse(beginPt+1,beginPt+getNbNodes()); } -void OrientationInverter2DQuadratic::operateAndShutUp(int *beginPt) const +void OrientationInverter2DQuadratic::operateAndShutUp(mcIdType *beginPt) const { int nbNodes(getNbNodes()); std::reverse(beginPt+1,beginPt+nbNodes/2); std::reverse(beginPt+nbNodes/2,beginPt+nbNodes); } -void OrientationInverterPolygon::operate(int *beginPt, int *endPt) const +void OrientationInverterPolygon::operate(mcIdType *beginPt, mcIdType *endPt) const { std::reverse(beginPt+1,endPt); } -void OrientationInverterQPolygon::operate(int *beginPt, int *endPt) const +void OrientationInverterQPolygon::operate(mcIdType *beginPt, mcIdType *endPt) const { std::size_t sz(std::distance(beginPt,endPt)); std::reverse(beginPt+1,beginPt+sz/2); std::reverse(beginPt+sz/2,endPt); } -void OrientationInverterTetra4::operateAndShutUp(int *beginPt) const +void OrientationInverterTetra4::operateAndShutUp(mcIdType *beginPt) const { std::swap(beginPt[1],beginPt[2]); } -void OrientationInverterTetra10::operateAndShutUp(int *beginPt) const +void OrientationInverterTetra10::operateAndShutUp(mcIdType *beginPt) const { std::swap(beginPt[1],beginPt[2]); std::swap(beginPt[4],beginPt[6]); std::swap(beginPt[8],beginPt[9]); } -void OrientationInverterPyra5::operateAndShutUp(int *beginPt) const +void OrientationInverterPyra5::operateAndShutUp(mcIdType *beginPt) const { std::reverse(beginPt+1,beginPt+4); } -void OrientationInverterPyra13::operateAndShutUp(int *beginPt) const +void OrientationInverterPyra13::operateAndShutUp(mcIdType *beginPt) const { std::reverse(beginPt+1,beginPt+4); std::reverse(beginPt+5,beginPt+9); std::swap(beginPt[10],beginPt[12]); } -void OrientationInverter3DExtrusionLinear::operateAndShutUp(int *beginPt) const +void OrientationInverter3DExtrusionLinear::operateAndShutUp(mcIdType *beginPt) const { int nbNodes(getNbNodes()); std::reverse(beginPt+1,beginPt+nbNodes/2); std::reverse(beginPt+nbNodes/2+1,beginPt+nbNodes); } -void OrientationInverter3DExtrusionQuadratic::operateAndShutUp(int *beginPt) const +void OrientationInverter3DExtrusionQuadratic::operateAndShutUp(mcIdType *beginPt) const { int nbNodes(getNbNodes()),nbNodesLinearBase(nbNodes/5); std::reverse(beginPt+1,beginPt+nbNodesLinearBase);