X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingCurveLinearMesh.cxx;h=378a0cf8c63116a4f8095d6eb5360a607311f573;hb=ac1df6b0ba8b337555fb39610c89f678d889580d;hp=92c9c96d486df92f9db61c03b248f816b0073c67;hpb=bd238ae917aa20ba3fe2f7569883d619b7e4f7a9;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx b/src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx index 92c9c96d4..378a0cf8c 100644 --- a/src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx +++ b/src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// Author : Anthony Geay (CEA/DEN) +// Author : Anthony Geay (EDF R&D) #include "MEDCouplingCurveLinearMesh.hxx" #include "MEDCouplingPointSet.hxx" @@ -37,9 +37,9 @@ MEDCouplingCurveLinearMesh::MEDCouplingCurveLinearMesh():_coords(0),_structure(0 { } -MEDCouplingCurveLinearMesh::MEDCouplingCurveLinearMesh(const MEDCouplingCurveLinearMesh& other, bool deepCopy):MEDCouplingStructuredMesh(other,deepCopy),_structure(other._structure) +MEDCouplingCurveLinearMesh::MEDCouplingCurveLinearMesh(const MEDCouplingCurveLinearMesh& other, bool deepCpy):MEDCouplingStructuredMesh(other,deepCpy),_structure(other._structure) { - if(deepCopy) + if(deepCpy) { if((const DataArrayDouble *)other._coords) _coords=other._coords->deepCopy(); @@ -205,7 +205,7 @@ void MEDCouplingCurveLinearMesh::checkConsistency(double eps) const checkConsistencyLight(); } -int MEDCouplingCurveLinearMesh::getNumberOfCells() const +std::size_t MEDCouplingCurveLinearMesh::getNumberOfCells() const { checkConsistencyLight(); return MEDCouplingStructuredMesh::getNumberOfCells(); @@ -255,7 +255,7 @@ std::string MEDCouplingCurveLinearMesh::simpleRepr() const double tt=getTime(tmpp1,tmpp2); ret << "Time attached to the mesh [unit] : " << tt << " [" << getTimeUnit() << "]\n"; ret << "Iteration : " << tmpp1 << " Order : " << tmpp2 << "\n"; - ret << "The nodal stucture of curve linear mesh is : ["; + ret << "The nodal structure of curve linear mesh is : ["; std::copy(_structure.begin(),_structure.end(),std::ostream_iterator(ret,",")); ret << "]\n"; ret << "The coords array is this : "; if((const DataArrayDouble *)_coords) @@ -270,6 +270,11 @@ std::string MEDCouplingCurveLinearMesh::advancedRepr() const return simpleRepr(); } +const DataArrayDouble *MEDCouplingCurveLinearMesh::getDirectAccessOfCoordsArrIfInStructure() const +{ + return _coords; +} + DataArrayDouble *MEDCouplingCurveLinearMesh::getCoords() { return _coords; @@ -629,6 +634,12 @@ int MEDCouplingCurveLinearMesh::getCellContainingPoint(const double *pos, double } } +void MEDCouplingCurveLinearMesh::getCellsContainingPoint(const double *pos, double eps, std::vector& elts) const +{ + int ret(getCellContainingPoint(pos,eps)); + elts.push_back(ret); +} + void MEDCouplingCurveLinearMesh::rotate(const double *center, const double *vector, double angle) { if(!((DataArrayDouble *)_coords)) @@ -637,9 +648,9 @@ void MEDCouplingCurveLinearMesh::rotate(const double *center, const double *vect int nbNodes=_coords->getNumberOfTuples(); double *coords=_coords->getPointer(); if(spaceDim==3) - MEDCouplingPointSet::Rotate3DAlg(center,vector,angle,nbNodes,coords); + DataArrayDouble::Rotate3DAlg(center,vector,angle,nbNodes,coords,coords); else if(spaceDim==2) - MEDCouplingPointSet::Rotate2DAlg(center,angle,nbNodes,coords); + DataArrayDouble::Rotate2DAlg(center,angle,nbNodes,coords,coords); else throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::rotate : invalid space dim for rotation must be 2 or 3"); _coords->declareAsNew(); @@ -783,7 +794,7 @@ void MEDCouplingCurveLinearMesh::getBarycenterAndOwnerMeshDim1(DataArrayDouble * void MEDCouplingCurveLinearMesh::renumberCells(const int *old2NewBg, bool check) { - throw INTERP_KERNEL::Exception("Functionnality of renumbering cell not available for CurveLinear Mesh !"); + throw INTERP_KERNEL::Exception("Functionality of renumbering cell not available for CurveLinear Mesh !"); } void MEDCouplingCurveLinearMesh::getTinySerializationInformation(std::vector& tinyInfoD, std::vector& tinyInfo, std::vector& littleStrings) const