2020-04-15 19:49:00 +05:00
|
|
|
// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
|
2009-02-17 10:27:49 +05:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
|
|
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
2003-05-19 19:49:00 +06:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
// This library is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation; either
|
2014-02-20 18:25:37 +06:00
|
|
|
// version 2.1 of the License, or (at your option) any later version.
|
2003-05-19 19:49:00 +06:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
2003-07-10 15:49:12 +06:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this library; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2003-07-10 15:49:12 +06:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
2009-02-17 10:27:49 +05:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
|
2017-12-28 16:28:17 +05:00
|
|
|
// SMESH SMDS : implementation of Salome mesh data structure
|
2003-07-10 15:49:12 +06:00
|
|
|
// File : SMDS_Mesh.hxx
|
|
|
|
// Module : SMESH
|
2009-02-17 10:27:49 +05:00
|
|
|
//
|
2003-05-19 19:49:00 +06:00
|
|
|
#ifndef _SMDS_Mesh_HeaderFile
|
|
|
|
#define _SMDS_Mesh_HeaderFile
|
|
|
|
|
2008-03-07 12:47:05 +05:00
|
|
|
#include "SMESH_SMDS.hxx"
|
|
|
|
|
2017-12-22 16:14:24 +05:00
|
|
|
#include "SMDS_BallElement.hxx"
|
|
|
|
#include "SMDS_ElemIterator.hxx"
|
2012-08-09 16:03:55 +06:00
|
|
|
#include "SMDS_Mesh0DElement.hxx"
|
2017-12-22 16:14:24 +05:00
|
|
|
#include "SMDS_MeshCell.hxx"
|
2003-09-03 23:30:36 +06:00
|
|
|
#include "SMDS_MeshEdge.hxx"
|
|
|
|
#include "SMDS_MeshFace.hxx"
|
2008-03-07 12:47:05 +05:00
|
|
|
#include "SMDS_MeshInfo.hxx"
|
2017-12-22 16:14:24 +05:00
|
|
|
#include "SMDS_MeshNode.hxx"
|
|
|
|
#include "SMDS_MeshVolume.hxx"
|
2012-08-09 16:03:55 +06:00
|
|
|
#include "SMDS_UnstructuredGrid.hxx"
|
2003-09-03 23:30:36 +06:00
|
|
|
|
|
|
|
#include <set>
|
|
|
|
#include <list>
|
2012-08-09 16:03:55 +06:00
|
|
|
#include <vector>
|
|
|
|
|
2017-12-22 16:14:24 +05:00
|
|
|
class SMDS_ElementHolder;
|
|
|
|
class SMDS_ElementFactory;
|
|
|
|
class SMDS_NodeFactory;
|
2012-08-09 16:03:55 +06:00
|
|
|
|
2015-08-28 22:03:25 +05:00
|
|
|
class SMDS_EXPORT SMDS_Mesh : public SMDS_MeshObject
|
2012-08-09 16:03:55 +06:00
|
|
|
{
|
2004-06-18 14:34:31 +06:00
|
|
|
public:
|
2012-08-09 16:03:55 +06:00
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
SMDS_Mesh();
|
|
|
|
|
2012-08-09 16:03:55 +06:00
|
|
|
//! actual nodes coordinates, cells definition and reverse connectivity are stored in a vtkUnstructuredGrid
|
2017-12-22 16:14:24 +05:00
|
|
|
inline SMDS_UnstructuredGrid* GetGrid() { return myGrid; }
|
2012-08-09 16:03:55 +06:00
|
|
|
|
2017-12-22 16:14:24 +05:00
|
|
|
virtual SMDS_NodeIteratorPtr nodesIterator () const;
|
|
|
|
virtual SMDS_EdgeIteratorPtr edgesIterator () const;
|
|
|
|
virtual SMDS_FaceIteratorPtr facesIterator () const;
|
|
|
|
virtual SMDS_VolumeIteratorPtr volumesIterator() const;
|
2012-08-09 16:03:55 +06:00
|
|
|
|
|
|
|
virtual SMDS_ElemIteratorPtr elementsIterator(SMDSAbs_ElementType type=SMDSAbs_All) const;
|
|
|
|
virtual SMDS_ElemIteratorPtr elementGeomIterator(SMDSAbs_GeometryType type) const;
|
|
|
|
virtual SMDS_ElemIteratorPtr elementEntityIterator(SMDSAbs_EntityType type) const;
|
|
|
|
|
2018-08-08 18:55:53 +05:00
|
|
|
virtual SMDS_NodeIteratorPtr shapeNodesIterator (int shapeID,
|
|
|
|
size_t nbElemsToReturn=-1,
|
|
|
|
const SMDS_MeshNode* sm1stNode=0) const;
|
|
|
|
virtual SMDS_ElemIteratorPtr shapeElementsIterator(int shapeID,
|
|
|
|
size_t nbElemsToReturn=-1,
|
|
|
|
const SMDS_MeshElement* sm1stElem=0) const;
|
2017-12-22 16:14:24 +05:00
|
|
|
|
2005-08-23 14:58:58 +06:00
|
|
|
SMDSAbs_ElementType GetElementType( const int id, const bool iselem ) const;
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
SMDS_Mesh *AddSubMesh();
|
2012-08-09 16:03:55 +06:00
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual SMDS_MeshNode* AddNodeWithID(double x, double y, double z, int ID);
|
2012-08-09 16:03:55 +06:00
|
|
|
virtual SMDS_MeshNode* AddNode (double x, double y, double z);
|
|
|
|
|
|
|
|
virtual SMDS_Mesh0DElement* Add0DElementWithID(int n, int ID);
|
|
|
|
virtual SMDS_Mesh0DElement* Add0DElementWithID(const SMDS_MeshNode * n, int ID);
|
|
|
|
virtual SMDS_Mesh0DElement* Add0DElement (const SMDS_MeshNode * n);
|
|
|
|
|
|
|
|
virtual SMDS_BallElement* AddBallWithID(int n, double diameter, int ID);
|
|
|
|
virtual SMDS_BallElement* AddBallWithID(const SMDS_MeshNode * n, double diameter, int ID);
|
|
|
|
virtual SMDS_BallElement* AddBall (const SMDS_MeshNode * n, double diameter);
|
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual SMDS_MeshEdge* AddEdgeWithID(int n1, int n2, int ID);
|
|
|
|
virtual SMDS_MeshEdge* AddEdgeWithID(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
int ID);
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual SMDS_MeshEdge* AddEdge(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2);
|
|
|
|
|
2006-03-13 20:29:49 +05:00
|
|
|
// 2d order edge with 3 nodes: n12 - node between n1 and n2
|
|
|
|
virtual SMDS_MeshEdge* AddEdgeWithID(int n1, int n2, int n12, int ID);
|
|
|
|
virtual SMDS_MeshEdge* AddEdgeWithID(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
int ID);
|
2006-03-13 20:29:49 +05:00
|
|
|
virtual SMDS_MeshEdge* AddEdge(const SMDS_MeshNode * n1,
|
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n12);
|
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual SMDS_MeshFace* AddFaceWithID(int n1, int n2, int n3, int ID);
|
|
|
|
virtual SMDS_MeshFace* AddFaceWithID(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
int ID);
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual SMDS_MeshFace* AddFace(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3);
|
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual SMDS_MeshFace* AddFaceWithID(int n1, int n2, int n3, int n4, int ID);
|
|
|
|
virtual SMDS_MeshFace* AddFaceWithID(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
int ID);
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual SMDS_MeshFace* AddFace(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4);
|
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
|
2006-03-13 20:29:49 +05:00
|
|
|
// 2d order triangle of 6 nodes
|
|
|
|
virtual SMDS_MeshFace* AddFaceWithID(int n1, int n2, int n3,
|
|
|
|
int n12,int n23,int n31, int ID);
|
|
|
|
virtual SMDS_MeshFace* AddFaceWithID(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n31,
|
|
|
|
int ID);
|
2006-03-13 20:29:49 +05:00
|
|
|
virtual SMDS_MeshFace* AddFace(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
2006-03-13 20:29:49 +05:00
|
|
|
const SMDS_MeshNode * n12,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n31);
|
2006-03-13 20:29:49 +05:00
|
|
|
|
2013-05-16 22:06:21 +06:00
|
|
|
// 2d order triangle of 7 nodes
|
|
|
|
virtual SMDS_MeshFace* AddFaceWithID(int n1, int n2, int n3,
|
|
|
|
int n12,int n23,int n31, int nCenter, int ID);
|
|
|
|
virtual SMDS_MeshFace* AddFaceWithID(const SMDS_MeshNode * n1,
|
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n31,
|
|
|
|
const SMDS_MeshNode * nCenter,
|
|
|
|
int ID);
|
|
|
|
virtual SMDS_MeshFace* AddFace(const SMDS_MeshNode * n1,
|
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n31,
|
|
|
|
const SMDS_MeshNode * nCenter);
|
|
|
|
|
2006-03-13 20:29:49 +05:00
|
|
|
// 2d order quadrangle
|
|
|
|
virtual SMDS_MeshFace* AddFaceWithID(int n1, int n2, int n3, int n4,
|
|
|
|
int n12,int n23,int n34,int n41, int ID);
|
|
|
|
virtual SMDS_MeshFace* AddFaceWithID(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n34,
|
|
|
|
const SMDS_MeshNode * n41,
|
|
|
|
int ID);
|
2006-03-13 20:29:49 +05:00
|
|
|
virtual SMDS_MeshFace* AddFace(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
2006-03-13 20:29:49 +05:00
|
|
|
const SMDS_MeshNode * n12,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n34,
|
|
|
|
const SMDS_MeshNode * n41);
|
|
|
|
|
|
|
|
virtual SMDS_MeshFace* AddFaceWithID(int n1, int n2, int n3, int n4,
|
|
|
|
int n12,int n23,int n34,int n41, int nCenter, int ID);
|
|
|
|
virtual SMDS_MeshFace* AddFaceWithID(const SMDS_MeshNode * n1,
|
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n34,
|
|
|
|
const SMDS_MeshNode * n41,
|
|
|
|
const SMDS_MeshNode * nCenter,
|
|
|
|
int ID);
|
|
|
|
virtual SMDS_MeshFace* AddFace(const SMDS_MeshNode * n1,
|
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n34,
|
|
|
|
const SMDS_MeshNode * n41,
|
|
|
|
const SMDS_MeshNode * nCenter);
|
2006-03-13 20:29:49 +05:00
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4, int ID);
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
int ID);
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4);
|
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4,
|
|
|
|
int n5, int ID);
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5,
|
|
|
|
int ID);
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5);
|
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4,
|
|
|
|
int n5, int n6, int ID);
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5,
|
|
|
|
const SMDS_MeshNode * n6,
|
|
|
|
int ID);
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5,
|
|
|
|
const SMDS_MeshNode * n6);
|
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4,
|
|
|
|
int n5, int n6, int n7, int n8, int ID);
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5,
|
|
|
|
const SMDS_MeshNode * n6,
|
|
|
|
const SMDS_MeshNode * n7,
|
|
|
|
const SMDS_MeshNode * n8,
|
|
|
|
int ID);
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5,
|
|
|
|
const SMDS_MeshNode * n6,
|
|
|
|
const SMDS_MeshNode * n7,
|
|
|
|
const SMDS_MeshNode * n8);
|
2004-06-18 14:34:31 +06:00
|
|
|
|
|
|
|
|
2012-08-09 16:03:55 +06:00
|
|
|
// hexagonal prism
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4, int n5, int n6,
|
|
|
|
int n7, int n8, int n9, int n10, int n11, int n12,
|
|
|
|
int ID);
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5,
|
|
|
|
const SMDS_MeshNode * n6,
|
|
|
|
const SMDS_MeshNode * n7,
|
|
|
|
const SMDS_MeshNode * n8,
|
|
|
|
const SMDS_MeshNode * n9,
|
|
|
|
const SMDS_MeshNode * n10,
|
|
|
|
const SMDS_MeshNode * n11,
|
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
int ID);
|
|
|
|
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5,
|
|
|
|
const SMDS_MeshNode * n6,
|
|
|
|
const SMDS_MeshNode * n7,
|
|
|
|
const SMDS_MeshNode * n8,
|
|
|
|
const SMDS_MeshNode * n9,
|
|
|
|
const SMDS_MeshNode * n10,
|
|
|
|
const SMDS_MeshNode * n11,
|
|
|
|
const SMDS_MeshNode * n12);
|
|
|
|
|
2006-03-13 20:29:49 +05:00
|
|
|
// 2d order tetrahedron of 10 nodes
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4,
|
|
|
|
int n12,int n23,int n31,
|
|
|
|
int n14,int n24,int n34, int ID);
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n31,
|
|
|
|
const SMDS_MeshNode * n14,
|
|
|
|
const SMDS_MeshNode * n24,
|
|
|
|
const SMDS_MeshNode * n34,
|
|
|
|
int ID);
|
2006-03-13 20:29:49 +05:00
|
|
|
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
2006-03-13 20:29:49 +05:00
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n31,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n14,
|
2006-03-13 20:29:49 +05:00
|
|
|
const SMDS_MeshNode * n24,
|
|
|
|
const SMDS_MeshNode * n34);
|
|
|
|
|
|
|
|
// 2d order pyramid of 13 nodes
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4, int n5,
|
|
|
|
int n12,int n23,int n34,int n41,
|
|
|
|
int n15,int n25,int n35,int n45,
|
|
|
|
int ID);
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5,
|
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n34,
|
|
|
|
const SMDS_MeshNode * n41,
|
|
|
|
const SMDS_MeshNode * n15,
|
|
|
|
const SMDS_MeshNode * n25,
|
|
|
|
const SMDS_MeshNode * n35,
|
|
|
|
const SMDS_MeshNode * n45,
|
|
|
|
int ID);
|
2006-03-13 20:29:49 +05:00
|
|
|
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5,
|
2006-03-13 20:29:49 +05:00
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n34,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n41,
|
2006-03-13 20:29:49 +05:00
|
|
|
const SMDS_MeshNode * n15,
|
|
|
|
const SMDS_MeshNode * n25,
|
|
|
|
const SMDS_MeshNode * n35,
|
|
|
|
const SMDS_MeshNode * n45);
|
|
|
|
|
|
|
|
// 2d order Pentahedron with 15 nodes
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3,
|
|
|
|
int n4, int n5, int n6,
|
|
|
|
int n12,int n23,int n31,
|
|
|
|
int n45,int n56,int n64,
|
|
|
|
int n14,int n25,int n36,
|
|
|
|
int ID);
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5,
|
|
|
|
const SMDS_MeshNode * n6,
|
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n31,
|
|
|
|
const SMDS_MeshNode * n45,
|
|
|
|
const SMDS_MeshNode * n56,
|
|
|
|
const SMDS_MeshNode * n64,
|
|
|
|
const SMDS_MeshNode * n14,
|
|
|
|
const SMDS_MeshNode * n25,
|
|
|
|
const SMDS_MeshNode * n36,
|
|
|
|
int ID);
|
2006-03-13 20:29:49 +05:00
|
|
|
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5,
|
|
|
|
const SMDS_MeshNode * n6,
|
2006-03-13 20:29:49 +05:00
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n31,
|
2006-03-13 20:29:49 +05:00
|
|
|
const SMDS_MeshNode * n45,
|
|
|
|
const SMDS_MeshNode * n56,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n64,
|
2006-03-13 20:29:49 +05:00
|
|
|
const SMDS_MeshNode * n14,
|
|
|
|
const SMDS_MeshNode * n25,
|
|
|
|
const SMDS_MeshNode * n36);
|
|
|
|
|
2017-09-07 17:04:57 +05:00
|
|
|
// 2d order Pentahedron with 18 nodes
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3,
|
|
|
|
int n4, int n5, int n6,
|
|
|
|
int n12,int n23,int n31,
|
|
|
|
int n45,int n56,int n64,
|
|
|
|
int n14,int n25,int n36,
|
|
|
|
int n1245, int n2356, int n1346,
|
|
|
|
int ID);
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5,
|
|
|
|
const SMDS_MeshNode * n6,
|
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n31,
|
|
|
|
const SMDS_MeshNode * n45,
|
|
|
|
const SMDS_MeshNode * n56,
|
|
|
|
const SMDS_MeshNode * n64,
|
|
|
|
const SMDS_MeshNode * n14,
|
|
|
|
const SMDS_MeshNode * n25,
|
|
|
|
const SMDS_MeshNode * n36,
|
|
|
|
const SMDS_MeshNode * n1245,
|
|
|
|
const SMDS_MeshNode * n2356,
|
|
|
|
const SMDS_MeshNode * n1346,
|
|
|
|
int ID);
|
|
|
|
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5,
|
|
|
|
const SMDS_MeshNode * n6,
|
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n31,
|
|
|
|
const SMDS_MeshNode * n45,
|
|
|
|
const SMDS_MeshNode * n56,
|
|
|
|
const SMDS_MeshNode * n64,
|
|
|
|
const SMDS_MeshNode * n14,
|
|
|
|
const SMDS_MeshNode * n25,
|
|
|
|
const SMDS_MeshNode * n36,
|
|
|
|
const SMDS_MeshNode * n1245,
|
|
|
|
const SMDS_MeshNode * n2356,
|
|
|
|
const SMDS_MeshNode * n1346);
|
|
|
|
|
|
|
|
|
2006-03-13 20:29:49 +05:00
|
|
|
// 2d oreder Hexahedrons with 20 nodes
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4,
|
|
|
|
int n5, int n6, int n7, int n8,
|
|
|
|
int n12,int n23,int n34,int n41,
|
|
|
|
int n56,int n67,int n78,int n85,
|
|
|
|
int n15,int n26,int n37,int n48,
|
|
|
|
int ID);
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5,
|
|
|
|
const SMDS_MeshNode * n6,
|
|
|
|
const SMDS_MeshNode * n7,
|
|
|
|
const SMDS_MeshNode * n8,
|
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n34,
|
|
|
|
const SMDS_MeshNode * n41,
|
|
|
|
const SMDS_MeshNode * n56,
|
|
|
|
const SMDS_MeshNode * n67,
|
|
|
|
const SMDS_MeshNode * n78,
|
|
|
|
const SMDS_MeshNode * n85,
|
|
|
|
const SMDS_MeshNode * n15,
|
|
|
|
const SMDS_MeshNode * n26,
|
|
|
|
const SMDS_MeshNode * n37,
|
|
|
|
const SMDS_MeshNode * n48,
|
|
|
|
int ID);
|
2006-03-13 20:29:49 +05:00
|
|
|
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5,
|
|
|
|
const SMDS_MeshNode * n6,
|
|
|
|
const SMDS_MeshNode * n7,
|
|
|
|
const SMDS_MeshNode * n8,
|
2006-03-13 20:29:49 +05:00
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n34,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n41,
|
2006-03-13 20:29:49 +05:00
|
|
|
const SMDS_MeshNode * n56,
|
|
|
|
const SMDS_MeshNode * n67,
|
|
|
|
const SMDS_MeshNode * n78,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode * n85,
|
2006-03-13 20:29:49 +05:00
|
|
|
const SMDS_MeshNode * n15,
|
|
|
|
const SMDS_MeshNode * n26,
|
|
|
|
const SMDS_MeshNode * n37,
|
|
|
|
const SMDS_MeshNode * n48);
|
|
|
|
|
2012-08-09 16:03:55 +06:00
|
|
|
// 2d oreder Hexahedrons with 27 nodes
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4,
|
|
|
|
int n5, int n6, int n7, int n8,
|
|
|
|
int n12,int n23,int n34,int n41,
|
|
|
|
int n56,int n67,int n78,int n85,
|
|
|
|
int n15,int n26,int n37,int n48,
|
|
|
|
int n1234,int n1256,int n2367,int n3478,
|
|
|
|
int n1458,int n5678,int nCenter,
|
|
|
|
int ID);
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5,
|
|
|
|
const SMDS_MeshNode * n6,
|
|
|
|
const SMDS_MeshNode * n7,
|
|
|
|
const SMDS_MeshNode * n8,
|
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n34,
|
|
|
|
const SMDS_MeshNode * n41,
|
|
|
|
const SMDS_MeshNode * n56,
|
|
|
|
const SMDS_MeshNode * n67,
|
|
|
|
const SMDS_MeshNode * n78,
|
|
|
|
const SMDS_MeshNode * n85,
|
|
|
|
const SMDS_MeshNode * n15,
|
|
|
|
const SMDS_MeshNode * n26,
|
|
|
|
const SMDS_MeshNode * n37,
|
|
|
|
const SMDS_MeshNode * n48,
|
|
|
|
const SMDS_MeshNode * n1234,
|
|
|
|
const SMDS_MeshNode * n1256,
|
|
|
|
const SMDS_MeshNode * n2367,
|
|
|
|
const SMDS_MeshNode * n3478,
|
|
|
|
const SMDS_MeshNode * n1458,
|
|
|
|
const SMDS_MeshNode * n5678,
|
|
|
|
const SMDS_MeshNode * nCenter,
|
|
|
|
int ID);
|
|
|
|
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3,
|
|
|
|
const SMDS_MeshNode * n4,
|
|
|
|
const SMDS_MeshNode * n5,
|
|
|
|
const SMDS_MeshNode * n6,
|
|
|
|
const SMDS_MeshNode * n7,
|
|
|
|
const SMDS_MeshNode * n8,
|
|
|
|
const SMDS_MeshNode * n12,
|
|
|
|
const SMDS_MeshNode * n23,
|
|
|
|
const SMDS_MeshNode * n34,
|
|
|
|
const SMDS_MeshNode * n41,
|
|
|
|
const SMDS_MeshNode * n56,
|
|
|
|
const SMDS_MeshNode * n67,
|
|
|
|
const SMDS_MeshNode * n78,
|
|
|
|
const SMDS_MeshNode * n85,
|
|
|
|
const SMDS_MeshNode * n15,
|
|
|
|
const SMDS_MeshNode * n26,
|
|
|
|
const SMDS_MeshNode * n37,
|
|
|
|
const SMDS_MeshNode * n48,
|
|
|
|
const SMDS_MeshNode * n1234,
|
|
|
|
const SMDS_MeshNode * n1256,
|
|
|
|
const SMDS_MeshNode * n2367,
|
|
|
|
const SMDS_MeshNode * n3478,
|
|
|
|
const SMDS_MeshNode * n1458,
|
|
|
|
const SMDS_MeshNode * n5678,
|
|
|
|
const SMDS_MeshNode * nCenter);
|
|
|
|
|
|
|
|
virtual SMDS_MeshFace* AddPolygonalFaceWithID (const std::vector<int> & nodes_ids,
|
|
|
|
const int ID);
|
2005-06-07 19:22:20 +06:00
|
|
|
|
2012-08-09 16:03:55 +06:00
|
|
|
virtual SMDS_MeshFace* AddPolygonalFaceWithID (const std::vector<const SMDS_MeshNode*> & nodes,
|
|
|
|
const int ID);
|
2005-06-07 19:22:20 +06:00
|
|
|
|
2012-08-09 16:03:55 +06:00
|
|
|
virtual SMDS_MeshFace* AddPolygonalFace (const std::vector<const SMDS_MeshNode*> & nodes);
|
2005-06-07 19:22:20 +06:00
|
|
|
|
2015-06-24 14:17:07 +05:00
|
|
|
virtual SMDS_MeshFace* AddQuadPolygonalFaceWithID(const std::vector<int> & nodes_ids,
|
|
|
|
const int ID);
|
|
|
|
|
|
|
|
virtual SMDS_MeshFace* AddQuadPolygonalFaceWithID(const std::vector<const SMDS_MeshNode*> & nodes,
|
|
|
|
const int ID);
|
|
|
|
|
|
|
|
virtual SMDS_MeshFace* AddQuadPolygonalFace(const std::vector<const SMDS_MeshNode*> & nodes);
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
|
2015-06-24 14:17:07 +05:00
|
|
|
(const std::vector<int> & nodes_ids,
|
|
|
|
const std::vector<int> & quantities,
|
|
|
|
const int ID);
|
2005-06-07 19:22:20 +06:00
|
|
|
|
|
|
|
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
|
2015-06-24 14:17:07 +05:00
|
|
|
(const std::vector<const SMDS_MeshNode*> & nodes,
|
|
|
|
const std::vector<int> & quantities,
|
2017-12-22 16:14:24 +05:00
|
|
|
const int ID);
|
2005-06-07 19:22:20 +06:00
|
|
|
|
|
|
|
virtual SMDS_MeshVolume* AddPolyhedralVolume
|
2017-12-22 16:14:24 +05:00
|
|
|
(const std::vector<const SMDS_MeshNode*> & nodes,
|
|
|
|
const std::vector<int> & quantities);
|
2012-08-09 16:03:55 +06:00
|
|
|
|
|
|
|
virtual SMDS_MeshVolume* AddVolumeFromVtkIds(const std::vector<vtkIdType>& vtkNodeIds);
|
|
|
|
|
|
|
|
virtual SMDS_MeshFace* AddFaceFromVtkIds(const std::vector<vtkIdType>& vtkNodeIds);
|
|
|
|
|
2013-05-16 22:06:21 +06:00
|
|
|
virtual void MoveNode(const SMDS_MeshNode *n, double x, double y, double z);
|
2005-06-07 19:22:20 +06:00
|
|
|
|
2017-12-22 16:14:24 +05:00
|
|
|
virtual void RemoveElement(const SMDS_MeshElement * elem,
|
|
|
|
std::vector<const SMDS_MeshElement *>& removedElems,
|
|
|
|
std::vector<const SMDS_MeshElement *>& removedNodes,
|
|
|
|
const bool removenodes = false);
|
2004-12-01 15:48:31 +05:00
|
|
|
virtual void RemoveElement(const SMDS_MeshElement * elem, bool removenodes = false);
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual void RemoveNode(const SMDS_MeshNode * node);
|
2006-03-13 20:29:49 +05:00
|
|
|
|
|
|
|
/*! Remove only the given element and only if it is free.
|
|
|
|
* Method does not work for meshes with descendants.
|
|
|
|
* Implemented for fast cleaning of meshes.
|
|
|
|
*/
|
|
|
|
virtual void RemoveFreeElement(const SMDS_MeshElement * elem);
|
2009-02-17 10:27:49 +05:00
|
|
|
|
|
|
|
virtual void Clear();
|
2012-08-09 16:03:55 +06:00
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual bool RemoveFromParent();
|
|
|
|
virtual bool RemoveSubMesh(const SMDS_Mesh * aMesh);
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2008-03-07 12:47:05 +05:00
|
|
|
bool ChangeElementNodes(const SMDS_MeshElement * elem,
|
|
|
|
const SMDS_MeshNode * nodes[],
|
|
|
|
const int nbnodes);
|
2019-10-15 18:04:58 +05:00
|
|
|
bool ChangePolyhedronNodes(const SMDS_MeshElement * elem,
|
|
|
|
const std::vector<const SMDS_MeshNode*>& nodes,
|
|
|
|
const std::vector<int>& quantities);
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2017-12-22 16:14:24 +05:00
|
|
|
//virtual void Renumber (const bool isNodes, const int startID = 1, const int deltaID = 1);
|
2004-12-01 15:48:31 +05:00
|
|
|
// Renumber all nodes or elements.
|
2017-12-22 16:14:24 +05:00
|
|
|
|
|
|
|
virtual void CompactMesh();
|
2019-08-29 18:19:25 +05:00
|
|
|
virtual bool IsCompacted();
|
|
|
|
virtual bool HasNumerationHoles();
|
2017-12-22 16:14:24 +05:00
|
|
|
|
|
|
|
template<class ELEMTYPE>
|
|
|
|
static const ELEMTYPE* DownCast( const SMDS_MeshElement* e )
|
|
|
|
{
|
|
|
|
return (( e && !e->IsNull() && ELEMTYPE::Type() == e->GetType() ) ?
|
|
|
|
static_cast<const ELEMTYPE*>(e) : 0 );
|
|
|
|
}
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
const SMDS_MeshNode *FindNode(int idnode) const;
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMDS_MeshNode *FindNodeVtk(int idnode) const;
|
2017-12-22 16:14:24 +05:00
|
|
|
const SMDS_MeshElement *FindElementVtk(int IDelem) const;
|
2017-10-12 21:52:03 +05:00
|
|
|
virtual const SMDS_MeshElement * FindElement(int IDelem) const;
|
2012-08-09 16:03:55 +06:00
|
|
|
static const SMDS_Mesh0DElement* Find0DElement(const SMDS_MeshNode * n);
|
|
|
|
static const SMDS_BallElement* FindBall(const SMDS_MeshNode * n);
|
2004-12-01 15:48:31 +05:00
|
|
|
static const SMDS_MeshEdge* FindEdge(const SMDS_MeshNode * n1,
|
|
|
|
const SMDS_MeshNode * n2);
|
2006-03-13 20:29:49 +05:00
|
|
|
static const SMDS_MeshEdge* FindEdge(const SMDS_MeshNode * n1,
|
|
|
|
const SMDS_MeshNode * n2,
|
|
|
|
const SMDS_MeshNode * n3);
|
2004-12-01 15:48:31 +05:00
|
|
|
static const SMDS_MeshFace* FindFace(const SMDS_MeshNode *n1,
|
|
|
|
const SMDS_MeshNode *n2,
|
|
|
|
const SMDS_MeshNode *n3);
|
|
|
|
static const SMDS_MeshFace* FindFace(const SMDS_MeshNode *n1,
|
|
|
|
const SMDS_MeshNode *n2,
|
|
|
|
const SMDS_MeshNode *n3,
|
|
|
|
const SMDS_MeshNode *n4);
|
2006-03-13 20:29:49 +05:00
|
|
|
static const SMDS_MeshFace* FindFace(const SMDS_MeshNode *n1,
|
|
|
|
const SMDS_MeshNode *n2,
|
|
|
|
const SMDS_MeshNode *n3,
|
|
|
|
const SMDS_MeshNode *n4,
|
|
|
|
const SMDS_MeshNode *n5,
|
|
|
|
const SMDS_MeshNode *n6);
|
|
|
|
static const SMDS_MeshFace* FindFace(const SMDS_MeshNode *n1,
|
|
|
|
const SMDS_MeshNode *n2,
|
|
|
|
const SMDS_MeshNode *n3,
|
|
|
|
const SMDS_MeshNode *n4,
|
|
|
|
const SMDS_MeshNode *n5,
|
|
|
|
const SMDS_MeshNode *n6,
|
|
|
|
const SMDS_MeshNode *n7,
|
|
|
|
const SMDS_MeshNode *n8);
|
2005-06-07 19:22:20 +06:00
|
|
|
|
2017-12-22 16:14:24 +05:00
|
|
|
static const SMDS_MeshFace* FindFace (const std::vector<const SMDS_MeshNode *>& nodes);
|
2012-08-09 16:03:55 +06:00
|
|
|
static const SMDS_MeshElement* FindElement(const std::vector<const SMDS_MeshNode *>& nodes,
|
|
|
|
const SMDSAbs_ElementType type=SMDSAbs_All,
|
|
|
|
const bool noMedium=true);
|
2017-04-12 18:55:16 +05:00
|
|
|
static int GetElementsByNodes(const std::vector<const SMDS_MeshNode *>& nodes,
|
|
|
|
std::vector<const SMDS_MeshElement *>& foundElems,
|
|
|
|
const SMDSAbs_ElementType type=SMDSAbs_All);
|
2005-06-07 19:22:20 +06:00
|
|
|
|
2017-12-22 16:14:24 +05:00
|
|
|
virtual bool Contains( const SMDS_MeshElement* elem ) const;
|
|
|
|
|
2008-03-07 12:47:05 +05:00
|
|
|
/*!
|
|
|
|
* \brief Raise an exception if free memory (ram+swap) too low
|
2018-06-19 21:58:29 +05:00
|
|
|
* \param doNotRaise - if true, suppress exception, just return free memory size
|
2008-03-07 12:47:05 +05:00
|
|
|
* \retval int - amount of available memory in MB or negative number in failure case
|
|
|
|
*/
|
|
|
|
static int CheckMemory(const bool doNotRaise=false) throw (std::bad_alloc);
|
|
|
|
|
2019-08-29 18:19:25 +05:00
|
|
|
virtual int MaxNodeID() const;
|
|
|
|
virtual int MinNodeID() const;
|
|
|
|
virtual int MaxElementID() const;
|
|
|
|
virtual int MinElementID() const;
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2008-03-07 12:47:05 +05:00
|
|
|
const SMDS_MeshInfo& GetMeshInfo() const { return myInfo; }
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2012-08-09 16:03:55 +06:00
|
|
|
virtual int NbNodes() const;
|
2016-12-13 22:30:15 +05:00
|
|
|
virtual int NbElements() const;
|
2012-08-09 16:03:55 +06:00
|
|
|
virtual int Nb0DElements() const;
|
|
|
|
virtual int NbBalls() const;
|
|
|
|
virtual int NbEdges() const;
|
|
|
|
virtual int NbFaces() const;
|
|
|
|
virtual int NbVolumes() const;
|
|
|
|
virtual int NbSubMesh() const;
|
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
virtual ~SMDS_Mesh();
|
2012-08-09 16:03:55 +06:00
|
|
|
|
|
|
|
double getMaxDim();
|
2017-12-22 16:14:24 +05:00
|
|
|
int FromVtkToSmds(int vtkid) const;
|
2012-08-09 16:03:55 +06:00
|
|
|
|
2016-02-15 17:08:20 +05:00
|
|
|
void dumpGrid(std::string ficdump="dumpGrid");
|
2012-08-09 16:03:55 +06:00
|
|
|
static int chunkSize;
|
2004-06-18 14:34:31 +06:00
|
|
|
|
2012-08-09 16:03:55 +06:00
|
|
|
//! low level modification: add, change or remove node or element
|
|
|
|
inline void setMyModified() { this->myModified = true; }
|
|
|
|
|
|
|
|
void Modified();
|
2016-11-24 16:29:42 +05:00
|
|
|
vtkMTimeType GetMTime() const;
|
2012-08-09 16:03:55 +06:00
|
|
|
|
2019-10-15 18:04:58 +05:00
|
|
|
protected:
|
2004-06-18 14:34:31 +06:00
|
|
|
SMDS_Mesh(SMDS_Mesh * parent);
|
|
|
|
|
2012-08-09 16:03:55 +06:00
|
|
|
void addChildrenWithNodes(std::set<const SMDS_MeshElement*>& setOfChildren,
|
2014-07-23 22:04:21 +06:00
|
|
|
const SMDS_MeshElement * element,
|
2012-08-09 16:03:55 +06:00
|
|
|
std::set<const SMDS_MeshElement*>& nodes);
|
|
|
|
|
|
|
|
inline void adjustBoundingBox(double x, double y, double z)
|
|
|
|
{
|
|
|
|
if (x > xmax) xmax = x;
|
|
|
|
else if (x < xmin) xmin = x;
|
|
|
|
if (y > ymax) ymax = y;
|
|
|
|
else if (y < ymin) ymin = y;
|
|
|
|
if (z > zmax) zmax = z;
|
|
|
|
else if (z < zmin) zmin = z;
|
|
|
|
}
|
2004-06-18 14:34:31 +06:00
|
|
|
|
2019-10-15 18:04:58 +05:00
|
|
|
void updateInverseElements( const SMDS_MeshElement * element,
|
|
|
|
const SMDS_MeshNode* const* nodes,
|
|
|
|
const int nbnodes,
|
|
|
|
std::set<const SMDS_MeshNode*>& oldNodes );
|
|
|
|
|
2017-12-22 16:14:24 +05:00
|
|
|
void setNbShapes( size_t nbShapes );
|
2012-08-09 16:03:55 +06:00
|
|
|
|
2017-12-22 16:14:24 +05:00
|
|
|
|
|
|
|
// Fields PRIVATE
|
2012-08-09 16:03:55 +06:00
|
|
|
|
|
|
|
//! actual nodes coordinates, cells definition and reverse connectivity are stored in a vtkUnstructuredGrid
|
2017-12-22 16:14:24 +05:00
|
|
|
SMDS_UnstructuredGrid* myGrid;
|
2012-08-09 16:03:55 +06:00
|
|
|
|
|
|
|
//! Small objects like SMDS_MeshNode are allocated by chunks to limit memory costs of new
|
2017-12-22 16:14:24 +05:00
|
|
|
SMDS_NodeFactory* myNodeFactory;
|
|
|
|
SMDS_ElementFactory* myCellFactory;
|
2012-08-09 16:03:55 +06:00
|
|
|
|
2017-12-22 16:14:24 +05:00
|
|
|
SMDS_Mesh * myParent;
|
|
|
|
std::list<SMDS_Mesh *> myChildren;
|
|
|
|
SMDS_MeshInfo myInfo;
|
2008-03-07 12:47:05 +05:00
|
|
|
|
2015-10-27 22:47:31 +05:00
|
|
|
//! any add, remove or change of node or cell
|
2017-12-22 16:14:24 +05:00
|
|
|
bool myModified;
|
2012-08-09 16:03:55 +06:00
|
|
|
//! use a counter to keep track of modifications
|
2017-12-22 16:14:24 +05:00
|
|
|
unsigned long myModifTime, myCompactTime;
|
2012-08-09 16:03:55 +06:00
|
|
|
|
2017-12-22 16:14:24 +05:00
|
|
|
friend class SMDS_ElementHolder;
|
|
|
|
std::set< SMDS_ElementHolder* > myElemHolders;
|
2012-08-09 16:03:55 +06:00
|
|
|
|
|
|
|
double xmin;
|
|
|
|
double xmax;
|
|
|
|
double ymin;
|
|
|
|
double ymax;
|
|
|
|
double zmin;
|
|
|
|
double zmax;
|
2003-05-19 19:49:00 +06:00
|
|
|
};
|
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2003-05-19 19:49:00 +06:00
|
|
|
#endif
|