1 // Copyright (C) 2007-2015 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // File : MEDCouplingNormalizedCartesianMesh.txx
20 // Created : Mon Aug 17 12:00:38 2009
21 // Author : Edward AGAPOV (eap)
24 #include "MEDCouplingNormalizedCartesianMesh.hxx"
25 #include "MEDCouplingCMesh.hxx"
27 template<int SPACEDIM>
28 MEDCouplingNormalizedCartesianMesh<SPACEDIM>::MEDCouplingNormalizedCartesianMesh(const ParaMEDMEM::MEDCouplingCMesh *mesh):_mesh(mesh)
34 template<int SPACEDIM>
35 MEDCouplingNormalizedCartesianMesh<SPACEDIM>::~MEDCouplingNormalizedCartesianMesh()
41 template<int SPACEDIM>
42 unsigned long MEDCouplingNormalizedCartesianMesh<SPACEDIM>::getNumberOfElements() const
44 return _mesh->getNumberOfCells();
47 template<int SPACEDIM>
48 unsigned long MEDCouplingNormalizedCartesianMesh<SPACEDIM>::nbCellsAlongAxis(int axis) const
50 return _mesh->getCoordsAt(axis)->getNumberOfTuples() - 1;
53 template<int SPACEDIM>
54 const double * MEDCouplingNormalizedCartesianMesh<SPACEDIM>::getCoordsAlongAxis(int axis) const
56 return _mesh->getCoordsAt(axis)->getConstPointer();