0019292: EDF 672 SMESH : extend Composite side discretisation to 2D

StdMeshers_CompositeHexa_3D.* added
This commit is contained in:
eap 2008-12-09 10:38:55 +00:00
parent 04a0c33ea9
commit ab27b4d6ac
4 changed files with 1601 additions and 6 deletions

View File

@ -66,7 +66,8 @@ salomeinclude_HEADERS = \
StdMeshers_UseExisting_1D2D.hxx \
StdMeshers_QuadToTriaAdaptor.hxx \
SMESH_StdMeshers.hxx \
StdMeshers_TrianglePreference.hxx
StdMeshers_TrianglePreference.hxx \
StdMeshers_CompositeHexa_3D.hxx
# Libraries targets
@ -109,7 +110,8 @@ dist_libStdMeshers_la_SOURCES = \
StdMeshers_CompositeSegment_1D.cxx \
StdMeshers_UseExisting_1D2D.cxx \
StdMeshers_QuadToTriaAdaptor.cxx \
StdMeshers_TrianglePreference.cxx
StdMeshers_TrianglePreference.cxx \
StdMeshers_CompositeHexa_3D.cxx
# additionnal information to compil and link file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,61 @@
// SMESH SMESH : implementaion of SMESH idl descriptions
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// 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
// version 2.1 of the License.
//
// 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.
//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
// File : StdMeshers_CompositeBlock_3D.hxx
// Module : SMESH
#ifndef _SMESH_CompositeSegment_1D_HXX_
#define _SMESH_CompositeSegment_1D_HXX_
#include "SMESH_StdMeshers.hxx"
#include "SMESH_3D_Algo.hxx"
class SMESH_Mesh;
class StdMeshers_FaceSide;
class TopoDS_Edge;
class TopoDS_Face;
/*!
* \brief Computes hexahedral mesh on a box with composite sides
*
* The algorithm expects faces of a box to be meshed with quadrangles so that
* opposite box sides have equal number of quadrangles.
*/
class STDMESHERS_EXPORT StdMeshers_CompositeHexa_3D: public SMESH_3D_Algo
{
public:
StdMeshers_CompositeHexa_3D(int hypId, int studyId, SMESH_Gen* gen);
//virtual ~StdMeshers_CompositeHexa_3D();
virtual bool Compute(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape);
virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape,
Hypothesis_Status& aStatus);
private:
// private fields
};
#endif

View File

@ -28,10 +28,11 @@
// $Header$
#include "StdMeshers_Hexa_3D.hxx"
#include "StdMeshers_Quadrangle_2D.hxx"
#include "StdMeshers_CompositeHexa_3D.hxx"
#include "StdMeshers_FaceSide.hxx"
#include "StdMeshers_Penta_3D.hxx"
#include "StdMeshers_Prism_3D.hxx"
#include "StdMeshers_Quadrangle_2D.hxx"
#include "SMESH_Gen.hxx"
#include "SMESH_Mesh.hxx"
@ -215,7 +216,7 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh,
//Unexpect aCatch(SalomeException);
MESSAGE("StdMeshers_Hexa_3D::Compute");
SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
// 0. - shape and face mesh verification
// 0.1 - shape must be a solid (or a shell) with 6 faces
@ -225,8 +226,13 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh,
ASSERT(aSubMesh);
meshFaces.push_back(aSubMesh);
}
if (meshFaces.size() != 6)
return error(COMPERR_BAD_SHAPE, TComm(meshFaces.size())<<" instead of 6 faces in a block");
if (meshFaces.size() != 6) {
//return error(COMPERR_BAD_SHAPE, TComm(meshFaces.size())<<" instead of 6 faces in a block");
static StdMeshers_CompositeHexa_3D compositeHexa(-10, 0, aMesh.GetGen());
if ( !compositeHexa.Compute( aMesh, aShape ))
return error( compositeHexa.GetComputeError() );
return true;
}
// 0.2 - is each face meshed with Quadrangle_2D? (so, with a wire of 4 edges)