From: geay Date: Fri, 4 Apr 2014 14:23:54 +0000 (+0200) Subject: End of auto indentation with Eclipse. And one bug found. X-Git-Tag: V7_4_0b1~2^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aa60c5c907c78293330a22ecee21476f72a9ec34;p=tools%2Fmedcoupling.git End of auto indentation with Eclipse. And one bug found. --- diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DBounds.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DBounds.cxx index da586f518..b11931f18 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DBounds.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DBounds.cxx @@ -28,7 +28,7 @@ using namespace INTERP_KERNEL; const double& Bounds::operator[](int i) const { switch(i) - { + { case 0: return _x_min; case 1: @@ -37,14 +37,14 @@ const double& Bounds::operator[](int i) const return _y_min; case 3: return _y_max; - } + } throw Exception("internal error occurs !"); } double &Bounds::operator[](int i) { switch(i) - { + { case 0: return _x_min; case 1: @@ -53,7 +53,7 @@ double &Bounds::operator[](int i) return _y_min; case 3: return _y_max; - } + } throw Exception("internal error occurs !"); } @@ -152,10 +152,12 @@ Bounds *Bounds::nearlyAmIIntersectingWith(const Bounds& other) const || (other._y_max < _y_min-QUADRATIC_PLANAR::_precision) ) return 0; if( (other._x_min >= _x_max ) || (other._x_max <= _x_min) || (other._y_min >= _y_max) || (other._y_max <= _y_min) ) - return new Bounds(std::max(_x_min-QUADRATIC_PLANAR::_precision,other._x_min), - std::min(_x_max+QUADRATIC_PLANAR::_precision,other._x_max), - std::max(_y_min-QUADRATIC_PLANAR::_precision,other._y_min), - std::min(_y_max+QUADRATIC_PLANAR::_precision,other._y_max));//In approx cases. + { + return new Bounds(std::max(_x_min-QUADRATIC_PLANAR::_precision,other._x_min), + std::min(_x_max+QUADRATIC_PLANAR::_precision,other._x_max), + std::max(_y_min-QUADRATIC_PLANAR::_precision,other._y_min), + std::min(_y_max+QUADRATIC_PLANAR::_precision,other._y_max));//In approx cases. + } else return new Bounds(std::max(_x_min,other._x_min),std::min(_x_max,other._x_max),std::max(_y_min,other._y_min),std::min(_y_max,other._y_max)); } diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DBounds.hxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DBounds.hxx index 30480f749..3182e5579 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DBounds.hxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DBounds.hxx @@ -31,13 +31,13 @@ namespace INTERP_KERNEL * Relative LOC */ typedef enum - { - IN = 0, - OUT = 1, - ON_BOUNDARY_POS = 2, - ON_BOUNDARY_NEG = 3 - } Position; - + { + IN = 0, + OUT = 1, + ON_BOUNDARY_POS = 2, + ON_BOUNDARY_NEG = 3 + } Position; + class INTERPKERNEL_EXPORT Bounds { public: diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.cxx index 2670f5686..e3a738530 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.cxx @@ -284,7 +284,7 @@ void ComposedEdge::unApplyGlobalSimilarityExt(ComposedEdge& other, double xBary, unApplySimilarityOnMyNodes(xBary,yBary,fact); other.unApplySimilarityOnMyNodesIfNotAlreadyHit(xBary,yBary,fact); initEdgeHitStatus(); - other.initEdgeHitStatus(); + other.initEdgeHitStatus(); unApplySimilarityOnMyEdges(xBary,yBary,fact); other.unApplySimilarityOnMyEdgesIfNotAlreadyHit(xBary,yBary,fact); } @@ -367,7 +367,7 @@ void ComposedEdge::applyGlobalSimilarity2(ComposedEdge *other, double xBary, dou applySimilarityOnMyNodes(xBary,yBary,dimChar); other->applySimilarityOnMyNodesIfNotAlreadyHit(xBary,yBary,dimChar); initEdgeHitStatus(); - other->initEdgeHitStatus(); + other->initEdgeHitStatus(); applySimilarityOnMyEdges(xBary,yBary,dimChar); other->applySimilarityOnMyEdgesIfNotAlreadyHit(xBary,yBary,dimChar); } @@ -409,7 +409,7 @@ void ComposedEdge::getAllNodes(std::set& output) const } void ComposedEdge::initNodeHitStatus() const - { +{ for(std::list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) { (*iter)->getStartNode()->initHitStatus(); @@ -595,7 +595,7 @@ double ComposedEdge::isInOrOutAlg(Node *nodeToTest, std::set< IntersectElement > for(std::list< IntersectElement >::iterator iter2=listOfIntesc.begin();iter2!=listOfIntesc.end();iter2++) if((*iter2).isIncludedByBoth()) inOutSwitch.insert(*iter2); - } + } //if overlapped we can forget } else @@ -607,7 +607,7 @@ double ComposedEdge::isInOrOutAlg(Node *nodeToTest, std::set< IntersectElement > /*bool ComposedEdge::isInOrOut(Node *aNodeOn, Node *nodeToTest) const { - + EdgeInfLin *e1=new EdgeInfLin(aNodeOn,nodeToTest); double ref=e1->getCharactValue(*nodeToTest); set< IntersectElement > inOutSwitch; diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.cxx index f13b409dd..479161824 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.cxx @@ -31,7 +31,7 @@ using namespace INTERP_KERNEL; MergePoints::MergePoints():_ass1Start1(0),_ass1End1(0),_ass1Start2(0),_ass1End2(0), - _ass2Start1(0),_ass2End1(0),_ass2Start2(0),_ass2End2(0) + _ass2Start1(0),_ass2End1(0),_ass2Start2(0),_ass2End2(0) { } @@ -165,20 +165,20 @@ unsigned MergePoints::getNumberOfAssociations() const IntersectElement::IntersectElement(double val1, double val2, bool start1, bool end1, bool start2, bool end2, Node *node , const Edge& e1, const Edge& e2, bool keepOrder):_1S(keepOrder?start1:start2), - _1E(keepOrder?end1:end2), - _2S(keepOrder?start2:start1), - _2E(keepOrder?end2:end1), - _chararct_val_for_e1(keepOrder?val1:val2), - _chararct_val_for_e2(keepOrder?val2:val1), - _node(node),_loc_of_node(node->getLoc()),_e1(keepOrder?e1:e2), - _e2(keepOrder?e2:e1) + _1E(keepOrder?end1:end2), + _2S(keepOrder?start2:start1), + _2E(keepOrder?end2:end1), + _chararct_val_for_e1(keepOrder?val1:val2), + _chararct_val_for_e2(keepOrder?val2:val1), + _node(node),_loc_of_node(node->getLoc()),_e1(keepOrder?e1:e2), + _e2(keepOrder?e2:e1) { } IntersectElement::IntersectElement(const IntersectElement& other):_1S(other._1S),_1E(other._1E),_2S(other._2S),_2E(other._2E), - _chararct_val_for_e1(other._chararct_val_for_e1), - _chararct_val_for_e2(other._chararct_val_for_e2),_node(other._node), - _loc_of_node(other._loc_of_node),_e1(other._e1), _e2(other._e2) + _chararct_val_for_e1(other._chararct_val_for_e1), + _chararct_val_for_e2(other._chararct_val_for_e2),_node(other._node), + _loc_of_node(other._loc_of_node),_e1(other._e1), _e2(other._e2) { if(_node) _node->incrRef(); @@ -302,7 +302,7 @@ bool IntersectElement::isIncludedByBoth() const { return _e1.isIn(_chararct_val_for_e1) && _e2.isIn(_chararct_val_for_e2); } - + bool EdgeIntersector::intersect(const Bounds *whereToFind, std::vector& newNodes, bool& order, MergePoints& commonNode) { std::list< IntersectElement > listOfIntesc=getIntersectionsCharacteristicVal(); @@ -358,7 +358,7 @@ bool EdgeIntersector::intersect(const Bounds *whereToFind, std::vector& * Locates 'node' regarding edge this->_e1. If node is located close to (with distant lt epsilon) start or end point of _e1, * 'node' takes its place. In this case 'obvious' is set to true and 'commonNode' stores information of merge point and finally 'where' is set. * Furthermore 'node' is declared as ON LIMIT to indicate in locating process that an absolute location computation will have to be done. - * If 'node' is not close to start or end point of _e1, 'obvious' is set to false and 'commonNode' and 'where' are let unchanged. + * If 'node' is not close to start or end point of _e1, 'obvious' is set to false and 'commonNode' and 'where' are let unchanged. */ void EdgeIntersector::obviousCaseForCurvAbscisse(Node *node, TypeOfLocInEdge& where, MergePoints& commonNode, bool& obvious) const { @@ -438,7 +438,7 @@ void Edge::declareOut() const void Edge::fillXfigStreamForLoc(std::ostream& stream) const { switch(_loc) - { + { case FULL_IN_1: stream << '2';//Green break; @@ -450,7 +450,7 @@ void Edge::fillXfigStreamForLoc(std::ostream& stream) const break; default: stream << '0'; - } + } } bool Edge::changeStartNodeWith(Node *otherStartNode) const @@ -662,7 +662,7 @@ EdgeIntersector *Edge::BuildIntersectorWith(const Edge *e1, const Edge *e2) e2->dynCastFunction(tmp1,tmp2); type1|=type2; switch(type1) - { + { case 1:// Intersection seg/seg ret=new SegSegIntersector((const EdgeLin &)(*e1),(const EdgeLin &)(*e2)); break; @@ -675,7 +675,7 @@ EdgeIntersector *Edge::BuildIntersectorWith(const Edge *e1, const Edge *e2) default: //Should never happen throw Exception("A non managed association of edge has been detected. Go work for intersection computation implementation."); - } + } return ret; } @@ -755,48 +755,49 @@ bool Edge::SplitOverlappedEdges(const Edge *e1, const Edge *e2, Node *nS, Node * { Edge *tmp; switch(code) - { + { case OUT_BEFORE*OFFSET_FOR_TYPEOFLOCINEDGE+START: // OUT_BEFORE - START case OUT_BEFORE*OFFSET_FOR_TYPEOFLOCINEDGE+OUT_BEFORE: // OUT_BEFORE - OUT_BEFORE case OUT_AFTER*OFFSET_FOR_TYPEOFLOCINEDGE+OUT_AFTER: // OUT_AFTER - OUT_AFTER case END*OFFSET_FOR_TYPEOFLOCINEDGE+OUT_AFTER: // END - OUT_AFTER case END*OFFSET_FOR_TYPEOFLOCINEDGE+START: // END - START - return false; + return false; case INSIDE*OFFSET_FOR_TYPEOFLOCINEDGE+OUT_AFTER: // INSIDE - OUT_AFTER - outVal1.pushBack(e1->buildEdgeLyingOnMe(e1->getStartNode(),nS,true)); - tmp=e1->buildEdgeLyingOnMe(nS,e1->getEndNode()); tmp->incrRef(); - outVal1.pushBack(tmp); - outVal2.resize(2); - outVal2.setValueAt(direction?0:1,tmp,direction); tmp->declareOn(); - outVal2.setValueAt(direction?1:0,e1->buildEdgeLyingOnMe(e1->getEndNode(),nE,direction)); - return true; + outVal1.pushBack(e1->buildEdgeLyingOnMe(e1->getStartNode(),nS,true)); + tmp=e1->buildEdgeLyingOnMe(nS,e1->getEndNode()); tmp->incrRef(); + outVal1.pushBack(tmp); + outVal2.resize(2); + outVal2.setValueAt(direction?0:1,tmp,direction); tmp->declareOn(); + outVal2.setValueAt(direction?1:0,e1->buildEdgeLyingOnMe(e1->getEndNode(),nE,direction)); + return true; case INSIDE*OFFSET_FOR_TYPEOFLOCINEDGE+INSIDE: // INSIDE - INSIDE - { - if(!e2->isIn(e2->getCharactValue(*(e1->getStartNode())))) - { - e2->incrRef(); e2->incrRef(); - outVal1.resize(3); - outVal1.setValueAt(0,e1->buildEdgeLyingOnMe(e1->getStartNode(),nS)); - outVal1.setValueAt(1,const_cast(e2),direction); - outVal1.setValueAt(2,e1->buildEdgeLyingOnMe(nE,e1->getEndNode())); - outVal2.pushBack(const_cast(e2)); e2->declareOn(); - return true; - } - else - { - outVal1.resize(3); - outVal2.resize(3); - tmp=e1->buildEdgeLyingOnMe(e1->getStartNode(),nE); tmp->incrRef(); tmp->declareOn(); - outVal1.setValueAt(0,tmp,true); outVal2.setValueAt(direction?2:0,tmp,direction); - outVal1.setValueAt(1,e1->buildEdgeLyingOnMe(nE,nS)); - tmp=e1->buildEdgeLyingOnMe(nS,e1->getEndNode()); tmp->incrRef(); tmp->declareOn(); - outVal1.setValueAt(2,tmp,true); outVal2.setValueAt(direction?0:2,tmp,direction); - tmp=e1->buildEdgeLyingOnMe(e1->getEndNode(),e1->getStartNode()); - outVal2.setValueAt(1,tmp,direction); - return true; - } - } + { + if(!e2->isIn(e2->getCharactValue(*(e1->getStartNode())))) + { + e2->incrRef(); e2->incrRef(); + outVal1.resize(3); + outVal1.setValueAt(0,e1->buildEdgeLyingOnMe(e1->getStartNode(),nS)); + outVal1.setValueAt(1,const_cast(e2),direction); + outVal1.setValueAt(2,e1->buildEdgeLyingOnMe(nE,e1->getEndNode())); + outVal2.pushBack(const_cast(e2)); e2->declareOn(); + return true; + } + else + { + outVal1.resize(3); + outVal2.resize(3); + tmp=e1->buildEdgeLyingOnMe(e1->getStartNode(),nE); tmp->incrRef(); tmp->declareOn(); + outVal1.setValueAt(0,tmp,true); outVal2.setValueAt(direction?2:0,tmp,direction); + outVal1.setValueAt(1,e1->buildEdgeLyingOnMe(nE,nS)); + tmp=e1->buildEdgeLyingOnMe(nS,e1->getEndNode()); tmp->incrRef(); tmp->declareOn(); + outVal1.setValueAt(2,tmp,true); outVal2.setValueAt(direction?0:2,tmp,direction); + tmp=e1->buildEdgeLyingOnMe(e1->getEndNode(),e1->getStartNode()); + outVal2.setValueAt(1,tmp,direction); + return true; + } + } case OUT_BEFORE*OFFSET_FOR_TYPEOFLOCINEDGE+INSIDE: // OUT_BEFORE - INSIDE + { tmp=e1->buildEdgeLyingOnMe(e1->getStartNode(),nE); tmp->incrRef(); outVal1.pushBack(tmp); outVal1.pushBack(e1->buildEdgeLyingOnMe(nE,e1->getEndNode())); @@ -804,7 +805,9 @@ bool Edge::SplitOverlappedEdges(const Edge *e1, const Edge *e2, Node *nS, Node * outVal2.setValueAt(direction?0:1,e1->buildEdgeLyingOnMe(nS,e1->getStartNode(),direction)); outVal2.setValueAt(direction?1:0,tmp,direction); tmp->declareOn(); return true; + } case OUT_BEFORE*OFFSET_FOR_TYPEOFLOCINEDGE+OUT_AFTER: // OUT_BEFORE - OUT_AFTER + { e1->incrRef(); e1->incrRef(); outVal1.pushBack(const_cast(e1)); outVal2.resize(3); @@ -812,38 +815,50 @@ bool Edge::SplitOverlappedEdges(const Edge *e1, const Edge *e2, Node *nS, Node * outVal2.setValueAt(1,const_cast(e1),direction); e1->declareOn(); outVal2.setValueAt(direction?2:0,e1->buildEdgeLyingOnMe(e1->getEndNode(),nE,direction)); return true; + } case START*OFFSET_FOR_TYPEOFLOCINEDGE+END: // START - END + { e1->incrRef(); e1->incrRef(); outVal1.pushBack(const_cast(e1)); outVal2.pushBack(const_cast(e1),direction); e1->declareOn(); return true; + } case START*OFFSET_FOR_TYPEOFLOCINEDGE+OUT_AFTER: // START - OUT_AFTER + { e1->incrRef(); e1->incrRef(); outVal1.pushBack(const_cast(e1)); outVal2.resize(2); outVal2.setValueAt(direction?0:1,const_cast(e1),direction); e1->declareOn(); outVal2.setValueAt(direction?1:0,e1->buildEdgeLyingOnMe(e1->getEndNode(),nE,direction)); return true; + } case INSIDE*OFFSET_FOR_TYPEOFLOCINEDGE+END: // INSIDE - END + { e2->incrRef(); e2->incrRef(); outVal1.pushBack(e1->buildEdgeLyingOnMe(e1->getStartNode(),nS,true)); outVal1.pushBack(const_cast(e2),direction); outVal2.pushBack(const_cast(e2)); e2->declareOn(); return true; + } case OUT_BEFORE*OFFSET_FOR_TYPEOFLOCINEDGE+END: // OUT_BEFORE - END + { e1->incrRef(); e1->incrRef(); outVal1.pushBack(const_cast(e1)); outVal2.resize(2); outVal2.setValueAt(direction?0:1,e1->buildEdgeLyingOnMe(nS,e1->getStartNode(),direction)); outVal2.setValueAt(direction?1:0,const_cast(e1),direction); e1->declareOn(); return true; + } case START*OFFSET_FOR_TYPEOFLOCINEDGE+INSIDE: // START - INSIDE + { e2->incrRef(); e2->incrRef(); outVal1.pushBack(const_cast(e2),direction); outVal1.pushBack(e1->buildEdgeLyingOnMe(nE,e1->getEndNode())); outVal2.pushBack(const_cast(e2)); e2->declareOn(); return true; + } case INSIDE*OFFSET_FOR_TYPEOFLOCINEDGE+START: // INSIDE - START + { outVal1.resize(2); outVal2.resize(2); tmp=e1->buildEdgeLyingOnMe(nS,e1->getEndNode()); tmp->incrRef(); tmp->declareOn(); @@ -852,7 +867,9 @@ bool Edge::SplitOverlappedEdges(const Edge *e1, const Edge *e2, Node *nS, Node * outVal2.setValueAt(direction?0:1,tmp,direction); outVal2.setValueAt(direction?1:0,e1->buildEdgeLyingOnMe(e1->getEndNode(),nE,direction)); return true; + } case END*OFFSET_FOR_TYPEOFLOCINEDGE+INSIDE: // END - INSIDE + { outVal1.resize(2); outVal2.resize(2); tmp=e1->buildEdgeLyingOnMe(e1->getStartNode(),nE); tmp->incrRef(); tmp->declareOn(); @@ -861,9 +878,10 @@ bool Edge::SplitOverlappedEdges(const Edge *e1, const Edge *e2, Node *nS, Node * outVal2.setValueAt(direction?0:1,e1->buildEdgeLyingOnMe(e1->getEndNode(),e1->getStartNode(),direction)); outVal2.setValueAt(direction?1:0,tmp,direction); return true; + } default: throw Exception("Unexpected situation of overlapping edges : internal error occurs ! "); - } + } } bool Edge::isEqual(const Edge& other) const diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.hxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.hxx index 1f05e54d3..857aa9f42 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.hxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.hxx @@ -34,34 +34,34 @@ namespace INTERP_KERNEL { typedef enum - { - SEG = 1, - ARC_CIRCLE = 4, - ARC_PARABOL = 8 - } TypeOfFunction; + { + SEG = 1, + ARC_CIRCLE = 4, + ARC_PARABOL = 8 + } TypeOfFunction; typedef enum - { - CIRCLE = 0 , - PARABOL = 1 - } TypeOfMod4QuadEdge; + { + CIRCLE = 0 , + PARABOL = 1 + } TypeOfMod4QuadEdge; typedef enum - { - START = 5, - END = 1, - INSIDE = 2, - OUT_BEFORE = 3, - OUT_AFTER = 4 - } TypeOfLocInEdge; //see Edge::OFFSET_FOR_TYPEOFLOCINEDGE - + { + START = 5, + END = 1, + INSIDE = 2, + OUT_BEFORE = 3, + OUT_AFTER = 4 + } TypeOfLocInEdge; //see Edge::OFFSET_FOR_TYPEOFLOCINEDGE + typedef enum - { - FULL_IN_1 = 1, - FULL_ON_1 = 4, - FULL_OUT_1 = 2, - FULL_UNKNOWN = 3 - } TypeOfEdgeLocInPolygon; + { + FULL_IN_1 = 1, + FULL_ON_1 = 4, + FULL_OUT_1 = 2, + FULL_UNKNOWN = 3 + } TypeOfEdgeLocInPolygon; class INTERPKERNEL_EXPORT MergePoints { diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.cxx index 9bd2c7bad..a40da7b2c 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.cxx @@ -325,8 +325,8 @@ void ArcCSegIntersector::areOverlappedOrOnlyColinears(const Bounds *whereToFind, _dy=(*(_e2.getEndNode()))[1]-(*(_e2.getStartNode()))[1]; _drSq=_dx*_dx+_dy*_dy; _cross= - ((*(_e2.getStartNode()))[0]-center[0])*((*(_e2.getEndNode()))[1]-center[1])- - ((*(_e2.getStartNode()))[1]-center[1])*((*(_e2.getEndNode()))[0]-center[0]); + ((*(_e2.getStartNode()))[0]-center[0])*((*(_e2.getEndNode()))[1]-center[1])- + ((*(_e2.getStartNode()))[1]-center[1])*((*(_e2.getEndNode()))[0]-center[0]); _determinant=getE1().getRadius()*getE1().getRadius()/_drSq-_cross*_cross/(_drSq*_drSq); if(_determinant>-2*QUADRATIC_PLANAR::_precision)//QUADRATIC_PLANAR::_precision*QUADRATIC_PLANAR::_precision*_drSq*_drSq/(2.*_dx*_dx)) obviousNoIntersection=false; @@ -418,7 +418,7 @@ EdgeArcCircle::EdgeArcCircle(double sX, double sY, double mX, double mY, double * @param deltaAngle in ]-2.*Pi;2.*Pi[ */ EdgeArcCircle::EdgeArcCircle(Node *start, Node *end, const double *center, double radius, double angle0, double deltaAngle, bool direction):Edge(start,end,direction),_angle(deltaAngle), - _angle0(angle0),_radius(radius) + _angle0(angle0),_radius(radius) { _center[0]=center[0]; _center[1]=center[1]; @@ -562,7 +562,7 @@ void EdgeArcCircle::GetArcOfCirclePassingThru(const double *start, const double angleInRad0=GetAbsoluteAngleOfNormalizedVect((start[0]-center[0])/radius,(start[1]-center[1])/radius); double angleInRadM=GetAbsoluteAngleOfNormalizedVect((middle[0]-center[0])/radius,(middle[1]-center[1])/radius); angleInRad=GetAbsoluteAngleOfNormalizedVect(((start[0]-center[0])*(end[0]-center[0])+(start[1]-center[1])*(end[1]-center[1]))/(radius*radius), - ((start[0]-center[0])*(end[1]-center[1])-(start[1]-center[1])*(end[0]-center[0]))/(radius*radius)); + ((start[0]-center[0])*(end[1]-center[1])-(start[1]-center[1])*(end[0]-center[0]))/(radius*radius)); if(IsAngleNotIn(angleInRad0,angleInRad,angleInRadM)) angleInRad=angleInRad<0?2*M_PI+angleInRad:angleInRad-2*M_PI; } @@ -643,10 +643,10 @@ void EdgeArcCircle::getBarycenterOfZone(double *bary) const double tmp3=cos(angle1); double tmp4=cos(_angle0); bary[0]=_radius*x0*y0*(tmp4-tmp3)+_radius*_radius*(y0*(cos(2*_angle0)-cos(2*angle1))/4.+ - x0*(_angle/2.+(sin(2.*_angle0)-sin(2.*angle1))/4.)) - +tmp2*(tmp1*tmp1*tmp1-tmp0*tmp0*tmp0)/3.; + x0*(_angle/2.+(sin(2.*_angle0)-sin(2.*angle1))/4.)) + +tmp2*(tmp1*tmp1*tmp1-tmp0*tmp0*tmp0)/3.; bary[1]=y0*y0*_radius*(tmp4-tmp3)/2.+_radius*_radius*y0*(_angle/2.+(sin(2.*_angle0)-sin(2.*angle1))/4.) - +tmp2*(tmp4-tmp3+(tmp3*tmp3*tmp3-tmp4*tmp4*tmp4)/3.)/2.; + +tmp2*(tmp4-tmp3+(tmp3*tmp3*tmp3-tmp4*tmp4*tmp4)/3.)/2.; } void EdgeArcCircle::getMiddleOfPoints(const double *p1, const double *p2, double *mid) const diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.hxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.hxx index 8153150a4..1cf71f465 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.hxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.hxx @@ -66,7 +66,7 @@ namespace INTERP_KERNEL double _cross; double _determinant; }; - + class INTERPKERNEL_EXPORT EdgeArcCircle : public Edge { public: diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx index d50a2411c..1fceea007 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx @@ -95,8 +95,8 @@ std::list< IntersectElement > SegSegIntersector::getIntersectionsCharacteristicV bool i_2S=_e2.getStartNode()->isEqual(*node); bool i_2E=_e2.getEndNode()->isEqual(*node); ret.push_back(IntersectElement(_e1.getCharactValue(*node), - _e2.getCharactValue(*node), - i_1S,i_1E,i_2S,i_2E,node,_e1,_e2,keepOrder())); + _e2.getCharactValue(*node), + i_1S,i_1E,i_2S,i_2E,node,_e1,_e2,keepOrder())); return ret; } diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.hxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.hxx index 6b59aeb92..43aa4d12a 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.hxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.hxx @@ -27,23 +27,23 @@ namespace INTERP_KERNEL { class INTERPKERNEL_EXPORT SegSegIntersector : SameTypeEdgeIntersector - { - friend class Edge; - public: - SegSegIntersector(const EdgeLin& e1, const EdgeLin& e2); - bool areColinears() const; - bool haveTheySameDirection() const; - void getPlacements(Node *start, Node *end, TypeOfLocInEdge& whereStart, TypeOfLocInEdge& whereEnd, MergePoints& commonNode) const; - void areOverlappedOrOnlyColinears(const Bounds *whereToFind, bool& obviousNoIntersection, bool& areOverlapped); - std::list< IntersectElement > getIntersectionsCharacteristicVal() const; - private: - void getCurveAbscisse(Node *node, TypeOfLocInEdge& where, MergePoints& commonNode) const; - private: - //! index on which all single index op will be performed. Filled in case colinearity is equal to true. - int _ind; - double _col[2]; - double _matrix[4];//SPACEDIM*SPACEDIM - }; + { + friend class Edge; + public: + SegSegIntersector(const EdgeLin& e1, const EdgeLin& e2); + bool areColinears() const; + bool haveTheySameDirection() const; + void getPlacements(Node *start, Node *end, TypeOfLocInEdge& whereStart, TypeOfLocInEdge& whereEnd, MergePoints& commonNode) const; + void areOverlappedOrOnlyColinears(const Bounds *whereToFind, bool& obviousNoIntersection, bool& areOverlapped); + std::list< IntersectElement > getIntersectionsCharacteristicVal() const; + private: + void getCurveAbscisse(Node *node, TypeOfLocInEdge& where, MergePoints& commonNode) const; + private: + //! index on which all single index op will be performed. Filled in case colinearity is equal to true. + int _ind; + double _col[2]; + double _matrix[4];//SPACEDIM*SPACEDIM + }; class INTERPKERNEL_EXPORT EdgeLin : public Edge { diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.hxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.hxx index 51f907532..d8e112bd4 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.hxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.hxx @@ -32,17 +32,17 @@ namespace INTERP_KERNEL { typedef enum - { - IN_1 = 7, - ON_1 = 8, - ON_LIM_1 = 12, - ON_TANG_1 = 9, - OUT_1 = 10, - UNKNOWN = 11 - } TypeOfLocInPolygon; + { + IN_1 = 7, + ON_1 = 8, + ON_LIM_1 = 12, + ON_TANG_1 = 9, + OUT_1 = 10, + UNKNOWN = 11 + } TypeOfLocInPolygon; class Bounds; - + /*! * Representation of a 2D point, and potentially its location relative to a polygon. * As nodes can be shared between edges it is handled with ref counting. diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx index a1df7ca5c..5df47c7fc 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx @@ -47,7 +47,7 @@ QuadraticPolygon::QuadraticPolygon(const char *file) std::ifstream stream(file); stream.exceptions(std::ios_base::eofbit); try - { + { do stream.getline(currentLine,MAX_SIZE_OF_LINE_XFIG_FILE); while(strcmp(currentLine,"1200 2")!=0); @@ -59,10 +59,10 @@ QuadraticPolygon::QuadraticPolygon(const char *file) pushBack(newEdge); } while(1); - } + } catch(std::ifstream::failure&) - { - } + { + } front()->changeStartNodeWith(back()->getEndNode()); } @@ -269,12 +269,12 @@ double QuadraticPolygon::intersectWithAbs(QuadraticPolygon& other) * the cell id in global other mesh. */ void QuadraticPolygon::splitAbs(QuadraticPolygon& other, - const std::map& mapThis, const std::map& mapOther, - int offset1, int offset2 , - const std::vector& otherEdgeIds, - std::vector& edgesThis, int cellIdThis, - std::vector< std::vector >& edgesInOtherColinearWithThis, std::vector< std::vector >& subDivOther, - std::vector& addCoo) + const std::map& mapThis, const std::map& mapOther, + int offset1, int offset2 , + const std::vector& otherEdgeIds, + std::vector& edgesThis, int cellIdThis, + std::vector< std::vector >& edgesInOtherColinearWithThis, std::vector< std::vector >& subDivOther, + std::vector& addCoo) { double xBaryBB, yBaryBB; double fact=normalizeExt(&other, xBaryBB, yBaryBB); @@ -553,8 +553,8 @@ void QuadraticPolygon::buildFromCrudeDataArray2(const std::map >& intersectEdges, - const INTERP_KERNEL::QuadraticPolygon& pol1, const int *descBg1, const int *descEnd1, - const std::vector >& intersectEdges1, const std::vector< std::vector >& colinear1) const + const INTERP_KERNEL::QuadraticPolygon& pol1, const int *descBg1, const int *descEnd1, + const std::vector >& intersectEdges1, const std::vector< std::vector >& colinear1) const { std::size_t nbOfSeg=std::distance(descBg,descEnd); for(std::size_t i=0;i::const_iterator it=cpyOfOther._sub_edges.begin();it!=cpyOfOther._sub_edges.end();it++) { switch((*it)->getLoc()) - { + { case FULL_IN_1: { ret += fabs((*it)->getPtr()->getCurveLength()); @@ -703,7 +703,7 @@ double QuadraticPolygon::intersectWithAbs1D(QuadraticPolygon& other, bool& isCol default: { } - } + } } return ret * fact; } @@ -730,7 +730,7 @@ double QuadraticPolygon::intersectWithAbs(QuadraticPolygon& other, double* baryc { barycenter[0]=barycenter[0]/ret*fact+xBaryBB; barycenter[1]=barycenter[1]/ret*fact+yBaryBB; - + } return ret*fact*fact; } @@ -899,7 +899,7 @@ void QuadraticPolygon::SplitPolygonsEachOther(QuadraticPolygon& pol1, QuadraticP it1=curE2->getIterator(); for(;!it1.finished();) { - + ElementaryEdge* curE1=it1.current(); merge.clear(); nbOfSplits++; if(curE1->getPtr()->intersectWith(curE2->getPtr(),merge,*c1,*c2)) diff --git a/src/MEDCoupling/MEDCouplingDefinitionTime.cxx b/src/MEDCoupling/MEDCouplingDefinitionTime.cxx index c3f5f5cfb..3d3bf7cc1 100644 --- a/src/MEDCoupling/MEDCouplingDefinitionTime.cxx +++ b/src/MEDCoupling/MEDCouplingDefinitionTime.cxx @@ -33,7 +33,7 @@ MEDCouplingDefinitionTimeSlice *MEDCouplingDefinitionTimeSlice::New(const MEDCou if(!f) throw INTERP_KERNEL::Exception("MEDCouplingDefinitionTimeSlice::New : empty field !"); switch(f->getTimeDiscretization()) - { + { case ONE_TIME: { if(arrId.size()!=1) @@ -56,13 +56,13 @@ MEDCouplingDefinitionTimeSlice *MEDCouplingDefinitionTimeSlice::New(const MEDCou throw INTERP_KERNEL::Exception("Invalide time discretization ! NO_TIME ! Impossible to build a definition time slice !"); default: throw INTERP_KERNEL::Exception("Invalide time discretization : Not recognized !"); - } + } } MEDCouplingDefinitionTimeSlice *MEDCouplingDefinitionTimeSlice::New(TypeOfTimeDiscretization type, const std::vector& tiI, const std::vector& tiD) { switch(type) - { + { case ONE_TIME: return MEDCouplingDefinitionTimeSliceInst::New(tiI,tiD); case CONST_ON_TIME_INTERVAL: @@ -71,7 +71,7 @@ MEDCouplingDefinitionTimeSlice *MEDCouplingDefinitionTimeSlice::New(TypeOfTimeDi return MEDCouplingDefinitionTimeSliceLT::New(tiI,tiD); default: throw INTERP_KERNEL::Exception("MEDCouplingDefinitionTimeSlice::New : unrecognized time discretization type !"); - } + } } bool MEDCouplingDefinitionTimeSlice::isEqual(const MEDCouplingDefinitionTimeSlice& other, double eps) const diff --git a/src/MEDCoupling/MEDCouplingDefinitionTime.hxx b/src/MEDCoupling/MEDCouplingDefinitionTime.hxx index 314bbcb89..638e1b26a 100644 --- a/src/MEDCoupling/MEDCouplingDefinitionTime.hxx +++ b/src/MEDCoupling/MEDCouplingDefinitionTime.hxx @@ -112,7 +112,7 @@ namespace ParaMEDMEM double _start; double _end; }; - + class MEDCouplingDefinitionTimeSliceLT : public MEDCouplingDefinitionTimeSlice { public: diff --git a/src/MEDCoupling/MEDCouplingField.cxx b/src/MEDCoupling/MEDCouplingField.cxx index 4ec3a937e..a9d5ff5e4 100644 --- a/src/MEDCoupling/MEDCouplingField.cxx +++ b/src/MEDCoupling/MEDCouplingField.cxx @@ -300,7 +300,7 @@ void MEDCouplingField::setMesh(const MEDCouplingMesh *mesh) * \throw If size of any vector do not match the \a type. */ void MEDCouplingField::setGaussLocalizationOnType(INTERP_KERNEL::NormalizedCellType type, const std::vector& refCoo, - const std::vector& gsCoo, const std::vector& wg) throw(INTERP_KERNEL::Exception) + const std::vector& gsCoo, const std::vector& wg) { if(!_mesh) throw INTERP_KERNEL::Exception("Mesh has to be set before calling setGaussLocalizationOnType method !"); @@ -326,7 +326,7 @@ void MEDCouplingField::setGaussLocalizationOnType(INTERP_KERNEL::NormalizedCellT * \throw If the range [_begin_,_end_) is empty. */ void MEDCouplingField::setGaussLocalizationOnCells(const int *begin, const int *end, const std::vector& refCoo, - const std::vector& gsCoo, const std::vector& wg) throw(INTERP_KERNEL::Exception) + const std::vector& gsCoo, const std::vector& wg) { if(!_mesh) throw INTERP_KERNEL::Exception("Mesh has to be set before calling setGaussLocalizationOnCells method !"); @@ -474,7 +474,7 @@ MEDCouplingField::MEDCouplingField(TypeOfField type):_nature(NoNature),_mesh(0), } MEDCouplingField::MEDCouplingField(const MEDCouplingField& other, bool deepCopy):RefCountObject(other),_name(other._name),_desc(other._desc),_nature(other._nature), - _mesh(0),_type(0) + _mesh(0),_type(0) { if(other._mesh) { diff --git a/src/MEDCoupling/MEDCouplingField.hxx b/src/MEDCoupling/MEDCouplingField.hxx index d0f408d1a..6d4625d70 100644 --- a/src/MEDCoupling/MEDCouplingField.hxx +++ b/src/MEDCoupling/MEDCouplingField.hxx @@ -73,9 +73,9 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT int getNumberOfMeshPlacesExpected() const; // Gauss point specific methods MEDCOUPLING_EXPORT void setGaussLocalizationOnType(INTERP_KERNEL::NormalizedCellType type, const std::vector& refCoo, - const std::vector& gsCoo, const std::vector& wg) throw(INTERP_KERNEL::Exception); + const std::vector& gsCoo, const std::vector& wg); MEDCOUPLING_EXPORT void setGaussLocalizationOnCells(const int *begin, const int *end, const std::vector& refCoo, - const std::vector& gsCoo, const std::vector& wg) throw(INTERP_KERNEL::Exception); + const std::vector& gsCoo, const std::vector& wg); MEDCOUPLING_EXPORT void clearGaussLocalizations(); MEDCOUPLING_EXPORT MEDCouplingGaussLocalization& getGaussLocalization(int locId); MEDCOUPLING_EXPORT int getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const; diff --git a/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx b/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx index 29496bba3..08aa48cdf 100644 --- a/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx +++ b/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx @@ -128,7 +128,7 @@ MEDCouplingFieldDiscretization::MEDCouplingFieldDiscretization():_precision(DFLT MEDCouplingFieldDiscretization *MEDCouplingFieldDiscretization::New(TypeOfField type) { switch(type) - { + { case MEDCouplingFieldDiscretizationP0::TYPE: return new MEDCouplingFieldDiscretizationP0; case MEDCouplingFieldDiscretizationP1::TYPE: @@ -141,7 +141,7 @@ MEDCouplingFieldDiscretization *MEDCouplingFieldDiscretization::New(TypeOfField return new MEDCouplingFieldDiscretizationKriging; default: throw INTERP_KERNEL::Exception("Choosen discretization is not implemented yet."); - } + } } TypeOfField MEDCouplingFieldDiscretization::GetTypeOfFieldFromStringRepr(const std::string& repr) @@ -353,13 +353,13 @@ double MEDCouplingFieldDiscretization::getIJK(const MEDCouplingMesh *mesh, const } void MEDCouplingFieldDiscretization::setGaussLocalizationOnType(const MEDCouplingMesh *m, INTERP_KERNEL::NormalizedCellType type, const std::vector& refCoo, - const std::vector& gsCoo, const std::vector& wg) throw(INTERP_KERNEL::Exception) + const std::vector& gsCoo, const std::vector& wg) { throw INTERP_KERNEL::Exception("Invalid method for the corresponding field discretization : available only for GaussPoint discretization !"); } void MEDCouplingFieldDiscretization::setGaussLocalizationOnCells(const MEDCouplingMesh *m, const int *begin, const int *end, const std::vector& refCoo, - const std::vector& gsCoo, const std::vector& wg) throw(INTERP_KERNEL::Exception) + const std::vector& gsCoo, const std::vector& wg) { throw INTERP_KERNEL::Exception("Invalid method for the corresponding field discretization : available only for GaussPoint discretization !"); } @@ -423,7 +423,7 @@ void MEDCouplingFieldDiscretization::RenumberEntitiesFromO2NArr(double eps, cons if(newNb>=0)//if newNb<0 the node is considered as out. { if(std::find_if(ptToFill+newNb*nbOfComp,ptToFill+(newNb+1)*nbOfComp,std::bind2nd(std::not_equal_to(),std::numeric_limits::max())) - ==ptToFill+(newNb+1)*nbOfComp) + ==ptToFill+(newNb+1)*nbOfComp) std::copy(ptSrc+i*nbOfComp,ptSrc+(i+1)*nbOfComp,ptToFill+newNb*nbOfComp); else { @@ -563,7 +563,7 @@ DataArrayInt *MEDCouplingFieldDiscretizationP0::getOffsetArr(const MEDCouplingMe } void MEDCouplingFieldDiscretizationP0::renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector& arrays, - const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception) + const int *old2NewBg, bool check) { if(!mesh) throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationP0::renumberArraysForCell : NULL input mesh !"); @@ -587,7 +587,7 @@ DataArrayDouble *MEDCouplingFieldDiscretizationP0::getLocalizationOfDiscValues(c } void MEDCouplingFieldDiscretizationP0::computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd, - DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const throw(INTERP_KERNEL::Exception) + DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const { if(!mesh) throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationP0::computeMeshRestrictionFromTupleIds : NULL input mesh !"); @@ -799,7 +799,7 @@ int MEDCouplingFieldDiscretizationOnNodes::getNumberOfMeshPlaces(const MEDCoupli * Nothing to do here. */ void MEDCouplingFieldDiscretizationOnNodes::renumberArraysForCell(const MEDCouplingMesh *, const std::vector& arrays, - const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception) + const int *old2NewBg, bool check) { } @@ -822,7 +822,7 @@ DataArrayDouble *MEDCouplingFieldDiscretizationOnNodes::getLocalizationOfDiscVal } void MEDCouplingFieldDiscretizationOnNodes::computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd, - DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const throw(INTERP_KERNEL::Exception) + DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const { if(!mesh) throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationOnNodes::computeMeshRestrictionFromTupleIds : NULL input mesh !"); @@ -851,7 +851,7 @@ void MEDCouplingFieldDiscretizationOnNodes::checkCoherencyBetween(const MEDCoupl /*! * This method returns a submesh of 'mesh' instance constituting cell ids contained in array defined as an interval [start;end). -* @param di is an array returned that specifies entity ids (here nodes ids) in mesh 'mesh' of entity in returned submesh. + * @param di is an array returned that specifies entity ids (here nodes ids) in mesh 'mesh' of entity in returned submesh. * Example : The first node id of returned mesh has the (*di)[0] id in 'mesh' */ MEDCouplingMesh *MEDCouplingFieldDiscretizationOnNodes::buildSubMeshData(const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const @@ -1464,7 +1464,7 @@ DataArrayInt *MEDCouplingFieldDiscretizationGauss::getOffsetArr(const MEDCouplin } void MEDCouplingFieldDiscretizationGauss::renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector& arrays, - const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception) + const int *old2NewBg, bool check) { if(!mesh) throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::renumberArraysForCell : NULL input mesh !"); @@ -1524,8 +1524,8 @@ DataArrayDouble *MEDCouplingFieldDiscretizationGauss::getLocalizationOfDiscValue INTERP_KERNEL::NormalizedCellType typ=cli.getType(); const std::vector& wg=cli.getWeights(); calculator.addGaussInfo(typ,INTERP_KERNEL::CellModel::GetCellModel(typ).getDimension(), - &cli.getGaussCoords()[0],(int)wg.size(),&cli.getRefCoords()[0], - INTERP_KERNEL::CellModel::GetCellModel(typ).getNumberOfNodes()); + &cli.getGaussCoords()[0],(int)wg.size(),&cli.getRefCoords()[0], + INTERP_KERNEL::CellModel::GetCellModel(typ).getNumberOfNodes()); // int nbt=parts2[i]->getNumberOfTuples(); for(const int *w=parts2[i]->getConstPointer();w!=parts2[i]->getConstPointer()+nbt;w++) @@ -1536,7 +1536,7 @@ DataArrayDouble *MEDCouplingFieldDiscretizationGauss::getLocalizationOfDiscValue } void MEDCouplingFieldDiscretizationGauss::computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd, - DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const throw(INTERP_KERNEL::Exception) + DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const { if(!mesh) throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::computeMeshRestrictionFromTupleIds : NULL input mesh !"); @@ -1820,7 +1820,7 @@ void MEDCouplingFieldDiscretizationGauss::renumberValuesOnCellsR(const MEDCoupli } void MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnType(const MEDCouplingMesh *mesh, INTERP_KERNEL::NormalizedCellType type, const std::vector& refCoo, - const std::vector& gsCoo, const std::vector& wg) throw(INTERP_KERNEL::Exception) + const std::vector& gsCoo, const std::vector& wg) { if(!mesh) throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnType : NULL input mesh !"); @@ -1844,7 +1844,7 @@ void MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnType(const MEDCo } void MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnCells(const MEDCouplingMesh *mesh, const int *begin, const int *end, const std::vector& refCoo, - const std::vector& gsCoo, const std::vector& wg) throw(INTERP_KERNEL::Exception) + const std::vector& gsCoo, const std::vector& wg) { if(!mesh) throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnCells : NULL input mesh !"); @@ -2179,7 +2179,7 @@ DataArrayInt *MEDCouplingFieldDiscretizationGaussNE::getOffsetArr(const MEDCoupl } void MEDCouplingFieldDiscretizationGaussNE::renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector& arrays, - const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception) + const int *old2NewBg, bool check) { if(!mesh) throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::renumberArraysForCell : NULL input mesh !"); @@ -2277,7 +2277,7 @@ void MEDCouplingFieldDiscretizationGaussNE::integral(const MEDCouplingMesh *mesh const double *MEDCouplingFieldDiscretizationGaussNE::GetWeightArrayFromGeometricType(INTERP_KERNEL::NormalizedCellType geoType, std::size_t& lgth) { switch(geoType) - { + { case INTERP_KERNEL::NORM_POINT1: lgth=(int)sizeof(FGP_POINT1)/sizeof(double); return FGP_POINT1; @@ -2337,13 +2337,13 @@ const double *MEDCouplingFieldDiscretizationGaussNE::GetWeightArrayFromGeometric return FGP_PYRA13; default: throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::GetWeightArrayFromGeometricType : only SEG[2,3,4], TRI[3,6,7], QUAD[4,9], TETRA[4,10], PENTA[6,15], HEXA[8,20,27], PYRA[5,13] supported !"); - } + } } const double *MEDCouplingFieldDiscretizationGaussNE::GetRefCoordsFromGeometricType(INTERP_KERNEL::NormalizedCellType geoType, std::size_t& lgth) { switch(geoType) - { + { case INTERP_KERNEL::NORM_POINT1: lgth=0; return 0; @@ -2403,13 +2403,13 @@ const double *MEDCouplingFieldDiscretizationGaussNE::GetRefCoordsFromGeometricTy return REF_PYRA13; default: throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::GetRefCoordsFromGeometricType : only SEG[2,3,4], TRI[3,6,7], QUAD[4,8,9], TETRA[4,10], PENTA[6,15], HEXA[8,20,27], PYRA[5,13] supported !"); - } + } } const double *MEDCouplingFieldDiscretizationGaussNE::GetLocsFromGeometricType(INTERP_KERNEL::NormalizedCellType geoType, std::size_t& lgth) { switch(geoType) - { + { case INTERP_KERNEL::NORM_POINT1: { lgth=0; @@ -2507,11 +2507,11 @@ const double *MEDCouplingFieldDiscretizationGaussNE::GetLocsFromGeometricType(IN } default: throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::GetLocsFromGeometricType : only SEG[2,3,4], TRI[3,6,7], QUAD[4,8,9], TETRA[4,10], PENTA[6,15], HEXA[8,20,27], PYRA[5,13] supported !"); - } + } } void MEDCouplingFieldDiscretizationGaussNE::computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd, - DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const throw(INTERP_KERNEL::Exception) + DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const { if(!mesh) throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::computeMeshRestrictionFromTupleIds : NULL input mesh !"); @@ -2874,7 +2874,7 @@ DataArrayDouble *MEDCouplingFieldDiscretizationKriging::computeVectorOfCoefficie void MEDCouplingFieldDiscretizationKriging::operateOnDenseMatrix(int spaceDimension, int nbOfElems, double *matrixPtr) const { switch(spaceDimension) - { + { case 1: { for(int i=0;i& arrays, - const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception) = 0; + const int *old2NewBg, bool check) = 0; MEDCOUPLING_EXPORT virtual double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, int cellId, int nodeIdInCell, int compoId) const; MEDCOUPLING_EXPORT virtual void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const = 0; MEDCOUPLING_EXPORT virtual MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const = 0; @@ -92,9 +92,9 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT virtual void finishUnserialization(const std::vector& tinyInfo); MEDCOUPLING_EXPORT virtual void resizeForUnserialization(const std::vector& tinyInfo, DataArrayInt *& arr); MEDCOUPLING_EXPORT virtual void setGaussLocalizationOnType(const MEDCouplingMesh *m, INTERP_KERNEL::NormalizedCellType type, const std::vector& refCoo, - const std::vector& gsCoo, const std::vector& wg) throw(INTERP_KERNEL::Exception); + const std::vector& gsCoo, const std::vector& wg); MEDCOUPLING_EXPORT virtual void setGaussLocalizationOnCells(const MEDCouplingMesh *m, const int *begin, const int *end, const std::vector& refCoo, - const std::vector& gsCoo, const std::vector& wg) throw(INTERP_KERNEL::Exception); + const std::vector& gsCoo, const std::vector& wg); MEDCOUPLING_EXPORT virtual void clearGaussLocalizations(); MEDCOUPLING_EXPORT virtual MEDCouplingGaussLocalization& getGaussLocalization(int locId); MEDCOUPLING_EXPORT virtual int getNbOfGaussLocalization() const; @@ -127,11 +127,11 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT int getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const; MEDCOUPLING_EXPORT DataArrayInt *getOffsetArr(const MEDCouplingMesh *mesh) const; MEDCOUPLING_EXPORT void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector& arrays, - const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception); + const int *old2NewBg, bool check); MEDCOUPLING_EXPORT DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const; MEDCOUPLING_EXPORT void checkCompatibilityWithNature(NatureOfField nat) const; MEDCOUPLING_EXPORT void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd, - DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const throw(INTERP_KERNEL::Exception); + DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const; MEDCOUPLING_EXPORT void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const; MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const; MEDCOUPLING_EXPORT void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const; @@ -157,10 +157,10 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT int getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const; MEDCOUPLING_EXPORT DataArrayInt *getOffsetArr(const MEDCouplingMesh *mesh) const; MEDCOUPLING_EXPORT void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector& arrays, - const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception); + const int *old2NewBg, bool check); MEDCOUPLING_EXPORT DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const; MEDCOUPLING_EXPORT void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd, - DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const throw(INTERP_KERNEL::Exception); + DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const; MEDCOUPLING_EXPORT void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const; MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const; MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, int beginCellIds, int endCellIds, int stepCellIds, int& beginOut, int& endOut, int& stepOut, DataArrayInt *&di) const; @@ -240,10 +240,10 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT int getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const; MEDCOUPLING_EXPORT DataArrayInt *getOffsetArr(const MEDCouplingMesh *mesh) const; MEDCOUPLING_EXPORT void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector& arrays, - const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception); + const int *old2NewBg, bool check); MEDCOUPLING_EXPORT DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const; MEDCOUPLING_EXPORT void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd, - DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const throw(INTERP_KERNEL::Exception); + DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const; MEDCOUPLING_EXPORT void checkCompatibilityWithNature(NatureOfField nat) const; MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector& tinyInfo) const; MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector& tinyInfo) const; @@ -263,9 +263,9 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const int *old2New, int newSz, DataArrayDouble *arr) const; MEDCOUPLING_EXPORT void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const int *new2old, int newSz, DataArrayDouble *arr) const; MEDCOUPLING_EXPORT void setGaussLocalizationOnType(const MEDCouplingMesh *mesh, INTERP_KERNEL::NormalizedCellType type, const std::vector& refCoo, - const std::vector& gsCoo, const std::vector& wg) throw(INTERP_KERNEL::Exception); + const std::vector& gsCoo, const std::vector& wg); MEDCOUPLING_EXPORT void setGaussLocalizationOnCells(const MEDCouplingMesh *mesh, const int *begin, const int *end, const std::vector& refCoo, - const std::vector& gsCoo, const std::vector& wg) throw(INTERP_KERNEL::Exception); + const std::vector& gsCoo, const std::vector& wg); MEDCOUPLING_EXPORT void clearGaussLocalizations(); MEDCOUPLING_EXPORT void setGaussLocalization(int locId, const MEDCouplingGaussLocalization& loc); MEDCOUPLING_EXPORT void resizeLocalizationVector(int newSz); @@ -308,11 +308,11 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT int getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const; MEDCOUPLING_EXPORT DataArrayInt *getOffsetArr(const MEDCouplingMesh *mesh) const; MEDCOUPLING_EXPORT void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector& arrays, - const int *old2NewBg, bool check) throw(INTERP_KERNEL::Exception); + const int *old2NewBg, bool check); MEDCOUPLING_EXPORT DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const; MEDCOUPLING_EXPORT void integral(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, bool isWAbs, double *res) const; MEDCOUPLING_EXPORT void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd, - DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const throw(INTERP_KERNEL::Exception); + DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const; MEDCOUPLING_EXPORT void checkCompatibilityWithNature(NatureOfField nat) const; MEDCOUPLING_EXPORT double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, int cellId, int nodeIdInCell, int compoId) const; MEDCOUPLING_EXPORT void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const; diff --git a/src/MEDCoupling/MEDCouplingFieldDouble.cxx b/src/MEDCoupling/MEDCouplingFieldDouble.cxx index f0c3f38bd..3c2e2eb8c 100644 --- a/src/MEDCoupling/MEDCouplingFieldDouble.cxx +++ b/src/MEDCoupling/MEDCouplingFieldDouble.cxx @@ -347,7 +347,6 @@ void MEDCouplingFieldDouble::copyTinyAttrFrom(const MEDCouplingFieldDouble *othe { _time_discr->copyTinyAttrFrom(*other->_time_discr); } - } void MEDCouplingFieldDouble::copyAllTinyAttrFrom(const MEDCouplingFieldDouble *other) @@ -635,10 +634,10 @@ void MEDCouplingFieldDouble::renumberCells(const int *old2NewBg, bool check) */ void MEDCouplingFieldDouble::renumberCellsWithoutMesh(const int *old2NewBg, bool check) { - if(!_mesh) - throw INTERP_KERNEL::Exception("Expecting a defined mesh to be able to operate a renumbering !"); - if(!((const MEDCouplingFieldDiscretization *)_type)) - throw INTERP_KERNEL::Exception("Expecting a spatial discretization to be able to operate a renumbering !"); + if(!_mesh) + throw INTERP_KERNEL::Exception("Expecting a defined mesh to be able to operate a renumbering !"); + if(!((const MEDCouplingFieldDiscretization *)_type)) + throw INTERP_KERNEL::Exception("Expecting a spatial discretization to be able to operate a renumbering !"); // _type->renumberCells(old2NewBg,check); std::vector arrays; @@ -888,7 +887,7 @@ TypeOfTimeDiscretization MEDCouplingFieldDouble::getTimeDiscretization() const } MEDCouplingFieldDouble::MEDCouplingFieldDouble(TypeOfField type, TypeOfTimeDiscretization td):MEDCouplingField(type), - _time_discr(MEDCouplingTimeDiscretization::New(td)) + _time_discr(MEDCouplingTimeDiscretization::New(td)) { } @@ -896,12 +895,12 @@ MEDCouplingFieldDouble::MEDCouplingFieldDouble(TypeOfField type, TypeOfTimeDiscr * ** WARINING : This method do not deeply copy neither mesh nor spatial discretization. Only a shallow copy (reference) is done for mesh and spatial discretization ! ** */ MEDCouplingFieldDouble::MEDCouplingFieldDouble(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td):MEDCouplingField(ft,false), - _time_discr(MEDCouplingTimeDiscretization::New(td)) + _time_discr(MEDCouplingTimeDiscretization::New(td)) { } MEDCouplingFieldDouble::MEDCouplingFieldDouble(const MEDCouplingFieldDouble& other, bool deepCopy):MEDCouplingField(other,deepCopy), - _time_discr(other._time_discr->performCpy(deepCopy)) + _time_discr(other._time_discr->performCpy(deepCopy)) { } @@ -1463,7 +1462,7 @@ void MEDCouplingFieldDouble::applyLin(double a, double b, int compoId) * All tuples will have the same value 'value'. * An exception is thrown if no underlying mesh is defined. */ -MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator=(double value) throw(INTERP_KERNEL::Exception) +MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator=(double value) { if(!_mesh) throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::operator= : no mesh defined !"); @@ -3007,7 +3006,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::AddFields(const MEDCouplingField * \throw If the fields are not strictly compatible (areStrictlyCompatible()), i.e. they * differ not only in values. */ -const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator+=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception) +const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator+=(const MEDCouplingFieldDouble& other) { if(!areStrictlyCompatible(&other)) throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply += on them !"); @@ -3051,7 +3050,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::SubstractFields(const MEDCouplin * \throw If the fields are not strictly compatible (areStrictlyCompatible()), i.e. they * differ not only in values. */ -const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator-=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception) +const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator-=(const MEDCouplingFieldDouble& other) { if(!areStrictlyCompatible(&other)) throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply -= on them !"); @@ -3113,7 +3112,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::MultiplyFields(const MEDCoupling * (areCompatibleForMul()), * i.e. they differ not only in values and possibly in number of components. */ -const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator*=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception) +const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator*=(const MEDCouplingFieldDouble& other) { if(!areCompatibleForMul(&other)) throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply *= on them !"); @@ -3169,7 +3168,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::DivideFields(const MEDCouplingFi * \throw If the fields are not compatible for division (areCompatibleForDiv()), * i.e. they differ not only in values and possibly in number of components. */ -const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator/=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception) +const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator/=(const MEDCouplingFieldDouble& other) { if(!areCompatibleForDiv(&other)) throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply /= on them !"); @@ -3200,12 +3199,12 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::PowFields(const MEDCouplingField * * \sa MEDCouplingFieldDouble::PowFields */ -MEDCouplingFieldDouble *MEDCouplingFieldDouble::operator^(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) +MEDCouplingFieldDouble *MEDCouplingFieldDouble::operator^(const MEDCouplingFieldDouble& other) const { return PowFields(this,&other); } -const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator^=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception) +const MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator^=(const MEDCouplingFieldDouble& other) { if(!areCompatibleForDiv(&other)) throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply /= on them !"); @@ -3275,12 +3274,12 @@ void MEDCouplingFieldDouble::reprQuickOverview(std::ostream& stream) const stream << "MEDCouplingFieldDouble C++ instance at " << this << ". Name : \"" << _name << "\"." << std::endl; const char *nat=0; try - { + { nat=MEDCouplingNatureOfField::GetRepr(_nature); stream << "Nature of field : " << nat << ".\n"; - } + } catch(INTERP_KERNEL::Exception& /*e*/) - { } + { } const MEDCouplingFieldDiscretization *fd(_type); if(!fd) stream << "No spatial discretization set !"; diff --git a/src/MEDCoupling/MEDCouplingFieldDouble.hxx b/src/MEDCoupling/MEDCouplingFieldDouble.hxx index c57db4e39..9d0394a20 100644 --- a/src/MEDCoupling/MEDCouplingFieldDouble.hxx +++ b/src/MEDCoupling/MEDCouplingFieldDouble.hxx @@ -115,7 +115,7 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT void getValueOn(const double *spaceLoc, double time, double *res) const; MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const double *spaceLoc, int nbOfPoints) const; MEDCOUPLING_EXPORT void applyLin(double a, double b, int compoId); - MEDCOUPLING_EXPORT MEDCouplingFieldDouble &operator=(double value) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble &operator=(double value); MEDCOUPLING_EXPORT void fillFromAnalytic(int nbOfComp, FunctionToEvaluate func); MEDCOUPLING_EXPORT void fillFromAnalytic(int nbOfComp, const std::string& func); MEDCOUPLING_EXPORT void fillFromAnalytic2(int nbOfComp, const std::string& func); @@ -176,19 +176,19 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT MEDCouplingFieldDouble *min(const MEDCouplingFieldDouble& other) const { return MinFields(this,&other); } MEDCOUPLING_EXPORT MEDCouplingFieldDouble *negate() const; MEDCOUPLING_EXPORT MEDCouplingFieldDouble *operator+(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return AddFields(this,&other); } - MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator+=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator+=(const MEDCouplingFieldDouble& other); MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *AddFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); MEDCOUPLING_EXPORT MEDCouplingFieldDouble *operator-(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return SubstractFields(this,&other); } - MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator-=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator-=(const MEDCouplingFieldDouble& other); MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *SubstractFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); MEDCouplingFieldDouble *operator*(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return MultiplyFields(this,&other); } - MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator*=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator*=(const MEDCouplingFieldDouble& other); MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *MultiplyFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); MEDCOUPLING_EXPORT MEDCouplingFieldDouble *operator/(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return DivideFields(this,&other); } - MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator/=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator/=(const MEDCouplingFieldDouble& other); MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *DivideFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); - MEDCOUPLING_EXPORT MEDCouplingFieldDouble *operator^(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception); - MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator^=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *operator^(const MEDCouplingFieldDouble& other) const; + MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator^=(const MEDCouplingFieldDouble& other); MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *PowFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); MEDCOUPLING_EXPORT static void WriteVTK(const std::string& fileName, const std::vector& fs, bool isBinary=true); public: diff --git a/src/MEDCoupling/MEDCouplingFieldOverTime.cxx b/src/MEDCoupling/MEDCouplingFieldOverTime.cxx index 0edd77a3d..bdba5d0b5 100644 --- a/src/MEDCoupling/MEDCouplingFieldOverTime.cxx +++ b/src/MEDCoupling/MEDCouplingFieldOverTime.cxx @@ -83,19 +83,19 @@ std::string MEDCouplingFieldOverTime::simpleRepr() const std::vector ms; std::vector refms; try - { + { ms=getDifferentMeshes(refms); ret << ms.size() << "\n"; - } + } catch(INTERP_KERNEL::Exception& /*e*/) - { ret << "Current instance is INVALID !\n"; } + { ret << "Current instance is INVALID !\n"; } try - { + { MEDCouplingDefinitionTime dt=getDefinitionTimeZone(); dt.appendRepr(ret); - } + } catch(INTERP_KERNEL::Exception& /*e*/) - { ret << "Definition zone is INVALID !\n"; } + { ret << "Definition zone is INVALID !\n"; } return ret.str(); } diff --git a/src/MEDCoupling/MEDCouplingFieldTemplate.cxx b/src/MEDCoupling/MEDCouplingFieldTemplate.cxx index 442288001..58fad9e7f 100644 --- a/src/MEDCoupling/MEDCouplingFieldTemplate.cxx +++ b/src/MEDCoupling/MEDCouplingFieldTemplate.cxx @@ -135,12 +135,12 @@ void MEDCouplingFieldTemplate::reprQuickOverview(std::ostream& stream) const stream << "MEDCouplingFieldTemplate C++ instance at " << this << ". Name : \"" << _name << "\"." << std::endl; const char *nat=0; try - { + { nat=MEDCouplingNatureOfField::GetRepr(_nature); stream << "Nature of field template : " << nat << ".\n"; - } + } catch(INTERP_KERNEL::Exception& /*e*/) - { } + { } const MEDCouplingFieldDiscretization *fd(_type); if(!fd) stream << "No spatial discretization set !"; diff --git a/src/MEDCoupling/MEDCouplingGaussLocalization.cxx b/src/MEDCoupling/MEDCouplingGaussLocalization.cxx index 6160b7916..327013db9 100644 --- a/src/MEDCoupling/MEDCouplingGaussLocalization.cxx +++ b/src/MEDCoupling/MEDCouplingGaussLocalization.cxx @@ -28,19 +28,19 @@ #include ParaMEDMEM::MEDCouplingGaussLocalization::MEDCouplingGaussLocalization(INTERP_KERNEL::NormalizedCellType type, const std::vector& refCoo, - const std::vector& gsCoo, const std::vector& w) throw(INTERP_KERNEL::Exception) + const std::vector& gsCoo, const std::vector& w) try:_type(type),_ref_coord(refCoo),_gauss_coord(gsCoo),_weight(w) - { - checkCoherency(); - } +{ + checkCoherency(); +} catch(INTERP_KERNEL::Exception& e) - { +{ _type=INTERP_KERNEL::NORM_ERROR; _ref_coord.clear(); _gauss_coord.clear(); _weight.clear(); throw e; - } +} ParaMEDMEM::MEDCouplingGaussLocalization::MEDCouplingGaussLocalization(INTERP_KERNEL::NormalizedCellType typ) try:_type(typ) @@ -48,10 +48,10 @@ try:_type(typ) INTERP_KERNEL::CellModel::GetCellModel(_type); } catch(INTERP_KERNEL::Exception& e) - { +{ _type=INTERP_KERNEL::NORM_ERROR; throw e; - } +} void ParaMEDMEM::MEDCouplingGaussLocalization::setType(INTERP_KERNEL::NormalizedCellType typ) { @@ -74,8 +74,8 @@ void ParaMEDMEM::MEDCouplingGaussLocalization::checkCoherency() const } if(_gauss_coord.size()!=dim*_weight.size()) { - std::ostringstream oss; oss << "Invalid gsCoo size and weight size : gsCoo.size() must be equal to _weight.size() * " << dim << " (dim) !"; - throw INTERP_KERNEL::Exception(oss.str().c_str()); + std::ostringstream oss; oss << "Invalid gsCoo size and weight size : gsCoo.size() must be equal to _weight.size() * " << dim << " (dim) !"; + throw INTERP_KERNEL::Exception(oss.str().c_str()); } } diff --git a/src/MEDCoupling/MEDCouplingGaussLocalization.hxx b/src/MEDCoupling/MEDCouplingGaussLocalization.hxx index cd59022c3..bc031ac3f 100644 --- a/src/MEDCoupling/MEDCouplingGaussLocalization.hxx +++ b/src/MEDCoupling/MEDCouplingGaussLocalization.hxx @@ -35,7 +35,7 @@ namespace ParaMEDMEM { public: MEDCOUPLING_EXPORT MEDCouplingGaussLocalization(INTERP_KERNEL::NormalizedCellType type, const std::vector& refCoo, - const std::vector& gsCoo, const std::vector& w) throw(INTERP_KERNEL::Exception); + const std::vector& gsCoo, const std::vector& w); MEDCOUPLING_EXPORT MEDCouplingGaussLocalization(INTERP_KERNEL::NormalizedCellType typ); MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getType() const { return _type; } MEDCOUPLING_EXPORT void setType(INTERP_KERNEL::NormalizedCellType typ); diff --git a/src/MEDCoupling/MEDCouplingMemArray.cxx b/src/MEDCoupling/MEDCouplingMemArray.cxx index 8aae3f714..e37a72b8c 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.cxx +++ b/src/MEDCoupling/MEDCouplingMemArray.cxx @@ -545,7 +545,7 @@ void DataArray::checkNbOfElems(std::size_t nbOfElems, const std::string& msg) co void DataArray::checkNbOfTuplesAndComp(const DataArray& other, const std::string& msg) const { - if(getNumberOfTuples()!=other.getNumberOfTuples()) + if(getNumberOfTuples()!=other.getNumberOfTuples()) { std::ostringstream oss; oss << msg << " : mismatch number of tuples : expected " << other.getNumberOfTuples() << " having " << getNumberOfTuples() << " !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); @@ -1978,12 +1978,12 @@ void DataArrayDouble::findCommonTuples(double prec, int limitTupleId, DataArrayI int nbOfCompo=getNumberOfComponents(); if ((nbOfCompo<1) || (nbOfCompo>4)) //test before work throw INTERP_KERNEL::Exception("DataArrayDouble::findCommonTuples : Unexpected spacedim of coords. Must be 1, 2, 3 or 4."); - + int nbOfTuples=getNumberOfTuples(); // MEDCouplingAutoRefCountObjectPtr c(DataArrayInt::New()),cI(DataArrayInt::New()); c->alloc(0,1); cI->pushBackSilent(0); switch(nbOfCompo) - { + { case 4: findCommonTuplesAlg<4>(begin(),nbOfTuples,limitTupleId,prec,c,cI); break; @@ -1998,7 +1998,7 @@ void DataArrayDouble::findCommonTuples(double prec, int limitTupleId, DataArrayI break; default: throw INTERP_KERNEL::Exception("DataArrayDouble::findCommonTuples : nb of components managed are 1,2,3 and 4 ! not implemented for other number of components !"); - } + } comm=c.retn(); commIndex=cI.retn(); } @@ -2086,7 +2086,7 @@ DataArrayInt *DataArrayDouble::findClosestTupleId(const DataArrayDouble *other) double bounds[6]; getMinMaxPerComponent(bounds); switch(nbOfCompo) - { + { case 3: { double xDelta(fabs(bounds[1]-bounds[0])),yDelta(fabs(bounds[3]-bounds[2])),zDelta(fabs(bounds[5]-bounds[4])); @@ -2114,7 +2114,7 @@ DataArrayInt *DataArrayDouble::findClosestTupleId(const DataArrayDouble *other) } default: throw INTERP_KERNEL::Exception("Unexpected spacedim of coords for findClosestTupleId. Must be 1, 2 or 3."); - } + } return ret.retn(); } @@ -2151,7 +2151,7 @@ DataArrayInt *DataArrayDouble::computeNbOfInteractionsWith(const DataArrayDouble const double *thisBBPtr(begin()); int *retPtr(ret->getPointer()); switch(nbOfComp/2) - { + { case 3: { BBTree<3,int> bbt(otherBBoxFrmt->begin(),0,0,otherBBoxFrmt->getNumberOfTuples(),eps); @@ -2175,8 +2175,8 @@ DataArrayInt *DataArrayDouble::computeNbOfInteractionsWith(const DataArrayDouble } default: throw INTERP_KERNEL::Exception("DataArrayDouble::computeNbOfInteractionsWith : space dimension supported are [1,2,3] !"); - } - + } + return ret.retn(); } @@ -3106,7 +3106,7 @@ void DataArrayDouble::computeTupleIdsNearTuples(const DataArrayDouble *other, do int nbOfTuplesOther=other->getNumberOfTuples(); MEDCouplingAutoRefCountObjectPtr cArr(DataArrayInt::New()),cIArr(DataArrayInt::New()); cArr->alloc(0,1); cIArr->pushBackSilent(0); switch(nbOfCompo) - { + { case 3: { BBTreePts<3,int> myTree(begin(),0,0,getNumberOfTuples(),eps); @@ -3127,7 +3127,7 @@ void DataArrayDouble::computeTupleIdsNearTuples(const DataArrayDouble *other, do } default: throw INTERP_KERNEL::Exception("Unexpected spacedim of coords for computeTupleIdsNearTuples. Must be 1, 2 or 3."); - } + } c=cArr.retn(); cI=cIArr.retn(); } @@ -3637,7 +3637,7 @@ DataArrayDouble *DataArrayDouble::determinant() const const double *src=getConstPointer(); double *dest=ret->getPointer(); switch(getNumberOfComponents()) - { + { case 6: for(int i=0;idecrRef(); throw INTERP_KERNEL::Exception("DataArrayDouble::determinant : Invalid number of components ! must be in 4,6,9 !"); - } + } } /*! @@ -3735,7 +3735,7 @@ DataArrayDouble *DataArrayDouble::inverse() const ret->alloc(nbOfTuple,nbOfComp); const double *src=getConstPointer(); double *dest=ret->getPointer(); -if(nbOfComp==6) + if(nbOfComp==6) for(int i=0;i(oss,", ")); oss << ") : Evaluation of function failed !" << e.what(); newArr->decrRef(); throw INTERP_KERNEL::Exception(oss.str().c_str()); - } + } } return newArr; } @@ -4368,17 +4368,17 @@ DataArrayDouble *DataArrayDouble::applyFunc(const std::string& func) const for(int i=0;i(oss,", ")); oss << ") : Evaluation of function failed ! " << e.what(); newArr->decrRef(); throw INTERP_KERNEL::Exception(oss.str().c_str()); - } + } } return newArr; } @@ -4423,17 +4423,17 @@ DataArrayDouble *DataArrayDouble::applyFunc2(int nbOfComp, const std::string& fu for(int i=0;i(oss,", ")); oss << ") : Evaluation of function failed !" << e.what(); newArr->decrRef(); throw INTERP_KERNEL::Exception(oss.str().c_str()); - } + } } return newArr; } @@ -4479,17 +4479,17 @@ DataArrayDouble *DataArrayDouble::applyFunc3(int nbOfComp, const std::vector(oss,", ")); oss << ") : Evaluation of function failed !" << e.what(); newArr->decrRef(); throw INTERP_KERNEL::Exception(oss.str().c_str()); - } + } } return newArr; } @@ -6271,8 +6271,8 @@ void DataArrayInt::transformWithIndArr(const int *indArrBg, const int *indArrEnd * \throw If any value of \a this is not less than \a arrEnd[-1]. */ void DataArrayInt::splitByValueRange(const int *arrBg, const int *arrEnd, - DataArrayInt *& castArr, DataArrayInt *& rankInsideCast, DataArrayInt *& castsPresent) const throw(INTERP_KERNEL::Exception) -{ + DataArrayInt *& castArr, DataArrayInt *& rankInsideCast, DataArrayInt *& castsPresent) const + { checkAllocated(); if(getNumberOfComponents()!=1) throw INTERP_KERNEL::Exception("Call splitByValueRange method on DataArrayInt with only one component, you can call 'rearrange' method before !"); @@ -6315,7 +6315,7 @@ void DataArrayInt::splitByValueRange(const int *arrBg, const int *arrEnd, castArr=ret1.retn(); rankInsideCast=ret2.retn(); castsPresent=ret3.retn(); -} + } /*! * Creates a one-dimensional DataArrayInt (\a res) whose contents are computed from @@ -6463,7 +6463,7 @@ DataArrayInt *DataArrayInt::invertArrayN2O2O2N(int oldNbOfElem) const { int v(new2Old[i]); if(v>=0 && v >& v */ DataArrayInt *DataArrayInt::buildComplement(int nbOfElement) const { - checkAllocated(); - if(getNumberOfComponents()!=1) - throw INTERP_KERNEL::Exception("DataArrayInt::buildComplement : only single component allowed !"); - std::vector tmp(nbOfElement); - const int *pt=getConstPointer(); - int nbOfTuples=getNumberOfTuples(); - for(const int *w=pt;w!=pt+nbOfTuples;w++) - if(*w>=0 && *walloc(nbOfRetVal,1); - int j=0; - int *retPtr=ret->getPointer(); - for(int i=0;i tmp(nbOfElement); + const int *pt=getConstPointer(); + int nbOfTuples=getNumberOfTuples(); + for(const int *w=pt;w!=pt+nbOfTuples;w++) + if(*w>=0 && *walloc(nbOfRetVal,1); + int j=0; + int *retPtr=ret->getPointer(); + for(int i=0;icheckAllocated(); if(getNumberOfComponents()!=1) - throw INTERP_KERNEL::Exception("DataArrayInt::buildSubstraction : only single component allowed !"); + throw INTERP_KERNEL::Exception("DataArrayInt::buildSubstraction : only single component allowed !"); if(other->getNumberOfComponents()!=1) - throw INTERP_KERNEL::Exception("DataArrayInt::buildSubstraction : only single component allowed for other type !"); + throw INTERP_KERNEL::Exception("DataArrayInt::buildSubstraction : only single component allowed for other type !"); const int *pt=getConstPointer(); int nbOfTuples=getNumberOfTuples(); std::set s1(pt,pt+nbOfTuples); @@ -9791,7 +9791,7 @@ DataArrayInt *DataArrayInt::buildUnique() const { checkAllocated(); if(getNumberOfComponents()!=1) - throw INTERP_KERNEL::Exception("DataArrayInt::buildUnique : only single component allowed !"); + throw INTERP_KERNEL::Exception("DataArrayInt::buildUnique : only single component allowed !"); int nbOfTuples=getNumberOfTuples(); MEDCouplingAutoRefCountObjectPtr tmp=deepCpy(); int *data=tmp->getPointer(); @@ -9828,7 +9828,7 @@ DataArrayInt *DataArrayInt::deltaShiftIndex() const { checkAllocated(); if(getNumberOfComponents()!=1) - throw INTERP_KERNEL::Exception("DataArrayInt::deltaShiftIndex : only single component allowed !"); + throw INTERP_KERNEL::Exception("DataArrayInt::deltaShiftIndex : only single component allowed !"); int nbOfTuples=getNumberOfTuples(); if(nbOfTuples<2) throw INTERP_KERNEL::Exception("DataArrayInt::deltaShiftIndex : 1 tuple at least must be present in 'this' !"); @@ -9861,7 +9861,7 @@ void DataArrayInt::computeOffsets() { checkAllocated(); if(getNumberOfComponents()!=1) - throw INTERP_KERNEL::Exception("DataArrayInt::computeOffsets : only single component allowed !"); + throw INTERP_KERNEL::Exception("DataArrayInt::computeOffsets : only single component allowed !"); int nbOfTuples=getNumberOfTuples(); if(nbOfTuples==0) return ; @@ -9995,10 +9995,10 @@ DataArrayInt *DataArrayInt::buildExplicitArrByRanges(const DataArrayInt *offsets throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrByRanges : DataArrayInt pointer in input is NULL !"); checkAllocated(); if(getNumberOfComponents()!=1) - throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrByRanges : only single component allowed !"); + throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrByRanges : only single component allowed !"); offsets->checkAllocated(); if(offsets->getNumberOfComponents()!=1) - throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrByRanges : input array should have only single component !"); + throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrByRanges : input array should have only single component !"); int othNbTuples=offsets->getNumberOfTuples()-1; int nbOfTuples=getNumberOfTuples(); int retNbOftuples=0; @@ -10930,7 +10930,7 @@ void DataArrayInt::divideEqual(const DataArrayInt *other) */ DataArrayInt *DataArrayInt::Modulus(const DataArrayInt *a1, const DataArrayInt *a2) { - if(!a1 || !a2) + if(!a1 || !a2) throw INTERP_KERNEL::Exception("DataArrayInt::Modulus : input DataArrayInt instance is NULL !"); int nbOfTuple1=a1->getNumberOfTuples(); int nbOfTuple2=a2->getNumberOfTuples(); diff --git a/src/MEDCoupling/MEDCouplingMemArray.hxx b/src/MEDCoupling/MEDCouplingMemArray.hxx index 3c93849cb..48a1ea3d3 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.hxx +++ b/src/MEDCoupling/MEDCouplingMemArray.hxx @@ -475,7 +475,7 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT void transformWithIndArr(const int *indArrBg, const int *indArrEnd); MEDCOUPLING_EXPORT DataArrayInt *transformWithIndArrR(const int *indArrBg, const int *indArrEnd) const; MEDCOUPLING_EXPORT void splitByValueRange(const int *arrBg, const int *arrEnd, - DataArrayInt *& castArr, DataArrayInt *& rankInsideCast, DataArrayInt *& castsPresent) const throw(INTERP_KERNEL::Exception); + DataArrayInt *& castArr, DataArrayInt *& rankInsideCast, DataArrayInt *& castsPresent) const; MEDCOUPLING_EXPORT DataArrayInt *invertArrayO2N2N2O(int newNbOfElem) const; MEDCOUPLING_EXPORT DataArrayInt *invertArrayN2O2O2N(int oldNbOfElem) const; MEDCOUPLING_EXPORT DataArrayInt *invertArrayO2N2N2OBis(int newNbOfElem) const; @@ -761,7 +761,7 @@ namespace ParaMEDMEM protected: MemArray _mem; }; - + class DataArrayByteIterator; class DataArrayByte : public DataArrayChar @@ -816,9 +816,9 @@ namespace ParaMEDMEM char *_pt; int _nb_of_compo; }; - + class DataArrayAsciiCharIterator; - + class DataArrayAsciiChar : public DataArrayChar { public: @@ -890,7 +890,7 @@ namespace ParaMEDMEM else throw INTERP_KERNEL::Exception("DataArrayDouble::insertAtTheEnd : not available for DataArrayDouble with number of components different than 1 !"); } - + template void DataArrayInt::insertAtTheEnd(InputIterator first, InputIterator last) { diff --git a/src/MEDCoupling/MEDCouplingMemArray.txx b/src/MEDCoupling/MEDCouplingMemArray.txx index bff8f089b..90773df2b 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.txx +++ b/src/MEDCoupling/MEDCouplingMemArray.txx @@ -82,7 +82,7 @@ namespace ParaMEDMEM _ownership=false; _dealloc=CPPDeallocator; } - + template void MemArray::writeOnPlace(std::size_t id, T element0, const T *others, std::size_t sizeOfOthers) { @@ -93,7 +93,7 @@ namespace ParaMEDMEM std::copy(others,others+sizeOfOthers,pointer+id+1); _nb_of_elem=std::max(_nb_of_elem,id+sizeOfOthers+1); } - + template template void MemArray::insertAtTheEnd(InputIterator first, InputIterator last) @@ -109,7 +109,7 @@ namespace ParaMEDMEM pointer[_nb_of_elem++]=*first++; } } - + template void MemArray::pushBack(T elem) { @@ -118,7 +118,7 @@ namespace ParaMEDMEM T *pt=getPointer(); pt[_nb_of_elem++]=elem; } - + template T MemArray::popBack() { @@ -129,7 +129,7 @@ namespace ParaMEDMEM } throw INTERP_KERNEL::Exception("MemArray::popBack : nothing to pop in array !"); } - + template void MemArray::pack() const { @@ -180,7 +180,7 @@ namespace ParaMEDMEM { if(sl!=0) stream << _nb_of_elem/sl << std::endl << "Internal memory facts : " << _nb_of_elem << "/" << _nb_of_elem_alloc; - else + else stream << "Empty Data"; } else @@ -192,7 +192,7 @@ namespace ParaMEDMEM stream << "No data !\n"; return ret; } - + /*! * \param [in] sl is typically the number of components */ @@ -217,7 +217,7 @@ namespace ParaMEDMEM stream << "Empty Data\n"; } } - + /*! * \param [in] sl is typically the number of components */ @@ -257,14 +257,14 @@ namespace ParaMEDMEM else stream << "No data !\n"; } - + template void MemArray::fillWithValue(const T& val) { T *pt=_pointer.getPointer(); std::fill(pt,pt+_nb_of_elem,val); } - + template T *MemArray::fromNoInterlace(int nbOfComp) const { @@ -279,7 +279,7 @@ namespace ParaMEDMEM *w=pt[j*nbOfTuples+i]; return ret; } - + template T *MemArray::toNoInterlace(int nbOfComp) const { @@ -409,14 +409,14 @@ namespace ParaMEDMEM typename MemArray::Deallocator MemArray::BuildFromType(DeallocType type) { switch(type) - { + { case CPP_DEALLOC: return CPPDeallocator; case C_DEALLOC: return CDeallocator; default: throw INTERP_KERNEL::Exception("Invalid deallocation requested ! Unrecognized enum DeallocType !"); - } + } } template @@ -438,7 +438,7 @@ namespace ParaMEDMEM _nb_of_elem=0; _nb_of_elem_alloc=0; } - + template MemArray &MemArray::operator=(const MemArray& other) { diff --git a/src/MEDCoupling/MEDCouplingMultiFields.cxx b/src/MEDCoupling/MEDCouplingMultiFields.cxx index b19f93668..35bea1a29 100644 --- a/src/MEDCoupling/MEDCouplingMultiFields.cxx +++ b/src/MEDCoupling/MEDCouplingMultiFields.cxx @@ -124,12 +124,12 @@ std::string MEDCouplingMultiFields::simpleRepr() const std::vector ms; std::vector refms; try - { + { ms=getDifferentMeshes(refms); ret << ms.size() << "\n"; - } + } catch(INTERP_KERNEL::Exception& /*e*/) - { ret << "Current instance is INVALID !\n"; } + { ret << "Current instance is INVALID !\n"; } return ret.str(); } diff --git a/src/MEDCoupling/MEDCouplingNatureOfField.cxx b/src/MEDCoupling/MEDCouplingNatureOfField.cxx index 757e01189..f27f13acd 100644 --- a/src/MEDCoupling/MEDCouplingNatureOfField.cxx +++ b/src/MEDCoupling/MEDCouplingNatureOfField.cxx @@ -26,12 +26,12 @@ namespace ParaMEDMEM { const char *MEDCouplingNatureOfField::REPR_OF_NATUREOFFIELD[NB_OF_POSSIBILITIES]= - { "NoNature", - "ConservativeVolumic", - "Integral", - "IntegralGlobConstraint", - "RevIntegral"}; - + { "NoNature", + "ConservativeVolumic", + "Integral", + "IntegralGlobConstraint", + "RevIntegral"}; + const int MEDCouplingNatureOfField::POS_OF_NATUREOFFIELD[NB_OF_POSSIBILITIES]={17,26,32,35,37}; const char *MEDCouplingNatureOfField::GetRepr(NatureOfField nat) diff --git a/src/MEDCoupling/MEDCouplingNatureOfFieldEnum b/src/MEDCoupling/MEDCouplingNatureOfFieldEnum index 2e6c8e686..34c8c1b43 100644 --- a/src/MEDCoupling/MEDCouplingNatureOfFieldEnum +++ b/src/MEDCoupling/MEDCouplingNatureOfFieldEnum @@ -24,13 +24,13 @@ namespace ParaMEDMEM { typedef enum - { - NoNature = 17, - ConservativeVolumic = 26, - Integral = 32, - IntegralGlobConstraint = 35, - RevIntegral = 37 - } NatureOfField; + { + NoNature = 17, + ConservativeVolumic = 26, + Integral = 32, + IntegralGlobConstraint = 35, + RevIntegral = 37 + } NatureOfField; } #endif diff --git a/src/MEDCoupling/MEDCouplingRefCountObject.hxx b/src/MEDCoupling/MEDCouplingRefCountObject.hxx index 86925af8f..fd55536f2 100644 --- a/src/MEDCoupling/MEDCouplingRefCountObject.hxx +++ b/src/MEDCoupling/MEDCouplingRefCountObject.hxx @@ -31,27 +31,27 @@ namespace ParaMEDMEM { typedef enum - { - C_DEALLOC = 2, - CPP_DEALLOC = 3 - } DeallocType; + { + C_DEALLOC = 2, + CPP_DEALLOC = 3 + } DeallocType; typedef enum - { - ON_CELLS = 0, - ON_NODES = 1, - ON_GAUSS_PT = 2, - ON_GAUSS_NE = 3, - ON_NODES_KR = 4 - } TypeOfField; + { + ON_CELLS = 0, + ON_NODES = 1, + ON_GAUSS_PT = 2, + ON_GAUSS_NE = 3, + ON_NODES_KR = 4 + } TypeOfField; typedef enum - { - NO_TIME = 4, - ONE_TIME = 5, - LINEAR_TIME = 6, - CONST_ON_TIME_INTERVAL = 7 - } TypeOfTimeDiscretization; + { + NO_TIME = 4, + ONE_TIME = 5, + LINEAR_TIME = 6, + CONST_ON_TIME_INTERVAL = 7 + } TypeOfTimeDiscretization; typedef bool (*FunctionToEvaluate)(const double *pos, double *res); @@ -74,7 +74,7 @@ namespace ParaMEDMEM private: static std::size_t GetHeapMemoryOfSet(std::set& s1, std::set& s2); }; - + class RefCountObjectOnly { protected: diff --git a/src/MEDCoupling/MEDCouplingRemapper.cxx b/src/MEDCoupling/MEDCouplingRemapper.cxx index 3327043a4..33a0debff 100644 --- a/src/MEDCoupling/MEDCouplingRemapper.cxx +++ b/src/MEDCoupling/MEDCouplingRemapper.cxx @@ -81,7 +81,7 @@ int MEDCouplingRemapper::prepareInterpKernelOnly() { int meshInterpType=((int)_src_ft->getMesh()->getType()*16)+(int)_target_ft->getMesh()->getType(); switch(meshInterpType) - { + { case 90: case 91: case 165: @@ -106,7 +106,7 @@ int MEDCouplingRemapper::prepareInterpKernelOnly() return prepareInterpKernelOnlyEE(); default: throw INTERP_KERNEL::Exception("MEDCouplingRemapper::prepareInterpKernelOnly : Not managed type of meshes ! Dealt meshes type are : Unstructured<->Unstructured, Unstructured<->Cartesian, Cartesian<->Cartesian, Extruded<->Extruded !"); - } + } } int MEDCouplingRemapper::prepareNotInterpKernelOnly() @@ -114,7 +114,7 @@ int MEDCouplingRemapper::prepareNotInterpKernelOnly() std::string srcm,trgm,method; method=checkAndGiveInterpolationMethodStr(srcm,trgm); switch(CheckInterpolationMethodManageableByNotOnlyInterpKernel(method)) - { + { case 0: return prepareNotInterpKernelOnlyGaussGauss(); default: @@ -122,7 +122,7 @@ int MEDCouplingRemapper::prepareNotInterpKernelOnly() std::ostringstream oss; oss << "MEDCouplingRemapper::prepareNotInterpKernelOnly : INTERNAL ERROR ! the method \"" << method << "\" declared as managed bu not implemented !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); } - } + } } /*! @@ -281,7 +281,7 @@ int MEDCouplingRemapper::getInterpolationMatrixPolicy() const void MEDCouplingRemapper::setInterpolationMatrixPolicy(int newInterpMatPol) { switch(newInterpMatPol) - { + { case 0: _interp_matrix_pol=IK_ONLY_PREFERED; break; @@ -296,7 +296,7 @@ void MEDCouplingRemapper::setInterpolationMatrixPolicy(int newInterpMatPol) break; default: throw INTERP_KERNEL::Exception("MEDCouplingRemapper::setInterpolationMatrixPolicy : invalid input integer value ! Should be in [0 (IK_PREFERED) , 1 (NOT_IK_PREFERED), 2 (IK_ONLY_FORCED), 3 (NOT_IK_ONLY_FORCED)] ! For information, the default is IK_PREFERED=0 !"); - } + } } int MEDCouplingRemapper::prepareInterpKernelOnlyUU() @@ -583,7 +583,7 @@ int MEDCouplingRemapper::prepareInterpKernelOnlyUC() throw INTERP_KERNEL::Exception("MEDCouplingRemapper::prepareInterpKernelOnlyUC : space dim of src unstructured should be equal to mesh dim of src unstructured and should be equal also equal to trg cartesian dimension !"); std::vector > res; switch(srcMeshDim) - { + { case 1: { MEDCouplingNormalizedCartesianMesh<1> targetWrapper(target_mesh); @@ -610,7 +610,7 @@ int MEDCouplingRemapper::prepareInterpKernelOnlyUC() } default: throw INTERP_KERNEL::Exception("MEDCouplingRemapper::prepareInterpKernelOnlyUC : only dimension 1 2 or 3 supported !"); - } + } ReverseMatrix(res,target_mesh->getNumberOfCells(),_matrix); nullifiedTinyCoeffInCrudeMatrixAbs(0.); // @@ -636,7 +636,7 @@ int MEDCouplingRemapper::prepareInterpKernelOnlyCU() if(trgMeshDim!=trgSpceDim || trgMeshDim!=srcMeshDim) throw INTERP_KERNEL::Exception("MEDCouplingRemapper::prepareInterpKernelOnlyCU : space dim of target unstructured should be equal to mesh dim of target unstructured and should be equal also equal to source cartesian dimension !"); switch(srcMeshDim) - { + { case 1: { MEDCouplingNormalizedCartesianMesh<1> sourceWrapper(src_mesh); @@ -663,7 +663,7 @@ int MEDCouplingRemapper::prepareInterpKernelOnlyCU() } default: throw INTERP_KERNEL::Exception("MEDCouplingRemapper::prepareInterpKernelOnlyCU : only dimension 1 2 or 3 supported !"); - } + } nullifiedTinyCoeffInCrudeMatrixAbs(0.); // _deno_multiply.clear(); @@ -687,7 +687,7 @@ int MEDCouplingRemapper::prepareInterpKernelOnlyCC() if(trgMeshDim!=srcMeshDim) throw INTERP_KERNEL::Exception("MEDCouplingRemapper::prepareInterpKernelOnlyCC : dim of target cartesian should be equal to dim of source cartesian dimension !"); switch(srcMeshDim) - { + { case 1: { MEDCouplingNormalizedCartesianMesh<1> sourceWrapper(src_mesh); @@ -714,7 +714,7 @@ int MEDCouplingRemapper::prepareInterpKernelOnlyCC() } default: throw INTERP_KERNEL::Exception("MEDCouplingRemapper::prepareInterpKernelOnlyCC : only dimension 1 2 or 3 supported !"); - } + } nullifiedTinyCoeffInCrudeMatrixAbs(0.); // _deno_multiply.clear(); @@ -728,7 +728,7 @@ int MEDCouplingRemapper::prepareInterpKernelOnlyCC() int MEDCouplingRemapper::prepareNotInterpKernelOnlyGaussGauss() { if(getIntersectionType()!=INTERP_KERNEL::PointLocator) - throw INTERP_KERNEL::Exception("MEDCouplingRemapper::prepareNotInterpKernelOnlyGaussGauss : The intersection type is not supported ! Only PointLocator is supported for Gauss->Gauss interpolation ! Please invoke setIntersectionType(PointLocator) on the MEDCouplingRemapper instance !"); + throw INTERP_KERNEL::Exception("MEDCouplingRemapper::prepareNotInterpKernelOnlyGaussGauss : The intersection type is not supported ! Only PointLocator is supported for Gauss->Gauss interpolation ! Please invoke setIntersectionType(PointLocator) on the MEDCouplingRemapper instance !"); MEDCouplingAutoRefCountObjectPtr trgLoc=_target_ft->getLocalizationOfDiscr(); const double *trgLocPtr=trgLoc->begin(); int trgSpaceDim=trgLoc->getNumberOfComponents(); @@ -808,31 +808,31 @@ bool MEDCouplingRemapper::isInterpKernelOnlyOrNotOnly() const std::string srcm,trgm,method; method=checkAndGiveInterpolationMethodStr(srcm,trgm); switch(_interp_matrix_pol) - { + { case IK_ONLY_PREFERED: { try - { + { std::string tmp1,tmp2; INTERP_KERNEL::Interpolation::CheckAndSplitInterpolationMethod(method,tmp1,tmp2); return true; - } + } catch(INTERP_KERNEL::Exception& /*e*/) - { + { return false; - } + } } case NOT_IK_ONLY_PREFERED: { try - { + { CheckInterpolationMethodManageableByNotOnlyInterpKernel(method); return false; - } + } catch(INTERP_KERNEL::Exception& /*e*/) - { + { return true; - } + } } case IK_ONLY_FORCED: return true; @@ -840,7 +840,7 @@ bool MEDCouplingRemapper::isInterpKernelOnlyOrNotOnly() const return false; default: throw INTERP_KERNEL::Exception("MEDCouplingRemapper::isInterpKernelOnlyOrNotOnly : internal error ! The interpolation matrix policy is not managed ! Try to change it using MEDCouplingRemapper::setInterpolationMatrixPolicy !"); - } + } } void MEDCouplingRemapper::updateTime() const @@ -930,7 +930,7 @@ void MEDCouplingRemapper::computeDeno(NatureOfField nat, const MEDCouplingFieldD if(nat==NoNature) return computeDenoFromScratch(nat,srcField,trgField); else if(nat!=_nature_of_deno) - return computeDenoFromScratch(nat,srcField,trgField); + return computeDenoFromScratch(nat,srcField,trgField); else if(nat==_nature_of_deno && _time_deno_update!=getTimeOfThis()) return computeDenoFromScratch(nat,srcField,trgField); } @@ -940,7 +940,7 @@ void MEDCouplingRemapper::computeDenoFromScratch(NatureOfField nat, const MEDCou _nature_of_deno=nat; _time_deno_update=getTimeOfThis(); switch(_nature_of_deno) - { + { case ConservativeVolumic: { ComputeRowSumAndColSum(_matrix,_deno_multiply,_deno_reverse_multiply); @@ -1007,7 +1007,7 @@ void MEDCouplingRemapper::computeDenoFromScratch(NatureOfField nat, const MEDCou } case NoNature: throw INTERP_KERNEL::Exception("No nature specified ! Select one !"); - } + } } void MEDCouplingRemapper::computeProduct(const double *inputPointer, int inputNbOfCompo, bool isDftVal, double dftValue, double *resPointer) diff --git a/src/MEDCoupling/MEDCouplingRemapper.hxx b/src/MEDCoupling/MEDCouplingRemapper.hxx index 5325745b9..4c838424e 100644 --- a/src/MEDCoupling/MEDCouplingRemapper.hxx +++ b/src/MEDCoupling/MEDCouplingRemapper.hxx @@ -42,12 +42,12 @@ namespace ParaMEDMEM namespace ParaMEDMEM { typedef enum - { - IK_ONLY_PREFERED = 0, - NOT_IK_ONLY_PREFERED = 1, - IK_ONLY_FORCED = 2, - NOT_IK_ONLY_FORCED =3 - } InterpolationMatrixPolicy; + { + IK_ONLY_PREFERED = 0, + NOT_IK_ONLY_PREFERED = 1, + IK_ONLY_FORCED = 2, + NOT_IK_ONLY_FORCED =3 + } InterpolationMatrixPolicy; class MEDCouplingRemapper : public TimeLabel, public INTERP_KERNEL::InterpolationOptions { diff --git a/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx b/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx index acb73dc77..3f27e506a 100644 --- a/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx +++ b/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx @@ -52,7 +52,7 @@ const char MEDCouplingLinearTime::REPR[]="Linear time between 2 time steps."; MEDCouplingTimeDiscretization *MEDCouplingTimeDiscretization::New(TypeOfTimeDiscretization type) { switch(type) - { + { case MEDCouplingNoTimeLabel::DISCRETIZATION: return new MEDCouplingNoTimeLabel; case MEDCouplingWithTimeStep::DISCRETIZATION: @@ -63,7 +63,7 @@ MEDCouplingTimeDiscretization *MEDCouplingTimeDiscretization::New(TypeOfTimeDisc return new MEDCouplingLinearTime; default: throw INTERP_KERNEL::Exception("Time discretization not implemented yet"); - } + } } void MEDCouplingTimeDiscretization::copyTinyAttrFrom(const MEDCouplingTimeDiscretization& other) @@ -1251,7 +1251,7 @@ void MEDCouplingNoTimeLabel::finishUnserialization2(const std::vector& tiny } MEDCouplingWithTimeStep::MEDCouplingWithTimeStep(const MEDCouplingWithTimeStep& other, bool deepCpy):MEDCouplingTimeDiscretization(other,deepCpy), - _time(other._time),_iteration(other._iteration),_order(other._order) + _time(other._time),_iteration(other._iteration),_order(other._order) { } @@ -1773,8 +1773,8 @@ void MEDCouplingConstOnTimeInterval::finishUnserialization2(const std::vectoraddEqual(other->getArray()); } - + MEDCouplingTimeDiscretization *MEDCouplingConstOnTimeInterval::substract(const MEDCouplingTimeDiscretization *other) const { const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast(other); @@ -2185,9 +2185,9 @@ void MEDCouplingConstOnTimeInterval::powEqual(const MEDCouplingTimeDiscretizatio } MEDCouplingTwoTimeSteps::MEDCouplingTwoTimeSteps(const MEDCouplingTwoTimeSteps& other, bool deepCpy):MEDCouplingTimeDiscretization(other,deepCpy), - _start_time(other._start_time),_end_time(other._end_time), - _start_iteration(other._start_iteration),_end_iteration(other._end_iteration), - _start_order(other._start_order),_end_order(other._end_order) + _start_time(other._start_time),_end_time(other._end_time), + _start_iteration(other._start_iteration),_end_iteration(other._end_iteration), + _start_order(other._start_order),_end_order(other._end_order) { if(other._end_array) _end_array=other._end_array->performCpy(deepCpy); @@ -2506,7 +2506,7 @@ void MEDCouplingTwoTimeSteps::finishUnserialization2(const std::vector& tin std::vector< const DataArrayDouble *> MEDCouplingTwoTimeSteps::getArraysForTime(double time) const { - if(time>_start_time-_time_tolerance && time<_end_time+_time_tolerance) + if(time>_start_time-_time_tolerance && time<_end_time+_time_tolerance) { std::vector< const DataArrayDouble *> ret(2); ret[0]=_array; diff --git a/src/MEDLoader/MEDFileData.cxx b/src/MEDLoader/MEDFileData.cxx index 28802193b..82687b1bb 100644 --- a/src/MEDLoader/MEDFileData.cxx +++ b/src/MEDLoader/MEDFileData.cxx @@ -63,7 +63,7 @@ std::vector MEDFileData::getDirectChildren() const if((const MEDFileParameters *)_params) ret.push_back((const MEDFileParameters *)_params); return ret; - + } MEDFileFields *MEDFileData::getFields() const @@ -225,15 +225,15 @@ MEDFileData::MEDFileData() MEDFileData::MEDFileData(const std::string& fileName) try - { +{ _fields=MEDFileFields::New(fileName); _meshes=MEDFileMeshes::New(fileName); _params=MEDFileParameters::New(fileName); - } +} catch(INTERP_KERNEL::Exception& e) - { +{ throw e; - } +} void MEDFileData::write(const std::string& fileName, int mode) const { diff --git a/src/MEDLoader/MEDFileField.cxx b/src/MEDLoader/MEDFileField.cxx index ffed76bff..31812cb58 100644 --- a/src/MEDLoader/MEDFileField.cxx +++ b/src/MEDLoader/MEDFileField.cxx @@ -96,7 +96,7 @@ MEDFileFieldLoc::MEDFileFieldLoc(med_idt fid, int id) MEDFileFieldLoc::MEDFileFieldLoc(const std::string& locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector& refCoo, const std::vector& gsCoo, const std::vector& w):_name(locName),_geo_type(geoType),_ref_coo(refCoo),_gs_coo(gsCoo), - _w(w) + _w(w) { const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(_geo_type); _dim=cm.getDimension(); @@ -155,7 +155,7 @@ bool MEDFileFieldLoc::isEqual(const MEDFileFieldLoc& other, double eps) const return false; if(!MEDCouplingGaussLocalization::AreAlmostEqual(_w,other._w,eps)) return false; - + return true; } @@ -210,7 +210,7 @@ void MEDFileFieldPerMeshPerTypePerDisc::assignFieldNoProfile(int& start, int off _type=field->getTypeOfField(); _start=start; switch(_type) - { + { case ON_CELLS: { getOrCreateAndGetArray()->setContigPartOfSelectedValues2(_start,arrr,offset,offset+nbOfCells,1); @@ -267,7 +267,7 @@ void MEDFileFieldPerMeshPerTypePerDisc::assignFieldNoProfile(int& start, int off } default: throw INTERP_KERNEL::Exception("MEDFileFieldPerMeshPerTypePerDisc::assignFieldNoProfile : not implemented yet for such discretization type of field !"); - } + } start=_end; } @@ -300,13 +300,13 @@ void MEDFileFieldPerMeshPerTypePerDisc::assignFieldProfile(int& start, const Dat } _start=start; switch(_type) - { + { case ON_NODES: { - _nval=idsInPfl->getNumberOfTuples(); - getOrCreateAndGetArray()->setContigPartOfSelectedValues2(_start,arrr,0,arrr->getNumberOfTuples(),1); - _end=_start+_nval; - break; + _nval=idsInPfl->getNumberOfTuples(); + getOrCreateAndGetArray()->setContigPartOfSelectedValues2(_start,arrr,0,arrr->getNumberOfTuples(),1); + _end=_start+_nval; + break; } case ON_CELLS: { @@ -379,7 +379,7 @@ void MEDFileFieldPerMeshPerTypePerDisc::assignFieldProfile(int& start, const Dat } default: throw INTERP_KERNEL::Exception("MEDFileFieldPerMeshPerTypePerDisc::assignFieldProfile : not implemented yet for such discretization type of field !"); - } + } start=_end; } @@ -426,11 +426,11 @@ MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypePerDisc::deepCpy(ME MEDFileFieldPerMeshPerTypePerDisc::MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerType *fath, TypeOfField atype, int profileIt) try:_type(atype),_father(fath),_profile_it(profileIt) - { - } +{ +} catch(INTERP_KERNEL::Exception& e) { - throw e; + throw e; } MEDFileFieldPerMeshPerTypePerDisc::MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int locId, const std::string& dummy):_type(type),_father(fath),_loc_id(locId) @@ -442,7 +442,7 @@ MEDFileFieldPerMeshPerTypePerDisc::MEDFileFieldPerMeshPerTypePerDisc(const MEDFi } MEDFileFieldPerMeshPerTypePerDisc::MEDFileFieldPerMeshPerTypePerDisc():_type(ON_CELLS),_father(0),_start(-std::numeric_limits::max()),_end(-std::numeric_limits::max()), - _nval(-std::numeric_limits::max()),_loc_id(-std::numeric_limits::max()) + _nval(-std::numeric_limits::max()),_loc_id(-std::numeric_limits::max()) { } @@ -465,7 +465,7 @@ void MEDFileFieldPerMeshPerTypePerDisc::loadOnlyStructureOfDataRecursively(med_i med_geometry_type mgeoti; med_entity_type menti=MEDFileFieldPerMeshPerType::ConvertIntoMEDFileType(type,geoType,mgeoti); _nval=MEDfieldnValueWithProfile(fid,fieldName.c_str(),iteration,order,menti,mgeoti,_profile_it,MED_COMPACT_PFLMODE, - pflname,&profilesize,locname,&nbi); + pflname,&profilesize,locname,&nbi); _profile=MEDLoaderBase::buildStringFromFortran(pflname,MED_NAME_SIZE); _localization=MEDLoaderBase::buildStringFromFortran(locname,MED_NAME_SIZE); _start=start; @@ -792,7 +792,7 @@ int MEDFileFieldPerMeshPerTypePerDisc::fillTupleIds(int *ptToFill) const int MEDFileFieldPerMeshPerTypePerDisc::ConvertType(TypeOfField type, int locId) { switch(type) - { + { case ON_CELLS: return -2; case ON_GAUSS_NE: @@ -801,7 +801,7 @@ int MEDFileFieldPerMeshPerTypePerDisc::ConvertType(TypeOfField type, int locId) return locId; default: throw INTERP_KERNEL::Exception("MEDFileFieldPerMeshPerTypePerDisc::ConvertType : not managed type of field !"); - } + } } std::vector< std::vector< const MEDFileFieldPerMeshPerTypePerDisc *> > MEDFileFieldPerMeshPerTypePerDisc::SplitPerDiscretization(const std::vector< const MEDFileFieldPerMeshPerTypePerDisc *>& entries) @@ -887,9 +887,9 @@ bool MEDFileFieldPerMeshPerTypePerDisc::RenumberChunks(int offset, const std::ve int nbEntityElts=subIds->getNumberOfTuples(); bool ret2; MEDCouplingAutoRefCountObjectPtr eltToAdd=MEDFileFieldPerMeshPerTypePerDisc:: - NewObjectOnSameDiscThanPool(type,(INTERP_KERNEL::NormalizedCellType)newCode[3*(*idIt)],subIds,!subIds->isIdentity() || nbEntityElts!=newCode[3*(*idIt)+1],nbi, - offset+offset2, - li,glob,ret2); + NewObjectOnSameDiscThanPool(type,(INTERP_KERNEL::NormalizedCellType)newCode[3*(*idIt)],subIds,!subIds->isIdentity() || nbEntityElts!=newCode[3*(*idIt)+1],nbi, + offset+offset2, + li,glob,ret2); ret=ret || ret2; result.push_back(eltToAdd); offset2+=nbEntityElts*nbi; @@ -916,7 +916,7 @@ MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypePerDisc::NewObjectO bool isPfl, int nbi, int offset, std::list< const MEDFileFieldPerMeshPerTypePerDisc *>& entriesOnSameDisc, MEDFileFieldGlobsReal& glob, - bool ¬InExisting) throw(INTERP_KERNEL::Exception) + bool ¬InExisting) { int nbMeshEntities=idsOfMeshElt->getNumberOfTuples(); std::list< const MEDFileFieldPerMeshPerTypePerDisc *>::iterator it=entriesOnSameDisc.begin(); @@ -965,7 +965,7 @@ MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypePerDisc::NewObjectO entriesOnSameDisc.erase(it); return ret; } - + } MEDFileFieldPerMeshPerType *MEDFileFieldPerMeshPerType::NewOnRead(med_idt fid, MEDFileFieldPerMesh *fath, TypeOfField type, INTERP_KERNEL::NormalizedCellType geoType, const MEDFileFieldNameScope& nasc) @@ -1511,7 +1511,7 @@ void MEDFileFieldPerMeshPerType::writeLL(med_idt fid, const MEDFileFieldNameScop med_entity_type MEDFileFieldPerMeshPerType::ConvertIntoMEDFileType(TypeOfField ikType, INTERP_KERNEL::NormalizedCellType ikGeoType, med_geometry_type& medfGeoType) { switch(ikType) - { + { case ON_CELLS: medfGeoType=typmai3[(int)ikGeoType]; return MED_CELL; @@ -1526,7 +1526,7 @@ med_entity_type MEDFileFieldPerMeshPerType::ConvertIntoMEDFileType(TypeOfField i return MED_CELL; default: throw INTERP_KERNEL::Exception("MEDFileFieldPerMeshPerType::ConvertIntoMEDFileType : unexpected entity type ! internal error"); - } + } return MED_UNDEF_ENTITY_TYPE; } @@ -2217,7 +2217,7 @@ int MEDFileFieldPerMesh::addNewEntryIfNecessary(INTERP_KERNEL::NormalizedCellTyp */ MEDCouplingFieldDouble *MEDFileFieldPerMesh::finishField(TypeOfField type, const MEDFileFieldGlobsReal *glob, const std::vector< std::pair >& dads, const std::vector& locs, - const MEDCouplingMesh *mesh, bool& isPfl, MEDCouplingAutoRefCountObjectPtr& arrOut, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception) + const MEDCouplingMesh *mesh, bool& isPfl, MEDCouplingAutoRefCountObjectPtr& arrOut, const MEDFileFieldNameScope& nasc) const { isPfl=false; MEDCouplingAutoRefCountObjectPtr ret=MEDCouplingFieldDouble::New(type,ONE_TIME); @@ -2257,7 +2257,7 @@ MEDCouplingFieldDouble *MEDFileFieldPerMesh::finishField(TypeOfField type, const MEDCouplingFieldDouble *MEDFileFieldPerMesh::finishField2(TypeOfField type, const MEDFileFieldGlobsReal *glob, const std::vector >& dads, const std::vector& locs, const std::vector& geoTypes, - const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MEDCouplingAutoRefCountObjectPtr& arrOut, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception) + const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MEDCouplingAutoRefCountObjectPtr& arrOut, const MEDFileFieldNameScope& nasc) const { if(da->isIdentity()) { @@ -2277,7 +2277,7 @@ MEDCouplingFieldDouble *MEDFileFieldPerMesh::finishField2(TypeOfField type, cons */ MEDCouplingFieldDouble *MEDFileFieldPerMesh::finishFieldNode2(const MEDFileFieldGlobsReal *glob, const std::vector >& dads, const std::vector& locs, - const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MEDCouplingAutoRefCountObjectPtr& arrOut, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception) + const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MEDCouplingAutoRefCountObjectPtr& arrOut, const MEDFileFieldNameScope& nasc) const { if(da->isIdentity()) { @@ -2362,7 +2362,7 @@ DataArray *MEDFileFieldPerMesh::finishField4(const std::vector meshName=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE); INTERP_KERNEL::AutoPtr pflName=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE); @@ -4074,7 +4074,7 @@ int MEDFileAnyTypeField1TSWithoutSDA::addNewEntryIfNecessary(const MEDCouplingMe } bool MEDFileAnyTypeField1TSWithoutSDA::renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector& oldCode, const std::vector& newCode, const DataArrayInt *renumO2N, - MEDFileFieldGlobsReal& glob) + MEDFileFieldGlobsReal& glob) { bool ret=false; for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMesh > >::iterator it=_field_per_mesh.begin();it!=_field_per_mesh.end();it++) @@ -4578,7 +4578,7 @@ MEDCouplingFieldDouble *MEDFileAnyTypeField1TSWithoutSDA::getFieldOnMeshAtLevel( bool isPfl=false; MEDCouplingAutoRefCountObjectPtr ret=_field_per_mesh[meshId]->getFieldOnMeshAtLevel(type,glob,mesh,isPfl,arrOut,nasc); switch(renumPol) - { + { case 0: { //no need to test _field_per_mesh.empty() because geMeshName has already done it @@ -4630,7 +4630,7 @@ MEDCouplingFieldDouble *MEDFileAnyTypeField1TSWithoutSDA::getFieldOnMeshAtLevel( } default: throw INTERP_KERNEL::Exception("MEDFileField1TSWithoutSDA::getFieldOnMeshAtLevel : unsupported renum policy ! Dealing with policy 0 1 2 and 3 !"); - } + } } /*! @@ -5144,7 +5144,7 @@ MEDFileAnyTypeField1TSWithoutSDA *MEDFileAnyTypeField1TS::BuildContentFrom(med_i LocateField2(fid,fileName,0,true,fieldName,typcha,infos,dtunit); MEDCouplingAutoRefCountObjectPtr ret; switch(typcha) - { + { case MED_FLOAT64: { ret=MEDFileField1TSWithoutSDA::New(fieldName.c_str(),-1,-1/*iteration*/,-1/*order*/,std::vector()); @@ -5160,7 +5160,7 @@ MEDFileAnyTypeField1TSWithoutSDA *MEDFileAnyTypeField1TS::BuildContentFrom(med_i std::ostringstream oss; oss << "MEDFileAnyTypeField1TS::BuildContentFrom(fileName) : file \'" << fileName << "\' contains field with name \'" << fieldName << "\' but the type of the first field is not in [MED_FLOAT64, MED_INT32] !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); } - } + } ret->setDtUnit(dtunit.c_str()); ret->getOrCreateAndGetArray()->setInfoAndChangeNbOfCompo(infos); // @@ -5185,9 +5185,9 @@ try:MEDFileFieldGlobsReal(fileName) loadGlobals(fid); } catch(INTERP_KERNEL::Exception& e) - { +{ throw e; - } +} MEDFileAnyTypeField1TSWithoutSDA *MEDFileAnyTypeField1TS::BuildContentFrom(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll) { @@ -5198,7 +5198,7 @@ MEDFileAnyTypeField1TSWithoutSDA *MEDFileAnyTypeField1TS::BuildContentFrom(med_i int nbSteps=LocateField(fid,fileName,fieldName,iii,typcha,infos,dtunit); MEDCouplingAutoRefCountObjectPtr ret; switch(typcha) - { + { case MED_FLOAT64: { ret=MEDFileField1TSWithoutSDA::New(fieldName,-1,-1/*iteration*/,-1/*order*/,std::vector()); @@ -5214,7 +5214,7 @@ MEDFileAnyTypeField1TSWithoutSDA *MEDFileAnyTypeField1TS::BuildContentFrom(med_i std::ostringstream oss; oss << "MEDFileAnyTypeField1TS::BuildContentFrom(fileName,fieldName) : file \'" << fileName << "\' contains field with name \'" << fieldName << "\' but the type of field is not in [MED_FLOAT64, MED_INT32] !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); } - } + } ret->setDtUnit(dtunit.c_str()); ret->getOrCreateAndGetArray()->setInfoAndChangeNbOfCompo(infos); // @@ -5245,9 +5245,9 @@ try:MEDFileFieldGlobsReal(fileName) loadGlobals(fid); } catch(INTERP_KERNEL::Exception& e) - { +{ throw e; - } +} MEDFileAnyTypeField1TS *MEDFileAnyTypeField1TS::BuildNewInstanceFromContent(MEDFileAnyTypeField1TSWithoutSDA *c, const std::string& fileName) { @@ -5309,7 +5309,7 @@ MEDFileAnyTypeField1TSWithoutSDA *MEDFileAnyTypeField1TS::BuildContentFrom(med_i int nbOfStep2=LocateField(fid,fileName,fieldName,iii,typcha,infos,dtunit); MEDCouplingAutoRefCountObjectPtr ret; switch(typcha) - { + { case MED_FLOAT64: { ret=MEDFileField1TSWithoutSDA::New(fieldName,-1,iteration,order,std::vector()); @@ -5325,7 +5325,7 @@ MEDFileAnyTypeField1TSWithoutSDA *MEDFileAnyTypeField1TS::BuildContentFrom(med_i std::ostringstream oss; oss << "MEDFileAnyTypeField1TS::BuildContentFrom(fileName,fieldName,iteration,order) : file \'" << fileName << "\' contains field with name \'" << fieldName << "\' but the type of field is not in [MED_FLOAT64, MED_INT32] !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); } - } + } ret->setDtUnit(dtunit.c_str()); ret->getOrCreateAndGetArray()->setInfoAndChangeNbOfCompo(infos); // @@ -5367,9 +5367,9 @@ try:MEDFileFieldGlobsReal(fileName) loadGlobals(fid); } catch(INTERP_KERNEL::Exception& e) - { +{ throw e; - } +} /*! * This constructor is a shallow copy constructor. If \a shallowCopyOfContent is true the content of \a other is shallow copied. @@ -5843,7 +5843,7 @@ std::vector MEDFileAnyTypeField1TS::getTypesOfFieldAvailable() cons } std::vector< std::vector > > MEDFileAnyTypeField1TS::getFieldSplitedByType(const std::string& mname, std::vector& types, std::vector< std::vector >& typesF, - std::vector< std::vector >& pfls, std::vector< std::vector >& locs) const throw(INTERP_KERNEL::Exception) + std::vector< std::vector >& pfls, std::vector< std::vector >& locs) const { return contentNotNullBase()->getFieldSplitedByType(mname,types,typesF,pfls,locs); } @@ -6067,21 +6067,21 @@ try:MEDFileAnyTypeField1TS(fileName,loadAll) { } catch(INTERP_KERNEL::Exception& e) - { throw e; } +{ throw e; } MEDFileField1TS::MEDFileField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll) try:MEDFileAnyTypeField1TS(fileName,fieldName,loadAll) { } catch(INTERP_KERNEL::Exception& e) - { throw e; } +{ throw e; } MEDFileField1TS::MEDFileField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll) try:MEDFileAnyTypeField1TS(fileName,fieldName,iteration,order,loadAll) { } catch(INTERP_KERNEL::Exception& e) - { throw e; } +{ throw e; } /*! * This constructor is a shallow copy constructor. If \a shallowCopyOfContent is true the content of \a other is shallow copied. @@ -6094,7 +6094,7 @@ try:MEDFileAnyTypeField1TS(other,shallowCopyOfContent) { } catch(INTERP_KERNEL::Exception& e) - { throw e; } +{ throw e; } MEDFileField1TS::MEDFileField1TS() { @@ -6344,7 +6344,7 @@ DataArrayDouble *MEDFileField1TS::getUndergroundDataArrayExt(std::vector< std::p } std::vector< std::vector > MEDFileField1TS::getFieldSplitedByType2(const std::string& mname, std::vector& types, std::vector< std::vector >& typesF, - std::vector< std::vector >& pfls, std::vector< std::vector >& locs) const throw(INTERP_KERNEL::Exception) + std::vector< std::vector >& pfls, std::vector< std::vector >& locs) const { return contentNotNull()->getFieldSplitedByType2(mname,types,typesF,pfls,locs); } @@ -6396,21 +6396,21 @@ try:MEDFileAnyTypeField1TS(fileName,loadAll) { } catch(INTERP_KERNEL::Exception& e) - { throw e; } +{ throw e; } MEDFileIntField1TS::MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll) try:MEDFileAnyTypeField1TS(fileName,fieldName,loadAll) { } catch(INTERP_KERNEL::Exception& e) - { throw e; } +{ throw e; } MEDFileIntField1TS::MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll) try:MEDFileAnyTypeField1TS(fileName,fieldName,iteration,order,loadAll) { } catch(INTERP_KERNEL::Exception& e) - { throw e; } +{ throw e; } /*! * This constructor is a shallow copy constructor. If \a shallowCopyOfContent is true the content of \a other is shallow copied. @@ -6737,7 +6737,7 @@ try:MEDFileFieldNameScope(fieldName),_infos(infos) } catch(INTERP_KERNEL::Exception& e) { - throw e; + throw e; } std::size_t MEDFileAnyTypeFieldMultiTSWithoutSDA::getHeapMemorySizeWithoutChildren() const @@ -6945,7 +6945,7 @@ DataArray *MEDFileAnyTypeFieldMultiTSWithoutSDA::getUndergroundDataArrayExt(int } bool MEDFileAnyTypeFieldMultiTSWithoutSDA::renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector& oldCode, const std::vector& newCode, const DataArrayInt *renumO2N, - MEDFileFieldGlobsReal& glob) + MEDFileFieldGlobsReal& glob) { bool ret=false; for(std::vector< MEDCouplingAutoRefCountObjectPtr >::iterator it=_time_steps.begin();it!=_time_steps.end();it++) @@ -7049,7 +7049,7 @@ void MEDFileAnyTypeFieldMultiTSWithoutSDA::loadStructureOrStructureAndBigArraysR med_float dt=0.0; MEDfieldComputingStepMeshInfo(fid,_name.c_str(),i+1,&numdt,&numo,&dt,&meshIt,&meshOrder); switch(fieldTyp) - { + { case MED_FLOAT64: { _time_steps[i]=MEDFileField1TSWithoutSDA::New(_name.c_str(),i+1,numdt,numo,_infos); @@ -7062,7 +7062,7 @@ void MEDFileAnyTypeFieldMultiTSWithoutSDA::loadStructureOrStructureAndBigArraysR } default: throw INTERP_KERNEL::Exception("MEDFileAnyTypeFieldMultiTSWithoutSDA::loadStructureOrStructureAndBigArraysRecursively : managed field type are : FLOAT64, INT32 !"); - } + } if(loadAll) _time_steps[i]->loadStructureAndBigArraysRecursively(fid,*this); else @@ -7104,7 +7104,7 @@ void MEDFileAnyTypeFieldMultiTSWithoutSDA::loadBigArraysRecursively(med_idt fid, elt->loadBigArraysRecursively(fid,nasc); } } - + void MEDFileAnyTypeFieldMultiTSWithoutSDA::loadBigArraysRecursivelyIfNecessary(med_idt fid, const MEDFileFieldNameScope& nasc) { for(std::vector< MEDCouplingAutoRefCountObjectPtr >::iterator it=_time_steps.begin();it!=_time_steps.end();it++) @@ -7608,7 +7608,7 @@ try:MEDFileAnyTypeFieldMultiTSWithoutSDA(fid,fieldId,loadAll) { } catch(INTERP_KERNEL::Exception& e) - { throw e; } +{ throw e; } MEDFileFieldMultiTSWithoutSDA::MEDFileFieldMultiTSWithoutSDA(med_idt fid, const std::string& fieldName, med_field_type fieldTyp, const std::vector& infos, int nbOfStep, const std::string& dtunit, bool loadAll) try:MEDFileAnyTypeFieldMultiTSWithoutSDA(fid,fieldName,fieldTyp,infos,nbOfStep,dtunit,loadAll) @@ -7694,9 +7694,9 @@ try:MEDFileFieldGlobsReal(fileName) loadGlobals(fid); } catch(INTERP_KERNEL::Exception& e) - { +{ throw e; - } +} MEDFileAnyTypeFieldMultiTSWithoutSDA *MEDFileAnyTypeFieldMultiTS::BuildContentFrom(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll) { @@ -7707,7 +7707,7 @@ MEDFileAnyTypeFieldMultiTSWithoutSDA *MEDFileAnyTypeFieldMultiTS::BuildContentFr MEDFileAnyTypeField1TS::LocateField(fid,fileName,fieldName,i,typcha,infos,dtunit); MEDCouplingAutoRefCountObjectPtr ret; switch(typcha) - { + { case MED_FLOAT64: { ret=new MEDFileFieldMultiTSWithoutSDA(fid,i,loadAll); @@ -7723,7 +7723,7 @@ MEDFileAnyTypeFieldMultiTSWithoutSDA *MEDFileAnyTypeFieldMultiTS::BuildContentFr std::ostringstream oss; oss << "MEDFileAnyTypeFieldMultiTS::BuildContentFrom(fileName,fieldName) : file \'" << fileName << "\' contains field with name \'" << fieldName << "\' but the type of field is not in [MED_FLOAT64, MED_INT32] !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); } - } + } ret->setDtUnit(dtunit.c_str()); return ret.retn(); } @@ -7737,7 +7737,7 @@ MEDFileAnyTypeFieldMultiTSWithoutSDA *MEDFileAnyTypeFieldMultiTS::BuildContentFr MEDFileAnyTypeField1TS::LocateField2(fid,fileName,0,true,fieldName,typcha,infos,dtunit); MEDCouplingAutoRefCountObjectPtr ret; switch(typcha) - { + { case MED_FLOAT64: { ret=new MEDFileFieldMultiTSWithoutSDA(fid,0,loadAll); @@ -7753,7 +7753,7 @@ MEDFileAnyTypeFieldMultiTSWithoutSDA *MEDFileAnyTypeFieldMultiTS::BuildContentFr std::ostringstream oss; oss << "MEDFileAnyTypeFieldMultiTS::BuildContentFrom(fileName) : file \'" << fileName << "\' contains field with name \'" << fieldName << "\' but the type of the first field is not in [MED_FLOAT64, MED_INT32] !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); } - } + } ret->setDtUnit(dtunit.c_str()); return ret.retn(); } @@ -7788,9 +7788,9 @@ try:MEDFileFieldGlobsReal(fileName) loadGlobals(fid); } catch(INTERP_KERNEL::Exception& e) - { +{ throw e; - } +} //= MEDFileIntFieldMultiTSWithoutSDA @@ -7822,7 +7822,7 @@ try:MEDFileAnyTypeFieldMultiTSWithoutSDA(fid,fieldId,loadAll) { } catch(INTERP_KERNEL::Exception& e) - { throw e; } +{ throw e; } MEDFileAnyTypeField1TSWithoutSDA *MEDFileIntFieldMultiTSWithoutSDA::createNew1TSWithoutSDAEmptyInstance() const { @@ -8852,7 +8852,7 @@ const MEDFileFieldMultiTSWithoutSDA *MEDFileFieldMultiTS::contentNotNull() const return ret; } - MEDFileFieldMultiTSWithoutSDA *MEDFileFieldMultiTS::contentNotNull() +MEDFileFieldMultiTSWithoutSDA *MEDFileFieldMultiTS::contentNotNull() { MEDFileAnyTypeFieldMultiTSWithoutSDA *pt(_content); if(!pt) @@ -8922,14 +8922,14 @@ try:MEDFileAnyTypeFieldMultiTS(fileName,loadAll) { } catch(INTERP_KERNEL::Exception& e) - { throw e; } +{ throw e; } MEDFileFieldMultiTS::MEDFileFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll) try:MEDFileAnyTypeFieldMultiTS(fileName,fieldName,loadAll) { } catch(INTERP_KERNEL::Exception& e) - { throw e; } +{ throw e; } MEDFileFieldMultiTS::MEDFileFieldMultiTS(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent):MEDFileAnyTypeFieldMultiTS(other,shallowCopyOfContent) { @@ -9347,7 +9347,7 @@ const MEDFileIntFieldMultiTSWithoutSDA *MEDFileIntFieldMultiTS::contentNotNull() return ret; } - MEDFileIntFieldMultiTSWithoutSDA *MEDFileIntFieldMultiTS::contentNotNull() +MEDFileIntFieldMultiTSWithoutSDA *MEDFileIntFieldMultiTS::contentNotNull() { MEDFileAnyTypeFieldMultiTSWithoutSDA *pt(_content); if(!pt) @@ -9372,14 +9372,14 @@ try:MEDFileAnyTypeFieldMultiTS(fileName,loadAll) { } catch(INTERP_KERNEL::Exception& e) - { throw e; } +{ throw e; } MEDFileIntFieldMultiTS::MEDFileIntFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll) try:MEDFileAnyTypeFieldMultiTS(fileName,fieldName,loadAll) { } catch(INTERP_KERNEL::Exception& e) - { throw e; } +{ throw e; } DataArrayInt *MEDFileIntFieldMultiTS::getUndergroundDataArray(int iteration, int order) const { @@ -9559,42 +9559,42 @@ MEDFileFields::MEDFileFields() MEDFileFields::MEDFileFields(const std::string& fileName, bool loadAll) try:MEDFileFieldGlobsReal(fileName) - { - MEDFileUtilities::CheckFileForRead(fileName); - MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY); - int nbFields=MEDnField(fid); - _fields.resize(nbFields); - med_field_type typcha; - for(int i=0;i infos; + std::string fieldName,dtunit; + int nbOfStep=MEDFileAnyTypeField1TS::LocateField2(fid,fileName,i,false,fieldName,typcha,infos,dtunit); + switch(typcha) { - std::vector infos; - std::string fieldName,dtunit; - int nbOfStep=MEDFileAnyTypeField1TS::LocateField2(fid,fileName,i,false,fieldName,typcha,infos,dtunit); - switch(typcha) + case MED_FLOAT64: { - case MED_FLOAT64: - { - _fields[i]=MEDFileFieldMultiTSWithoutSDA::New(fid,fieldName.c_str(),typcha,infos,nbOfStep,dtunit,loadAll); - break; - } - case MED_INT32: - { - _fields[i]=MEDFileIntFieldMultiTSWithoutSDA::New(fid,fieldName.c_str(),typcha,infos,nbOfStep,dtunit,loadAll); - break; - } - default: - { - std::ostringstream oss; oss << "constructor MEDFileFields(fileName) : file \'" << fileName << "\' at pos #" << i << " field has name \'" << fieldName << "\' but the type of field is not in [MED_FLOAT64, MED_INT32] !"; - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } + _fields[i]=MEDFileFieldMultiTSWithoutSDA::New(fid,fieldName.c_str(),typcha,infos,nbOfStep,dtunit,loadAll); + break; + } + case MED_INT32: + { + _fields[i]=MEDFileIntFieldMultiTSWithoutSDA::New(fid,fieldName.c_str(),typcha,infos,nbOfStep,dtunit,loadAll); + break; + } + default: + { + std::ostringstream oss; oss << "constructor MEDFileFields(fileName) : file \'" << fileName << "\' at pos #" << i << " field has name \'" << fieldName << "\' but the type of field is not in [MED_FLOAT64, MED_INT32] !"; + throw INTERP_KERNEL::Exception(oss.str().c_str()); } } - loadAllGlobals(fid); - } + } + loadAllGlobals(fid); +} catch(INTERP_KERNEL::Exception& e) - { +{ throw e; - } +} void MEDFileFields::writeLL(med_idt fid) const { diff --git a/src/MEDLoader/MEDFileField.hxx b/src/MEDLoader/MEDFileField.hxx index 4a8f1e552..818270091 100644 --- a/src/MEDLoader/MEDFileField.hxx +++ b/src/MEDLoader/MEDFileField.hxx @@ -86,7 +86,7 @@ namespace ParaMEDMEM std::vector _w; }; -/// @cond INTERNAL + /// @cond INTERNAL class MEDFileAnyTypeField1TSWithoutSDA; class MEDFileFieldPerMeshPerType; class MEDFileField1TSWithoutSDA; @@ -149,7 +149,7 @@ namespace ParaMEDMEM MEDFileFieldGlobsReal& glob, DataArrayDouble *arr, std::vector< MEDCouplingAutoRefCountObjectPtr >& result); static MEDFileFieldPerMeshPerTypePerDisc *NewObjectOnSameDiscThanPool(TypeOfField typeF, INTERP_KERNEL::NormalizedCellType geoType, DataArrayInt *idsOfMeshElt, bool isPfl, int nbi, int offset, std::list< const MEDFileFieldPerMeshPerTypePerDisc *>& entriesOnSameDisc, - MEDFileFieldGlobsReal& glob, bool ¬InExisting) throw(INTERP_KERNEL::Exception); + MEDFileFieldGlobsReal& glob, bool ¬InExisting); private: MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int profileIt); MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int profileIt, const std::string& dummy); @@ -274,14 +274,14 @@ namespace ParaMEDMEM private: int addNewEntryIfNecessary(INTERP_KERNEL::NormalizedCellType type); MEDCouplingFieldDouble *finishField(TypeOfField type, const MEDFileFieldGlobsReal *glob, - const std::vector< std::pair >& dads, const std::vector& locs, const MEDCouplingMesh *mesh, bool& isPfl, MEDCouplingAutoRefCountObjectPtr &arrOut, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception); + const std::vector< std::pair >& dads, const std::vector& locs, const MEDCouplingMesh *mesh, bool& isPfl, MEDCouplingAutoRefCountObjectPtr &arrOut, const MEDFileFieldNameScope& nasc) const; MEDCouplingFieldDouble *finishField2(TypeOfField type, const MEDFileFieldGlobsReal *glob, const std::vector< std::pair >& dads, const std::vector& locs, const std::vector& geoTypes, - const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MEDCouplingAutoRefCountObjectPtr &arrOut, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception); + const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MEDCouplingAutoRefCountObjectPtr &arrOut, const MEDFileFieldNameScope& nasc) const; MEDCouplingFieldDouble *finishFieldNode2(const MEDFileFieldGlobsReal *glob, const std::vector< std::pair >& dads, const std::vector& locs, - const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MEDCouplingAutoRefCountObjectPtr &arrOut, const MEDFileFieldNameScope& nasc) const throw(INTERP_KERNEL::Exception); + const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MEDCouplingAutoRefCountObjectPtr &arrOut, const MEDFileFieldNameScope& nasc) const; DataArray *finishField4(const std::vector< std::pair >& dads, const DataArrayInt *pflIn, int nbOfElems, DataArrayInt *&pflOut) const; void assignNewLeaves(const std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMeshPerTypePerDisc > >& leaves); static void SortArraysPerType(const MEDFileFieldGlobsReal *glob, TypeOfField type, @@ -359,7 +359,7 @@ namespace ParaMEDMEM std::string _file_name; }; -/// @endcond INTERNAL + /// @endcond INTERNAL class MEDFileFieldGlobsReal { @@ -543,7 +543,7 @@ namespace ParaMEDMEM }; class MEDFileIntField1TSWithoutSDA; - + /*! * SDA is for Shared Data Arrays such as profiles. */ @@ -654,7 +654,7 @@ namespace ParaMEDMEM MEDLOADER_EXPORT std::vector& getInfo(); MEDLOADER_EXPORT std::vector getTypesOfFieldAvailable() const; MEDLOADER_EXPORT std::vector< std::vector > > getFieldSplitedByType(const std::string& mname, std::vector& types, std::vector< std::vector >& typesF, - std::vector< std::vector >& pfls, std::vector< std::vector >& locs) const throw(INTERP_KERNEL::Exception); + std::vector< std::vector >& pfls, std::vector< std::vector >& locs) const; MEDLOADER_EXPORT MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId); MEDLOADER_EXPORT const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const; MEDLOADER_EXPORT int getNonEmptyLevels(const std::string& mname, std::vector& levs) const; @@ -692,9 +692,9 @@ namespace ParaMEDMEM protected: MEDCouplingAutoRefCountObjectPtr _content; }; - + class MEDFileIntField1TS; - + /*! * User class. */ @@ -722,9 +722,9 @@ namespace ParaMEDMEM MEDLOADER_EXPORT MEDFileAnyTypeField1TS *shallowCpy() const; MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArray() const; MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArrayExt(std::vector< std::pair,std::pair > >& entries) const; - + MEDLOADER_EXPORT std::vector< std::vector > getFieldSplitedByType2(const std::string& mname, std::vector& types, std::vector< std::vector >& typesF, - std::vector< std::vector >& pfls, std::vector< std::vector >& locs) const throw(INTERP_KERNEL::Exception); + std::vector< std::vector >& pfls, std::vector< std::vector >& locs) const; public: MEDLOADER_EXPORT static void SetDataArrayDoubleInField(MEDCouplingFieldDouble *f, MEDCouplingAutoRefCountObjectPtr& arr); MEDLOADER_EXPORT static DataArrayDouble *ReturnSafelyDataArrayDouble(MEDCouplingAutoRefCountObjectPtr& arr); @@ -774,7 +774,7 @@ namespace ParaMEDMEM MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll); MEDFileIntField1TS(const MEDFileIntField1TSWithoutSDA& other, bool shallowCopyOfContent); }; - + class MEDFileAnyTypeFieldMultiTSWithoutSDA : public RefCountObject, public MEDFileFieldNameScope { protected: @@ -1062,8 +1062,8 @@ namespace ParaMEDMEM MEDLOADER_EXPORT MEDFileAnyTypeField1TS *nextt(); private: MEDCouplingAutoRefCountObjectPtr _fmts; - int _iter_id; - int _nb_iter; + int _iter_id; + int _nb_iter; }; class MEDFileFieldsIterator; @@ -1133,8 +1133,8 @@ namespace ParaMEDMEM MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *nextt(); private: MEDCouplingAutoRefCountObjectPtr _fs; - int _iter_id; - int _nb_iter; + int _iter_id; + int _nb_iter; }; } diff --git a/src/MEDLoader/MEDFileFieldOverView.cxx b/src/MEDLoader/MEDFileFieldOverView.cxx index c4a5f81a8..521c4bd1b 100644 --- a/src/MEDLoader/MEDFileFieldOverView.cxx +++ b/src/MEDLoader/MEDFileFieldOverView.cxx @@ -27,7 +27,7 @@ using namespace ParaMEDMEM; const unsigned char MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE[MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE_LGTH]= - {1,3,21,5,9,7,22,34,23,28,255,255,255,255,10,14,13,255,12,255,24,255,16,27,255,26,255,29,255,255,25,42,36,4}; +{1,3,21,5,9,7,22,34,23,28,255,255,255,255,10,14,13,255,12,255,24,255,16,27,255,26,255,29,255,255,25,42,36,4}; const unsigned char MEDMeshMultiLev::HEXA27_PERM_ARRAY[27]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,24,22,21,23,20,25,26}; @@ -438,7 +438,7 @@ int MEDMeshMultiLev::getNumberOfCells(INTERP_KERNEL::NormalizedCellType t) const std::size_t sz(_nb_entities.size()); for(std::size_t i=0;ideepCpy(); if(pflName.empty() && nr) - throw INTERP_KERNEL::Exception("MEDMeshMultiLev::constructDataArray : unexpected situation for nodes 2 !"); + throw INTERP_KERNEL::Exception("MEDMeshMultiLev::constructDataArray : unexpected situation for nodes 2 !"); if(!pflName.empty() && nr) { MEDCouplingAutoRefCountObjectPtr p1(globs->getProfile(pflName.c_str())->deepCpy()); @@ -852,44 +852,44 @@ MEDUMeshMultiLev::MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vectorisAllocated()) - return ; - std::size_t sz(_parts.size()); - std::vector< MEDCouplingAutoRefCountObjectPtr > a(sz); - std::vector< const DataArrayInt *> aa(sz); - for(std::size_t i=0;i m(_parts[i]); - if(pfl) - m=dynamic_cast(_parts[i]->buildPartOfMySelfKeepCoords(pfl->begin(),pfl->end())); - DataArrayInt *cellIds=0; - m->fillCellIdsToKeepFromNodeIds(pflNodes->begin(),pflNodes->end(),true,cellIds); - MEDCouplingAutoRefCountObjectPtr cellIdsSafe(cellIds); - MEDCouplingAutoRefCountObjectPtr m2(m->buildPartOfMySelfKeepCoords(cellIds->begin(),cellIds->end())); - int tmp=-1; - MEDCouplingAutoRefCountObjectPtr o2n(m2->getNodeIdsInUse(tmp)); - a[i]=o2n->invertArrayO2N2N2O(tmp); aa[i]=a[i]; - if(pfl) - _pfls[i]=pfl->selectByTupleIdSafe(cellIds->begin(),cellIds->end()); - else - _pfls[i]=cellIdsSafe; - } - if(!aa.empty()) - _node_reduction=DataArrayInt::Aggregate(aa);//general case - else - _node_reduction=pflNodes->deepCpy();//case where no cells in read mesh. - _node_reduction->sort(true); - _node_reduction=_node_reduction->buildUnique(); - if(_node_reduction->getNumberOfTuples()==pflNodes->getNumberOfTuples()) - return ;//This is the classical case where the input node profile corresponds perfectly to a subset of cells in _parts - if(_node_reduction->getNumberOfTuples()>pflNodes->getNumberOfTuples()) - throw INTERP_KERNEL::Exception("MEDUMeshMultiLev::selectPartOfNodes : internal error in MEDCoupling during cell select from a list of nodes !"); - // Here the cells available in _parts is not enough to cover all the nodes in pflNodes. So adding vertices cells in _parts... - MEDCouplingAutoRefCountObjectPtr pflNodes2(pflNodes->deepCpy()); - pflNodes2->sort(true); - MEDCouplingAutoRefCountObjectPtr diff(pflNodes2->buildSubstractionOptimized(_node_reduction)); - appendVertices(diff,pflNodes2); + if(!pflNodes || !pflNodes->isAllocated()) + return ; + std::size_t sz(_parts.size()); + std::vector< MEDCouplingAutoRefCountObjectPtr > a(sz); + std::vector< const DataArrayInt *> aa(sz); + for(std::size_t i=0;i m(_parts[i]); + if(pfl) + m=dynamic_cast(_parts[i]->buildPartOfMySelfKeepCoords(pfl->begin(),pfl->end())); + DataArrayInt *cellIds=0; + m->fillCellIdsToKeepFromNodeIds(pflNodes->begin(),pflNodes->end(),true,cellIds); + MEDCouplingAutoRefCountObjectPtr cellIdsSafe(cellIds); + MEDCouplingAutoRefCountObjectPtr m2(m->buildPartOfMySelfKeepCoords(cellIds->begin(),cellIds->end())); + int tmp=-1; + MEDCouplingAutoRefCountObjectPtr o2n(m2->getNodeIdsInUse(tmp)); + a[i]=o2n->invertArrayO2N2N2O(tmp); aa[i]=a[i]; + if(pfl) + _pfls[i]=pfl->selectByTupleIdSafe(cellIds->begin(),cellIds->end()); + else + _pfls[i]=cellIdsSafe; + } + if(!aa.empty()) + _node_reduction=DataArrayInt::Aggregate(aa);//general case + else + _node_reduction=pflNodes->deepCpy();//case where no cells in read mesh. + _node_reduction->sort(true); + _node_reduction=_node_reduction->buildUnique(); + if(_node_reduction->getNumberOfTuples()==pflNodes->getNumberOfTuples()) + return ;//This is the classical case where the input node profile corresponds perfectly to a subset of cells in _parts + if(_node_reduction->getNumberOfTuples()>pflNodes->getNumberOfTuples()) + throw INTERP_KERNEL::Exception("MEDUMeshMultiLev::selectPartOfNodes : internal error in MEDCoupling during cell select from a list of nodes !"); + // Here the cells available in _parts is not enough to cover all the nodes in pflNodes. So adding vertices cells in _parts... + MEDCouplingAutoRefCountObjectPtr pflNodes2(pflNodes->deepCpy()); + pflNodes2->sort(true); + MEDCouplingAutoRefCountObjectPtr diff(pflNodes2->buildSubstractionOptimized(_node_reduction)); + appendVertices(diff,pflNodes2); } MEDMeshMultiLev *MEDUMeshMultiLev::prepare() const @@ -1257,7 +1257,7 @@ bool MEDStructuredMeshMultiLev::prepareForImplicitUnstructuredMeshCase(MEDMeshMu throw INTERP_KERNEL::Exception("MEDStructuredMeshMultiLev::prepareForImplicitUnstructuredMeshCase only one geo types supported at most supported for the moment !"); INTERP_KERNEL::NormalizedCellType gt(MEDCouplingStructuredMesh::GetGeoTypeGivenMeshDimension(_mesh->getMeshDimension())); if(_geo_types[0]==gt) - return false; + return false; MEDCoupling1GTUMesh *facesIfPresent((static_cast(_mesh))->getImplicitFaceMesh()); if(!facesIfPresent) return false; @@ -1436,7 +1436,7 @@ MEDMeshMultiLev *MEDCMeshMultiLev::prepare() const ret2->setNumberIdsOnCells(tmp,false); } return ret2.retn(); - + } else { @@ -1707,7 +1707,7 @@ bool MEDFileField1TSStructItem2::isFastlyEqual(int& startExp, INTERP_KERNEL::Nor return true; } -bool MEDFileField1TSStructItem2::operator==(const MEDFileField1TSStructItem2& other) const throw(INTERP_KERNEL::Exception) +bool MEDFileField1TSStructItem2::operator==(const MEDFileField1TSStructItem2& other) const { //_nb_of_entity is not taken into account here. It is not a bug, because no mesh consideration needed here to perform fast compare. //idem for _loc. It is not an effective attribute for support comparison. @@ -1807,7 +1807,7 @@ MEDFileField1TSStructItem::MEDFileField1TSStructItem(TypeOfField a, const std::v void MEDFileField1TSStructItem::checkWithMeshStruct(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs) { switch(_type) - { + { case ON_NODES: { int nbOfEnt=mst->getNumberOfNodes(); @@ -1836,10 +1836,10 @@ void MEDFileField1TSStructItem::checkWithMeshStruct(const MEDFileMeshStruct *mst } default: throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem::checkWithMeshStruct : not managed field type !"); - } + } } -bool MEDFileField1TSStructItem::operator==(const MEDFileField1TSStructItem& other) const throw(INTERP_KERNEL::Exception) +bool MEDFileField1TSStructItem::operator==(const MEDFileField1TSStructItem& other) const { if(_type!=other._type) return false; @@ -1992,7 +1992,7 @@ bool MEDFileField1TSStructItem::isFullyOnOneLev(const MEDFileMeshStruct *meshSt, return false; } -const MEDFileField1TSStructItem2& MEDFileField1TSStructItem::operator[](std::size_t i) const throw(INTERP_KERNEL::Exception) +const MEDFileField1TSStructItem2& MEDFileField1TSStructItem::operator[](std::size_t i) const { if(i>=_items.size()) throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem::operator[] : input is not in valid range !"); diff --git a/src/MEDLoader/MEDFileFieldOverView.hxx b/src/MEDLoader/MEDFileFieldOverView.hxx index acb6c3c31..84dfed483 100644 --- a/src/MEDLoader/MEDFileFieldOverView.hxx +++ b/src/MEDLoader/MEDFileFieldOverView.hxx @@ -69,9 +69,9 @@ namespace ParaMEDMEM int _nb_nodes; std::vector< std::vector > _geo_types_distrib; }; - + class MEDFileField1TSStructItem; - + class MEDMeshMultiLev : public RefCountObject { public: @@ -126,9 +126,9 @@ namespace ParaMEDMEM static const unsigned char PARAMEDMEM_2_VTKTYPE[PARAMEDMEM_2_VTKTYPE_LGTH]; static const unsigned char HEXA27_PERM_ARRAY[27]; }; - + class MEDStructuredMeshMultiLev; - + class MEDUMeshMultiLev : public MEDMeshMultiLev { public: @@ -168,7 +168,7 @@ namespace ParaMEDMEM protected: bool _is_internal; }; - + class MEDCMeshMultiLev : public MEDStructuredMeshMultiLev { public: @@ -223,7 +223,7 @@ namespace ParaMEDMEM //! warning this method also set _nb_of_entity attribute ! void checkInRange(int nbOfEntity, int nip, const MEDFileFieldGlobsReal *globs); bool isFastlyEqual(int& startExp, INTERP_KERNEL::NormalizedCellType gt, const std::string& pflName) const; - bool operator==(const MEDFileField1TSStructItem2& other) const throw(INTERP_KERNEL::Exception); + bool operator==(const MEDFileField1TSStructItem2& other) const; bool isCellSupportEqual(const MEDFileField1TSStructItem2& other, const MEDFileFieldGlobsReal *globs) const; bool isNodeSupportEqual(const MEDFileField1TSStructItem2& other, const MEDFileFieldGlobsReal *globs) const; static MEDFileField1TSStructItem2 BuildAggregationOf(const std::vector& objs, const MEDFileFieldGlobsReal *globs); @@ -243,14 +243,14 @@ namespace ParaMEDMEM MEDFileField1TSStructItem() { } MEDFileField1TSStructItem(TypeOfField a, const std::vector< MEDFileField1TSStructItem2 >& b); void checkWithMeshStruct(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs); - bool operator==(const MEDFileField1TSStructItem& other) const throw(INTERP_KERNEL::Exception); + bool operator==(const MEDFileField1TSStructItem& other) const; MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; MEDLOADER_EXPORT std::vector getDirectChildren() const; bool isEntityCell() const; bool isComputed() const { return _computed; } TypeOfField getType() const { return _type; } std::size_t getNumberOfItems() const { return _items.size(); } - const MEDFileField1TSStructItem2& operator[](std::size_t i) const throw(INTERP_KERNEL::Exception); + const MEDFileField1TSStructItem2& operator[](std::size_t i) const; // bool isCellSupportEqual(const MEDFileField1TSStructItem& other, const MEDFileFieldGlobsReal *globs) const; bool isNodeSupportEqual(const MEDFileField1TSStructItem& other, const MEDFileFieldGlobsReal *globs) const; diff --git a/src/MEDLoader/MEDFileMesh.cxx b/src/MEDLoader/MEDFileMesh.cxx index aaf990758..6360c2a9e 100644 --- a/src/MEDLoader/MEDFileMesh.cxx +++ b/src/MEDLoader/MEDFileMesh.cxx @@ -86,7 +86,7 @@ MEDFileMesh *MEDFileMesh::New(const std::string& fileName, MEDFileMeshReadSelect std::string dummy2; MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dt,it,dummy2); switch(meshType) - { + { case UNSTRUCTURED: { MEDCouplingAutoRefCountObjectPtr ret=MEDFileUMesh::New(); @@ -110,7 +110,7 @@ MEDFileMesh *MEDFileMesh::New(const std::string& fileName, MEDFileMeshReadSelect std::ostringstream oss; oss << "MEDFileMesh::New : MED file exists and has mesh '" << ms.front() << "' exists but unsupported type yet !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); } - } + } } /*! @@ -136,7 +136,7 @@ MEDFileMesh *MEDFileMesh::New(const std::string& fileName, const std::string& mN std::string dummy2; MEDFileMeshL2::GetMeshIdFromName(fid,mName,meshType,dummy0,dummy1,dummy2); switch(meshType) - { + { case UNSTRUCTURED: { MEDCouplingAutoRefCountObjectPtr ret=MEDFileUMesh::New(); @@ -160,7 +160,7 @@ MEDFileMesh *MEDFileMesh::New(const std::string& fileName, const std::string& mN std::ostringstream oss; oss << "MEDFileMesh::New : MED file exists and has mesh '" << mName << "' exists but unsupported type yet !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); } - } + } } /*! @@ -255,7 +255,7 @@ void MEDFileMesh::setName(const std::string& name) */ void MEDFileMesh::clearNonDiscrAttributes() const { - + } bool MEDFileMesh::changeNames(const std::vector< std::pair >& modifTab) @@ -815,7 +815,7 @@ bool MEDFileMesh::areGrpsEqual(const MEDFileMesh *other, std::string& what) cons { oss << " Group \"" << (*it).first << "\" on following families :\n"; for(std::vector::const_iterator it2=(*it).second.begin();it2!=(*it).second.end();it2++) - oss << " \"" << *it2 << "\n"; + oss << " \"" << *it2 << "\n"; } oss << "Second group description :\n"; for(std::map >::const_iterator it=other->_groups.begin();it!=other->_groups.end();it++) @@ -902,14 +902,14 @@ void MEDFileMesh::addFamily(const std::string& familyName, int famId) std::map::const_iterator it=_families.find(fname); if(it==_families.end()) { - for(std::map::const_iterator it2=_families.begin();it2!=_families.end();it2++) - if((*it2).second==famId) - { - std::ostringstream oss; - oss << "MEDFileMesh::addFamily : Family \"" << (*it2).first << "\" already exists with specified id : " << famId << " !"; - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } - _families[fname]=famId; + for(std::map::const_iterator it2=_families.begin();it2!=_families.end();it2++) + if((*it2).second==famId) + { + std::ostringstream oss; + oss << "MEDFileMesh::addFamily : Family \"" << (*it2).first << "\" already exists with specified id : " << famId << " !"; + throw INTERP_KERNEL::Exception(oss.str().c_str()); + } + _families[fname]=famId; } else { @@ -2190,13 +2190,13 @@ MEDFileUMesh::MEDFileUMesh() MEDFileUMesh::MEDFileUMesh(med_idt fid, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs) try - { +{ loadUMeshFromFile(fid,mName,dt,it,mrs); - } +} catch(INTERP_KERNEL::Exception& e) - { +{ throw e; - } +} void MEDFileUMesh::loadUMeshFromFile(med_idt fid, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs) { @@ -3119,7 +3119,7 @@ const MEDFileUMeshSplitL1 *MEDFileUMesh::getMeshAtLevSafe(int meshDimRelToMaxExt MEDFileUMeshSplitL1 *MEDFileUMesh::getMeshAtLevSafe(int meshDimRelToMaxExt) { - if(meshDimRelToMaxExt==1) + if(meshDimRelToMaxExt==1) throw INTERP_KERNEL::Exception("Dimension request is invalid : asking for node level (1) !"); if(meshDimRelToMaxExt>1) throw INTERP_KERNEL::Exception("Dimension request is invalid (>1) !"); @@ -3343,7 +3343,7 @@ bool MEDFileUMesh::unPolyze(std::vector& oldCode, std::vector& newCode bool hasChanged=m->unPolyze(); DataArrayInt *fake=0; MEDCouplingAutoRefCountObjectPtr o2nCellsPart=m->getLevArrPerCellTypes(MEDCouplingUMesh::MEDMEM_ORDER, - MEDCouplingUMesh::MEDMEM_ORDER+MEDCouplingUMesh::N_MEDMEM_ORDER,fake); + MEDCouplingUMesh::MEDMEM_ORDER+MEDCouplingUMesh::N_MEDMEM_ORDER,fake); fake->decrRef(); renumCellsSplited.push_back(o2nCellsPart); memorySaverIfThrow.push_back(o2nCellsPart); if(hasChanged) @@ -3996,9 +3996,9 @@ std::vector MEDFileStructuredMesh::getDirectChildren() if((const DataArrayInt *)_num_faces) ret.push_back((const DataArrayInt *)_num_faces); if((const DataArrayInt *)_rev_num_nodes) - if((const DataArrayAsciiChar *)_names_faces) - ret.push_back((const DataArrayAsciiChar *)_names_faces); ret.push_back((const DataArrayInt *)_rev_num_nodes); + if((const DataArrayAsciiChar *)_names_faces) + ret.push_back((const DataArrayAsciiChar *)_names_faces); if((const DataArrayInt *)_rev_num_cells) ret.push_back((const DataArrayInt *)_rev_num_cells); return ret; @@ -4263,7 +4263,7 @@ DataArrayInt *MEDFileStructuredMesh::getFamiliesArr(int meshDimRelToMaxExt, cons { std::vector famIds(getFamiliesIds(fams)); switch(meshDimRelToMaxExt) - { + { case 1: { if((const DataArrayInt *)_fam_nodes) @@ -4320,7 +4320,8 @@ DataArrayInt *MEDFileStructuredMesh::getFamiliesArr(int meshDimRelToMaxExt, cons } default: throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getFamiliesArr : input meshDimRelative must be in [0,1,-1] !"); - } + } + throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getFamiliesArr : unmanaged case !"); } /*! @@ -4338,7 +4339,7 @@ void MEDFileStructuredMesh::setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayI if(!mesh) throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::setFamilyFieldArr : no structured mesh specified ! Impossible to set family array !"); switch(meshDimRelToMaxExt) - { + { case 0: { int nbCells=mesh->getNumberOfCells(); @@ -4362,7 +4363,7 @@ void MEDFileStructuredMesh::setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayI } default: throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::setFamilyFieldArr : Only available for levels 0 or 1 or -1 !"); - } + } if(famArr) famArr->incrRef(); } @@ -4381,7 +4382,7 @@ void MEDFileStructuredMesh::setRenumFieldArr(int meshDimRelToMaxExt, DataArrayIn if(!mesh) throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::setRenumFieldArr : no structured mesh specified ! Impossible to set number array !"); switch(meshDimRelToMaxExt) - { + { case 0: { int nbCells=mesh->getNumberOfCells(); @@ -4405,7 +4406,7 @@ void MEDFileStructuredMesh::setRenumFieldArr(int meshDimRelToMaxExt, DataArrayIn } default: throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::setRenumFieldArr : Only available for levels 0 or 1 or -1 !"); - } + } if(renumArr) renumArr->incrRef(); } @@ -4423,7 +4424,7 @@ void MEDFileStructuredMesh::setNameFieldAtLevel(int meshDimRelToMaxExt, DataArra if(!mesh) throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::setNameFieldAtLevel : no structured mesh specified ! Impossible to set names array !"); switch(meshDimRelToMaxExt) - { + { case 0: { int nbCells=mesh->getNumberOfCells(); @@ -4446,7 +4447,7 @@ void MEDFileStructuredMesh::setNameFieldAtLevel(int meshDimRelToMaxExt, DataArra } default: throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::setNameFieldAtLevel : Only available for levels 0 or 1 or -1 !"); - } + } if(nameArr) nameArr->incrRef(); } @@ -4461,7 +4462,7 @@ void MEDFileStructuredMesh::setNameFieldAtLevel(int meshDimRelToMaxExt, DataArra const DataArrayInt *MEDFileStructuredMesh::getFamilyFieldAtLevel(int meshDimRelToMaxExt) const { switch(meshDimRelToMaxExt) - { + { case 0: return _fam_cells; case 1: @@ -4470,7 +4471,7 @@ const DataArrayInt *MEDFileStructuredMesh::getFamilyFieldAtLevel(int meshDimRelT return _fam_faces; default: throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getFamilyFieldAtLevel : Only available for levels 0 or 1 or -1 !"); - } + } } /*! @@ -4483,7 +4484,7 @@ const DataArrayInt *MEDFileStructuredMesh::getFamilyFieldAtLevel(int meshDimRelT const DataArrayInt *MEDFileStructuredMesh::getNumberFieldAtLevel(int meshDimRelToMaxExt) const { switch(meshDimRelToMaxExt) - { + { case 0: return _num_cells; case 1: @@ -4492,7 +4493,7 @@ const DataArrayInt *MEDFileStructuredMesh::getNumberFieldAtLevel(int meshDimRelT return _num_faces; default: throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getNumberFieldAtLevel : Only available for levels 0 or 1 or -1 !"); - } + } } /*! @@ -4537,7 +4538,7 @@ const DataArrayInt *MEDFileStructuredMesh::getRevNumberFieldAtLevel(int meshDimR const DataArrayAsciiChar *MEDFileStructuredMesh::getNameFieldAtLevel(int meshDimRelToMaxExt) const { switch(meshDimRelToMaxExt) - { + { case 0: return _names_cells; case 1: @@ -4546,7 +4547,7 @@ const DataArrayAsciiChar *MEDFileStructuredMesh::getNameFieldAtLevel(int meshDim return _names_faces; default: throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getNameFieldAtLevel : Only available for levels 0 or 1 or -1 !"); - } + } } /*! @@ -4686,7 +4687,7 @@ MEDCouplingMesh *MEDFileStructuredMesh::getGenMeshAtLevel(int meshDimRelToMax, b throw INTERP_KERNEL::Exception("MEDFileCurveLinearMesh does not support renumbering ! To do it perform request of renum array directly !"); const MEDCouplingStructuredMesh *m(getStructuredMesh()); switch(meshDimRelToMax) - { + { case 0: { if(m) @@ -4701,7 +4702,7 @@ MEDCouplingMesh *MEDFileStructuredMesh::getGenMeshAtLevel(int meshDimRelToMax, b } default: throw INTERP_KERNEL::Exception("MEDFileCurveLinearMesh does not support multi level for mesh 0 expected as input !"); - } + } } /*! @@ -4716,7 +4717,7 @@ int MEDFileStructuredMesh::getSizeAtLevel(int meshDimRelToMaxExt) const if(!cmesh) throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getSizeAtLevel : No structured mesh set !"); switch(meshDimRelToMaxExt) - { + { case 0: return cmesh->getNumberOfCells(); case 1: @@ -4725,7 +4726,7 @@ int MEDFileStructuredMesh::getSizeAtLevel(int meshDimRelToMaxExt) const return cmesh->getNumberOfCellsOfSubLevelMesh(); default: throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getSizeAtLevel : Only available for levels 0 or 1 or -1 !"); - } + } } int MEDFileStructuredMesh::getNumberOfNodes() const @@ -4787,7 +4788,7 @@ std::vector MEDFileStructuredMesh::getGeoType if(!cmesh) throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getGeoTypesAtLevel : No structured mesh set !"); switch(meshDimRelToMax) - { + { case 0: { std::vector ret(1,cmesh->getTypeOfCell(0)); @@ -4803,7 +4804,7 @@ std::vector MEDFileStructuredMesh::getGeoType } default: throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getGeoTypesAtLevel : only 2 levels available at most : 0 and -1 !"); - } + } } void MEDFileStructuredMesh::whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector& nodesFetched) const @@ -5169,13 +5170,13 @@ MEDFileCMesh::MEDFileCMesh() MEDFileCMesh::MEDFileCMesh(med_idt fid, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs) try - { +{ loadCMeshFromFile(fid,mName,dt,it,mrs); - } +} catch(INTERP_KERNEL::Exception& e) - { +{ throw e; - } +} void MEDFileCMesh::loadCMeshFromFile(med_idt fid, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs) { @@ -5422,13 +5423,13 @@ MEDFileCurveLinearMesh::MEDFileCurveLinearMesh() MEDFileCurveLinearMesh::MEDFileCurveLinearMesh(med_idt fid, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs) try - { +{ loadCLMeshFromFile(fid,mName,dt,it,mrs); - } +} catch(INTERP_KERNEL::Exception& e) - { +{ throw e; - } +} void MEDFileCurveLinearMesh::writeLL(med_idt fid) const { @@ -5458,7 +5459,7 @@ void MEDFileCurveLinearMesh::writeLL(med_idt fid) const MEDmeshGridTypeWr(fid,maa,MED_CURVILINEAR_GRID); std::vector nodeGridSt=_clmesh->getNodeGridStructure(); MEDmeshGridStructWr(fid,maa,_iteration,_order,_time,&nodeGridSt[0]); - + MEDmeshNodeCoordinateWr(fid,maa,_iteration,_order,_time,MED_FULL_INTERLACE,coords->getNumberOfTuples(),coords->begin()); // std::string meshName(MEDLoaderBase::buildStringFromFortran(maa,MED_NAME_SIZE)); @@ -5602,13 +5603,13 @@ MEDFileMeshMultiTS::MEDFileMeshMultiTS() MEDFileMeshMultiTS::MEDFileMeshMultiTS(const std::string& fileName) try - { +{ std::vector ms=MEDLoader::GetMeshNames(fileName); if(ms.empty()) - { - std::ostringstream oss; oss << "MEDFileUMesh::New : no meshes in file \"" << fileName << "\" !"; - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } + { + std::ostringstream oss; oss << "MEDFileUMesh::New : no meshes in file \"" << fileName << "\" !"; + throw INTERP_KERNEL::Exception(oss.str().c_str()); + } MEDFileUtilities::CheckFileForRead(fileName); MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY); int dt,it; @@ -5616,21 +5617,21 @@ try std::string dummy2; MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dt,it,dummy2); loadFromFile(fileName,ms.front()); - } +} catch(INTERP_KERNEL::Exception& e) - { +{ throw e; - } +} MEDFileMeshMultiTS::MEDFileMeshMultiTS(const std::string& fileName, const std::string& mName) try - { +{ loadFromFile(fileName,mName); - } +} catch(INTERP_KERNEL::Exception& e) - { +{ throw e; - } +} MEDFileMeshes *MEDFileMeshes::New() { @@ -5777,12 +5778,12 @@ MEDFileMeshes::MEDFileMeshes() MEDFileMeshes::MEDFileMeshes(const std::string& fileName) try - { +{ loadFromFile(fileName); - } +} catch(INTERP_KERNEL::Exception& /*e*/) - { - } +{ +} MEDFileMeshes *MEDFileMeshes::deepCpy() const { diff --git a/src/MEDLoader/MEDFileMesh.hxx b/src/MEDLoader/MEDFileMesh.hxx index d62d585a3..227f2beab 100644 --- a/src/MEDLoader/MEDFileMesh.hxx +++ b/src/MEDLoader/MEDFileMesh.hxx @@ -33,7 +33,7 @@ namespace ParaMEDMEM { class MEDFileFieldGlobsReal; class MEDFileField1TSStructItem; - + class MEDFileMesh : public RefCountObject, public MEDFileWritable { public: @@ -492,8 +492,8 @@ namespace ParaMEDMEM MEDLOADER_EXPORT MEDFileMesh *nextt(); private: MEDCouplingAutoRefCountObjectPtr _ms; - int _iter_id; - int _nb_iter; + int _iter_id; + int _nb_iter; }; } diff --git a/src/MEDLoader/MEDFileMeshElt.cxx b/src/MEDLoader/MEDFileMeshElt.cxx index e29aa0bf5..cdc710e03 100644 --- a/src/MEDLoader/MEDFileMeshElt.cxx +++ b/src/MEDLoader/MEDFileMeshElt.cxx @@ -67,7 +67,7 @@ bool MEDFileUMeshPerType::isExisting(med_idt fid, const char *mName, int dt, int { med_bool changement,transformation; int tmp=MEDmeshnEntity(fid,mName,dt,it,entities[i],geoElt,MED_CONNECTIVITY,MED_NODAL, - &changement,&transformation); + &changement,&transformation); if(tmp>nbOfElt) { nbOfElt=tmp; @@ -89,7 +89,7 @@ MEDFileUMeshPerType::MEDFileUMeshPerType(med_idt fid, const char *mName, int dt, { med_bool changement,transformation; int curNbOfElem=MEDmeshnEntity(fid,mName,dt,it,entity,geoElt,MED_CONNECTIVITY,MED_NODAL, - &changement,&transformation); + &changement,&transformation); const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type); if(!cm.isDynamic()) { diff --git a/src/MEDLoader/MEDFileMeshLL.cxx b/src/MEDLoader/MEDFileMeshLL.cxx index 4d32f5c12..f78b400c3 100644 --- a/src/MEDLoader/MEDFileMeshLL.cxx +++ b/src/MEDLoader/MEDFileMeshLL.cxx @@ -87,7 +87,7 @@ int MEDFileMeshL2::GetMeshIdFromName(med_idt fid, const std::string& mname, Para throw INTERP_KERNEL::Exception(oss.str().c_str()); } switch(type_maillage) - { + { case MED_UNSTRUCTURED_MESH: meshType=UNSTRUCTURED; break; @@ -96,7 +96,7 @@ int MEDFileMeshL2::GetMeshIdFromName(med_idt fid, const std::string& mname, Para med_grid_type gt; MEDmeshGridTypeRd(fid,mname.c_str(),>); switch(gt) - { + { case MED_CARTESIAN_GRID: meshType=CARTESIAN; break; @@ -105,12 +105,12 @@ int MEDFileMeshL2::GetMeshIdFromName(med_idt fid, const std::string& mname, Para break; default: throw INTERP_KERNEL::Exception("MEDFileUMeshL2::getMeshIdFromName : unrecognized structured mesh type ! Supported are :\n - cartesian\n - curve linear\n"); - } + } break; } default: throw INTERP_KERNEL::Exception("MEDFileUMeshL2::getMeshIdFromName : unrecognized mesh type !"); - } + } med_int numdt,numit; med_float dtt; MEDmeshComputationStepInfo(fid,mname.c_str(),1,&numdt,&numit,&dtt); @@ -153,11 +153,11 @@ std::vector MEDFileMeshL2::getAxisInfoOnMesh(med_idt fid, int mId, INTERP_KERNEL::AutoPtr axisunit=MEDLoaderBase::buildEmptyString(naxis*MED_SNAME_SIZE); INTERP_KERNEL::AutoPtr univTmp=MEDLoaderBase::buildEmptyString(MED_LNAME_SIZE); if(MEDmeshInfo(fid,mId,nameTmp,&spaceDim,&Mdim,&type_maillage,_description.getPointer(),_dt_unit.getPointer(), - &stype,&nstep,&axistype,axisname,axisunit)!=0) + &stype,&nstep,&axistype,axisname,axisunit)!=0) throw INTERP_KERNEL::Exception("A problem has been detected when trying to get info on mesh !"); MEDmeshUniversalNameRd(fid,nameTmp,_univ_name.getPointer()); switch(type_maillage) - { + { case MED_UNSTRUCTURED_MESH: meshType=UNSTRUCTURED; break; @@ -166,7 +166,7 @@ std::vector MEDFileMeshL2::getAxisInfoOnMesh(med_idt fid, int mId, med_grid_type gt; MEDmeshGridTypeRd(fid,mName.c_str(),>); switch(gt) - { + { case MED_CARTESIAN_GRID: meshType=CARTESIAN; break; @@ -175,12 +175,12 @@ std::vector MEDFileMeshL2::getAxisInfoOnMesh(med_idt fid, int mId, break; default: throw INTERP_KERNEL::Exception("MEDFileUMeshL2::getAxisInfoOnMesh : unrecognized structured mesh type ! Supported are :\n - cartesian\n - curve linear\n"); - } + } break; } default: throw INTERP_KERNEL::Exception("MEDFileUMeshL2::getMeshIdFromName : unrecognized mesh type !"); - } + } // std::vector infosOnComp(naxis); for(int i=0;i& ms, std::map& familyIds, - std::map >& groups) throw(INTERP_KERNEL::Exception) + std::map >& groups) { std::vector< DataArrayInt * > corr; _m=MEDCouplingUMesh::FuseUMeshesOnSameCoords(ms,0,corr); @@ -1293,7 +1293,6 @@ bool MEDFileUMeshAggregateCompute::empty() const return ((const MEDCouplingUMesh *)_m)==0; //else _mp_time>=_m_time) return _m_parts.empty(); - } int MEDFileUMeshAggregateCompute::getMeshDimension() const diff --git a/src/MEDLoader/MEDFileMeshLL.hxx b/src/MEDLoader/MEDFileMeshLL.hxx index 829e603cd..08c65e077 100644 --- a/src/MEDLoader/MEDFileMeshLL.hxx +++ b/src/MEDLoader/MEDFileMeshLL.hxx @@ -37,7 +37,7 @@ namespace ParaMEDMEM { class MEDFileMeshReadSelector; - + class MEDFileMeshL2 : public RefCountObject { public: @@ -109,7 +109,7 @@ namespace ParaMEDMEM private: MEDCouplingAutoRefCountObjectPtr _cmesh; }; - + class MEDFileCLMeshL2 : public MEDFileStrMeshL2 { public: @@ -172,7 +172,7 @@ namespace ParaMEDMEM mutable std::size_t _m_time; mutable MEDCouplingAutoRefCountObjectPtr _m; }; - + class MEDFileUMeshSplitL1 : public RefCountObject { friend class MEDFileUMeshPermCompute; @@ -214,7 +214,7 @@ namespace ParaMEDMEM const DataArrayInt *getRevNumberField() const; void eraseFamilyField(); void setGroupsFromScratch(const std::vector& ms, std::map& familyIds, - std::map >& groups) throw(INTERP_KERNEL::Exception); + std::map >& groups); void write(med_idt fid, const std::string& mName, int mdim) const; // void setFamilyArr(DataArrayInt *famArr); diff --git a/src/MEDLoader/MEDFileParameter.cxx b/src/MEDLoader/MEDFileParameter.cxx index f2f6a3920..3f1bc8a77 100644 --- a/src/MEDLoader/MEDFileParameter.cxx +++ b/src/MEDLoader/MEDFileParameter.cxx @@ -465,7 +465,7 @@ void MEDFileParameterMultiTS::finishLoading(med_idt fid, med_parameter_type typ, double tim; MEDparameterComputationStepInfo(fid,_name.c_str(),i+1,&dt,&it,&tim); switch(typ) - { + { case MED_FLOAT64: _param_per_ts[i]=MEDFileParameterDouble1TSWTI::New(dt,it,tim); _param_per_ts[i]->readValue(fid,_name.c_str()); @@ -475,7 +475,7 @@ void MEDFileParameterMultiTS::finishLoading(med_idt fid, med_parameter_type typ, break;*/ default: throw INTERP_KERNEL::Exception("MEDFileParameterMultiTS::finishLoading : supporting only FLOAT64 !"); - } + } } } diff --git a/src/MEDLoader/MEDFileParameter.hxx b/src/MEDLoader/MEDFileParameter.hxx index fe3814000..c95432dea 100644 --- a/src/MEDLoader/MEDFileParameter.hxx +++ b/src/MEDLoader/MEDFileParameter.hxx @@ -53,7 +53,7 @@ namespace ParaMEDMEM int _order; double _time; }; - + class MEDFileParameterDouble1TSWTI : public MEDFileParameter1TS { public: diff --git a/src/MEDLoader/MEDFileUtilities.cxx b/src/MEDLoader/MEDFileUtilities.cxx index c14f2c504..a402c36cd 100644 --- a/src/MEDLoader/MEDFileUtilities.cxx +++ b/src/MEDLoader/MEDFileUtilities.cxx @@ -26,7 +26,7 @@ med_access_mode MEDFileUtilities::TraduceWriteMode(int medloaderwritemode) { switch(medloaderwritemode) - { + { case 2: return MED_ACC_CREAT; case 1: @@ -35,7 +35,7 @@ med_access_mode MEDFileUtilities::TraduceWriteMode(int medloaderwritemode) return MED_ACC_RDWR; default: throw INTERP_KERNEL::Exception("Invalid write mode specified ! must be 0(write with no question), 1(append) or 2(creation)"); - } + } } const char *MEDFileUtilities::GetReadableMEDFieldType(med_field_type ft) @@ -44,7 +44,7 @@ const char *MEDFileUtilities::GetReadableMEDFieldType(med_field_type ft) static const char medInt32[]="MED_INT32"; static const char medInt64[]="MED_INT64"; switch(ft) - { + { case MED_FLOAT64: return medFloat64; case MED_INT32: @@ -53,7 +53,7 @@ const char *MEDFileUtilities::GetReadableMEDFieldType(med_field_type ft) return medInt64; default: throw INTERP_KERNEL::Exception("Non supported field type ! Should be FLOAT64, INT32 or INT64 !"); - } + } } void MEDFileUtilities::CheckMEDCode(int code, med_idt fid, const std::string& msg) @@ -72,7 +72,7 @@ void MEDFileUtilities::CheckFileForRead(const std::string& fileName) std::ostringstream oss; oss << " File : \"" << fileName << "\""; switch(status) - { + { case MEDLoaderBase::DIR_LOCKED: { oss << " has been detected as unreadable : impossible to read anything !"; @@ -88,7 +88,7 @@ void MEDFileUtilities::CheckFileForRead(const std::string& fileName) oss << " has been detected as WRITE ONLY : impossible to read anything !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); } - } + } AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY); if(fid<0) { @@ -109,11 +109,6 @@ MEDFileUtilities::AutoFid::AutoFid(med_idt fid):_fid(fid) { } -MEDFileUtilities::AutoFid::operator med_idt() const -{ - return _fid; -} - MEDFileUtilities::AutoFid::~AutoFid() { MEDfileClose(_fid); diff --git a/src/MEDLoader/MEDFileUtilities.hxx b/src/MEDLoader/MEDFileUtilities.hxx index c8842db0c..fad58c76b 100644 --- a/src/MEDLoader/MEDFileUtilities.hxx +++ b/src/MEDLoader/MEDFileUtilities.hxx @@ -37,13 +37,13 @@ namespace MEDFileUtilities { public: AutoFid(med_idt fid); - operator med_idt() const; + operator med_idt() const { return _fid; } ~AutoFid(); private: med_idt _fid; }; } - + namespace ParaMEDMEM { class MEDLOADER_EXPORT MEDFileWritable diff --git a/src/MEDLoader/MEDLoader.cxx b/src/MEDLoader/MEDLoader.cxx index 227396cfe..be6ff6382 100644 --- a/src/MEDLoader/MEDLoader.cxx +++ b/src/MEDLoader/MEDLoader.cxx @@ -44,89 +44,89 @@ #include med_geometry_type typmai[MED_N_CELL_FIXED_GEO] = { MED_POINT1, - MED_SEG2, - MED_SEG3, - MED_SEG4, - MED_TRIA3, - MED_QUAD4, - MED_TRIA6, - MED_TRIA7, - MED_QUAD8, - MED_QUAD9, - MED_TETRA4, - MED_PYRA5, - MED_PENTA6, - MED_HEXA8, - MED_OCTA12, - MED_TETRA10, - MED_PYRA13, - MED_PENTA15, - MED_HEXA20, - MED_HEXA27, - MED_POLYGON, - MED_POLYGON2, - MED_POLYHEDRON }; + MED_SEG2, + MED_SEG3, + MED_SEG4, + MED_TRIA3, + MED_QUAD4, + MED_TRIA6, + MED_TRIA7, + MED_QUAD8, + MED_QUAD9, + MED_TETRA4, + MED_PYRA5, + MED_PENTA6, + MED_HEXA8, + MED_OCTA12, + MED_TETRA10, + MED_PYRA13, + MED_PENTA15, + MED_HEXA20, + MED_HEXA27, + MED_POLYGON, + MED_POLYGON2, + MED_POLYHEDRON }; med_geometry_type typmainoeud[1] = { MED_NONE }; INTERP_KERNEL::NormalizedCellType typmai2[MED_N_CELL_FIXED_GEO] = { INTERP_KERNEL::NORM_POINT1, - INTERP_KERNEL::NORM_SEG2, - INTERP_KERNEL::NORM_SEG3, - INTERP_KERNEL::NORM_SEG4, - INTERP_KERNEL::NORM_TRI3, - INTERP_KERNEL::NORM_QUAD4, - INTERP_KERNEL::NORM_TRI6, - INTERP_KERNEL::NORM_TRI7, - INTERP_KERNEL::NORM_QUAD8, - INTERP_KERNEL::NORM_QUAD9, - INTERP_KERNEL::NORM_TETRA4, - INTERP_KERNEL::NORM_PYRA5, - INTERP_KERNEL::NORM_PENTA6, - INTERP_KERNEL::NORM_HEXA8, - INTERP_KERNEL::NORM_HEXGP12, - INTERP_KERNEL::NORM_TETRA10, - INTERP_KERNEL::NORM_PYRA13, - INTERP_KERNEL::NORM_PENTA15, - INTERP_KERNEL::NORM_HEXA20, - INTERP_KERNEL::NORM_HEXA27, - INTERP_KERNEL::NORM_POLYGON, - INTERP_KERNEL::NORM_QPOLYG, - INTERP_KERNEL::NORM_POLYHED }; + INTERP_KERNEL::NORM_SEG2, + INTERP_KERNEL::NORM_SEG3, + INTERP_KERNEL::NORM_SEG4, + INTERP_KERNEL::NORM_TRI3, + INTERP_KERNEL::NORM_QUAD4, + INTERP_KERNEL::NORM_TRI6, + INTERP_KERNEL::NORM_TRI7, + INTERP_KERNEL::NORM_QUAD8, + INTERP_KERNEL::NORM_QUAD9, + INTERP_KERNEL::NORM_TETRA4, + INTERP_KERNEL::NORM_PYRA5, + INTERP_KERNEL::NORM_PENTA6, + INTERP_KERNEL::NORM_HEXA8, + INTERP_KERNEL::NORM_HEXGP12, + INTERP_KERNEL::NORM_TETRA10, + INTERP_KERNEL::NORM_PYRA13, + INTERP_KERNEL::NORM_PENTA15, + INTERP_KERNEL::NORM_HEXA20, + INTERP_KERNEL::NORM_HEXA27, + INTERP_KERNEL::NORM_POLYGON, + INTERP_KERNEL::NORM_QPOLYG, + INTERP_KERNEL::NORM_POLYHED }; med_geometry_type typmai3[34] = { MED_POINT1,//0 - MED_SEG2,//1 - MED_SEG3,//2 - MED_TRIA3,//3 - MED_QUAD4,//4 - MED_POLYGON,//5 - MED_TRIA6,//6 - MED_TRIA7,//7 - MED_QUAD8,//8 - MED_QUAD9,//9 - MED_SEG4,//10 - MED_NONE,//11 - MED_NONE,//12 - MED_NONE,//13 - MED_TETRA4,//14 - MED_PYRA5,//15 - MED_PENTA6,//16 - MED_NONE,//17 - MED_HEXA8,//18 - MED_NONE,//19 - MED_TETRA10,//20 - MED_NONE,//21 - MED_OCTA12,//22 - MED_PYRA13,//23 - MED_NONE,//24 - MED_PENTA15,//25 - MED_NONE,//26 - MED_HEXA27,//27 - MED_NONE,//28 - MED_NONE,//29 - MED_HEXA20,//30 - MED_POLYHEDRON,//31 - MED_POLYGON2,//32 - MED_NONE//33 + MED_SEG2,//1 + MED_SEG3,//2 + MED_TRIA3,//3 + MED_QUAD4,//4 + MED_POLYGON,//5 + MED_TRIA6,//6 + MED_TRIA7,//7 + MED_QUAD8,//8 + MED_QUAD9,//9 + MED_SEG4,//10 + MED_NONE,//11 + MED_NONE,//12 + MED_NONE,//13 + MED_TETRA4,//14 + MED_PYRA5,//15 + MED_PENTA6,//16 + MED_NONE,//17 + MED_HEXA8,//18 + MED_NONE,//19 + MED_TETRA10,//20 + MED_NONE,//21 + MED_OCTA12,//22 + MED_PYRA13,//23 + MED_NONE,//24 + MED_PENTA15,//25 + MED_NONE,//26 + MED_HEXA27,//27 + MED_NONE,//28 + MED_NONE,//29 + MED_HEXA20,//30 + MED_POLYHEDRON,//31 + MED_POLYGON2,//32 + MED_NONE//33 }; double MEDLoader::_EPS_FOR_NODE_COMP=1.e-12; @@ -144,7 +144,7 @@ namespace MEDLoaderNS int readUMeshDimFromFile(const std::string& fileName, const std::string& meshName, std::vector& possibilities); void dispatchElems(int nbOfElemCell, int nbOfElemFace, int& nbOfElem, med_entity_type& whichEntity); void writeFieldWithoutReadingAndMappingOfMeshInFile(const std::string& fileName, const ParaMEDMEM::MEDCouplingFieldDouble *f, bool writeFromScratch); - med_int getIdFromMeshName(med_idt fid, const std::string& meshName, std::string& trueMeshName) throw(INTERP_KERNEL::Exception); + med_int getIdFromMeshName(med_idt fid, const std::string& meshName, std::string& trueMeshName); std::vector getMeshNamesFid(med_idt fid); } @@ -214,8 +214,8 @@ int MEDLoaderNS::readUMeshDimFromFile(const std::string& fileName, const std::st return ret; } -med_int MEDLoaderNS::getIdFromMeshName(med_idt fid, const std::string& meshName, std::string& trueMeshName) throw(INTERP_KERNEL::Exception) -{ +med_int MEDLoaderNS::getIdFromMeshName(med_idt fid, const std::string& meshName, std::string& trueMeshName) + { if(meshName.empty()) { std::vector meshes=getMeshNamesFid(fid); @@ -238,7 +238,7 @@ med_int MEDLoaderNS::getIdFromMeshName(med_idt fid, const std::string& meshName, } trueMeshName=meshName; return iter-meshes.begin()+1; -} + } std::vector MEDLoaderNS::getMeshNamesFid(med_idt fid) { @@ -439,7 +439,7 @@ std::vector< std::pair > MEDLoader::GetComponentsNamesO std::vector< std::pair > ret(ncomp); for(int j=0;j(MEDLoaderBase::buildStringFromFortran(((char *)comp)+j*MED_SNAME_SIZE,MED_SNAME_SIZE), - MEDLoaderBase::buildStringFromFortran(((char *)unit)+j*MED_SNAME_SIZE,MED_SNAME_SIZE)); + MEDLoaderBase::buildStringFromFortran(((char *)unit)+j*MED_SNAME_SIZE,MED_SNAME_SIZE)); return ret; } fields[i]=curFieldName; @@ -567,7 +567,7 @@ std::vector MEDLoader::GetMeshGroupsNamesOnFamily(const std::string return ret; } - + std::vector MEDLoader::GetMeshGroupsNames(const std::string& fileName, const std::string& meshName) { CheckFileForRead(fileName); @@ -633,7 +633,7 @@ std::vector MEDLoader::GetTypesOfField(const std::strin { MEDfieldComputingStepInfo(fid,nomcha,1,&numdt,&numo,&dt); med_int nbOfVal=MEDfieldnValueWithProfile(fid,nomcha,numdt,numo,MED_NODE,MED_NONE,1,MED_COMPACT_PFLMODE, - pflname,&profilesize,locname,&nbi); + pflname,&profilesize,locname,&nbi); if(nbOfVal>0) { ret.push_back(ON_NODES); @@ -648,7 +648,7 @@ std::vector MEDLoader::GetTypesOfField(const std::strin { MEDfieldComputingStepInfo(fid,nomcha,1,&numdt,&numo,&dt); med_int nbOfVal=MEDfieldnValueWithProfile(fid,nomcha,numdt,numo,MED_CELL,typmai[j],1,MED_COMPACT_PFLMODE, - pflname,&profilesize,locname,&nbi); + pflname,&profilesize,locname,&nbi); if(nbOfVal>0) { found=true; @@ -722,14 +722,14 @@ std::vector MEDLoader::GetFieldNamesOnMesh(ParaMEDMEM::TypeOfField { CheckFileForRead(fileName); switch(type) - { + { case ON_CELLS: return GetCellFieldNamesOnMesh(fileName,meshName); case ON_NODES: return GetNodeFieldNamesOnMesh(fileName,meshName); default: throw INTERP_KERNEL::Exception("Type of field specified not managed ! manages are ON_NODES or ON_CELLS !"); - } + } } std::vector MEDLoader::GetCellFieldNamesOnMesh(const std::string& fileName, const std::string& meshName) @@ -769,7 +769,7 @@ std::vector MEDLoader::GetCellFieldNamesOnMesh(const std::string& f { MEDfieldComputingStepInfo(fid,nomcha,1,&numdt,&numo,&dt); med_int nbOfVal=MEDfieldnValueWithProfile(fid,nomcha,numdt,numo,MED_CELL,typmai[j],1,MED_COMPACT_PFLMODE, - pflname,&profilesize,locname,&nbi); + pflname,&profilesize,locname,&nbi); if(nbOfVal>0) { found=true; @@ -813,7 +813,7 @@ std::vector MEDLoader::GetNodeFieldNamesOnMesh(const std::string& f int profilesize,nbi; MEDfieldComputingStepInfo(fid,nomcha,1,&numdt,&numo,&dt); med_int nbOfVal=MEDfieldnValueWithProfile(fid,nomcha,numdt,numo,MED_NODE,MED_NONE,1,MED_COMPACT_PFLMODE, - pflname,&profilesize,locname,&nbi); + pflname,&profilesize,locname,&nbi); if(curMeshName==meshName && nbOfVal>0) { ret.push_back(curFieldName); @@ -918,14 +918,14 @@ std::vector< std::pair > MEDLoader::GetFieldIterations(ParaMEDMEM::Type { CheckFileForRead(fileName); switch(type) - { + { case ON_CELLS: return GetCellFieldIterations(fileName,meshName,fieldName); case ON_NODES: return GetNodeFieldIterations(fileName,meshName,fieldName); default: throw INTERP_KERNEL::Exception("Type of field specified not managed ! manages are ON_NODES or ON_CELLS !"); - } + } } std::vector< std::pair > MEDLoader::GetCellFieldIterations(const std::string& fileName, const std::string& meshName, const std::string& fieldName) @@ -966,7 +966,7 @@ std::vector< std::pair > MEDLoader::GetCellFieldIterations(const std::s int profilesize,nbi; MEDfieldComputingStepInfo(fid,nomcha,k+1,&numdt,&numo,&dt); med_int nbOfVal=MEDfieldnValueWithProfile(fid,nomcha,numdt,numo,MED_CELL,typmai[j],1,MED_COMPACT_PFLMODE, - pflname,&profilesize,locname,&nbi); + pflname,&profilesize,locname,&nbi); std::string maa_ass_cpp(maa_ass); if(nbOfVal>0) { @@ -1035,15 +1035,15 @@ std::vector< std::pair > MEDLoader::GetNodeFieldIterations(const std::s int profilesize,nbi; MEDfieldComputingStepInfo(fid,nomcha,k+1,&numdt,&numo,&dt); med_int nbOfVal=MEDfieldnValueWithProfile(fid,nomcha,numdt,numo,MED_NODE,MED_NONE,1,MED_COMPACT_PFLMODE, - pflname,&profilesize,locname,&nbi); - std::string maa_ass_cpp(maa_ass); - if(nbOfVal>0) - { - if(meshNameCpp==maa_ass_cpp) - { ret.push_back(std::make_pair(numdt,numo)); } - else - s2.insert(maa_ass_cpp); - } + pflname,&profilesize,locname,&nbi); + std::string maa_ass_cpp(maa_ass); + if(nbOfVal>0) + { + if(meshNameCpp==maa_ass_cpp) + { ret.push_back(std::make_pair(numdt,numo)); } + else + s2.insert(maa_ass_cpp); + } } } else @@ -1124,7 +1124,7 @@ ParaMEDMEM::MEDCouplingUMesh *MEDLoader::ReadUMeshFromFile(const std::string& fi std::ostringstream oss; oss << "MEDLoader::ReadUMeshFromFile : With fileName=\""<< fileName << "\", meshName=\""<< meshName << "\" exists but it is not an unstructured mesh !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); } - return mmuPtr->getMeshAtLevel(meshDimRelToMax,true); + return mmuPtr->getMeshAtLevel(meshDimRelToMax,true); } ParaMEDMEM::MEDCouplingUMesh *MEDLoader::ReadUMeshFromFile(const std::string& fileName, int meshDimRelToMax) @@ -1138,7 +1138,7 @@ ParaMEDMEM::MEDCouplingUMesh *MEDLoader::ReadUMeshFromFile(const std::string& fi std::ostringstream oss; oss << "MEDLoader::ReadUMeshFromFile : With fileName=\""<< fileName << "\", meshName (the first) =\""<< mm->getName() << "\" exists but it is not an unstructured mesh !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); } - return mmuPtr->getMeshAtLevel(meshDimRelToMax,true); + return mmuPtr->getMeshAtLevel(meshDimRelToMax,true); } int MEDLoader::ReadUMeshDimFromFile(const std::string& fileName, const std::string& meshName) @@ -1159,7 +1159,7 @@ ParaMEDMEM::MEDCouplingUMesh *MEDLoader::ReadUMeshFromFamilies(const std::string std::ostringstream oss; oss << "MEDLoader::ReadUMeshFromFamilies : With fileName=\""<< fileName << "\", meshName (the first) =\""<< mm->getName() << "\" exists but it is not an unstructured mesh !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); } - return mmuPtr->getFamilies(meshDimRelToMax,fams,true); + return mmuPtr->getFamilies(meshDimRelToMax,fams,true); } ParaMEDMEM::MEDCouplingUMesh *MEDLoader::ReadUMeshFromGroups(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::vector& grps) @@ -1173,14 +1173,14 @@ ParaMEDMEM::MEDCouplingUMesh *MEDLoader::ReadUMeshFromGroups(const std::string& std::ostringstream oss; oss << "MEDLoader::ReadUMeshFromGroups : With fileName=\""<< fileName << "\", meshName (the first) =\""<< mm->getName() << "\" exists but it is not an unstructured mesh !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); } - return mmuPtr->getGroups(meshDimRelToMax,grps,true); + return mmuPtr->getGroups(meshDimRelToMax,grps,true); } ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadField(ParaMEDMEM::TypeOfField type, const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, int iteration, int order) { CheckFileForRead(fileName); switch(type) - { + { case ON_CELLS: return ReadFieldCell(fileName,meshName,meshDimRelToMax,fieldName,iteration,order); case ON_NODES: @@ -1191,11 +1191,11 @@ ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadField(ParaMEDMEM::TypeOfField return ReadFieldGaussNE(fileName,meshName,meshDimRelToMax,fieldName,iteration,order); default: throw INTERP_KERNEL::Exception("Type of field specified not managed ! manages are ON_NODES, ON_CELLS, ON_GAUSS_PT or ON_GAUSS_NE !"); - } + } } std::vector MEDLoader::ReadFieldsOnSameMesh(ParaMEDMEM::TypeOfField type, const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, - const std::vector >& its) throw(INTERP_KERNEL::Exception) + const std::vector >& its) { if(its.empty()) return std::vector(); @@ -1232,25 +1232,25 @@ std::vector MEDLoader::ReadFieldsOnSameMes } std::vector MEDLoader::ReadFieldsCellOnSameMesh(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, - const std::vector >& its) throw(INTERP_KERNEL::Exception) + const std::vector >& its) { return ReadFieldsOnSameMesh(ON_CELLS,fileName,meshName,meshDimRelToMax,fieldName,its); } std::vector MEDLoader::ReadFieldsNodeOnSameMesh(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, - const std::vector >& its) throw(INTERP_KERNEL::Exception) + const std::vector >& its) { return ReadFieldsOnSameMesh(ON_NODES,fileName,meshName,meshDimRelToMax,fieldName,its); } std::vector MEDLoader::ReadFieldsGaussOnSameMesh(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, - const std::vector >& its) throw(INTERP_KERNEL::Exception) + const std::vector >& its) { return ReadFieldsOnSameMesh(ON_GAUSS_PT,fileName,meshName,meshDimRelToMax,fieldName,its); } std::vector MEDLoader::ReadFieldsGaussNEOnSameMesh(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, - const std::vector >& its) throw(INTERP_KERNEL::Exception) + const std::vector >& its) { return ReadFieldsOnSameMesh(ON_GAUSS_NE,fileName,meshName,meshDimRelToMax,fieldName,its); } diff --git a/src/MEDLoader/MEDLoader.hxx b/src/MEDLoader/MEDLoader.hxx index b1bc30080..a9b5e8d6d 100644 --- a/src/MEDLoader/MEDLoader.hxx +++ b/src/MEDLoader/MEDLoader.hxx @@ -40,7 +40,7 @@ namespace ParaMEDMEM class MEDLOADER_EXPORT MEDLoader { - public: +public: static void SetEpsilonForNodeComp(double val); static void SetCompPolicyForCell(int val); static void SetTooLongStrPolicy(int val); @@ -76,15 +76,15 @@ class MEDLOADER_EXPORT MEDLoader static int ReadUMeshDimFromFile(const std::string& fileName, const std::string& meshName); static ParaMEDMEM::MEDCouplingFieldDouble *ReadField(ParaMEDMEM::TypeOfField type, const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, int iteration, int order); static std::vector ReadFieldsOnSameMesh(ParaMEDMEM::TypeOfField type, const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, - const std::vector >& its) throw(INTERP_KERNEL::Exception); + const std::vector >& its); static std::vector ReadFieldsCellOnSameMesh(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, - const std::vector >& its) throw(INTERP_KERNEL::Exception); + const std::vector >& its); static std::vector ReadFieldsNodeOnSameMesh(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, - const std::vector >& its) throw(INTERP_KERNEL::Exception); + const std::vector >& its); static std::vector ReadFieldsGaussOnSameMesh(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, - const std::vector >& its) throw(INTERP_KERNEL::Exception); + const std::vector >& its); static std::vector ReadFieldsGaussNEOnSameMesh(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, - const std::vector >& its) throw(INTERP_KERNEL::Exception); + const std::vector >& its); static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldCell(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, int iteration, int order); static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldNode(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, int iteration, int order); static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldGauss(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, int iteration, int order); @@ -98,11 +98,11 @@ class MEDLOADER_EXPORT MEDLoader static void WriteField(const std::string& fileName, const ParaMEDMEM::MEDCouplingFieldDouble *f, bool writeFromScratch); static void WriteFieldDep(const std::string& fileName, const ParaMEDMEM::MEDCouplingFieldDouble *f, bool writeFromScratch); static void WriteFieldUsingAlreadyWrittenMesh(const std::string& fileName, const ParaMEDMEM::MEDCouplingFieldDouble *f); - public: +public: static void AssignStaticWritePropertiesTo(ParaMEDMEM::MEDFileWritable& obj); - private: +private: MEDLoader(); - public: +public: static double _EPS_FOR_NODE_COMP; static int _COMP_FOR_CELL; static int _TOO_LONG_STR;