Back to index

salome-smesh  6.5.0
Typedefs | Enumerations | Functions
StdMeshers_Hexa_3D.cxx File Reference
#include "StdMeshers_Hexa_3D.hxx"
#include "StdMeshers_CompositeHexa_3D.hxx"
#include "StdMeshers_FaceSide.hxx"
#include "StdMeshers_HexaFromSkin_3D.hxx"
#include "StdMeshers_Penta_3D.hxx"
#include "StdMeshers_Prism_3D.hxx"
#include "StdMeshers_Quadrangle_2D.hxx"
#include "StdMeshers_ViscousLayers.hxx"
#include "SMESH_Comment.hxx"
#include "SMESH_Gen.hxx"
#include "SMESH_Mesh.hxx"
#include "SMESH_MesherHelper.hxx"
#include "SMESH_subMesh.hxx"
#include "SMDS_MeshNode.hxx"
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopoDS.hxx>
#include "utilities.h"
#include "Utils_ExceptHandlers.hxx"

Go to the source code of this file.

Typedefs

typedef SMESH_Comment TComm

Enumerations

enum  EBoxSides {
  B_BOTTOM = 0, B_RIGHT, B_TOP, B_LEFT,
  B_FRONT, B_BACK, B_UNDEFINED
}
enum  EQuadSides {
  Q_BOTTOM = 0, Q_RIGHT, Q_TOP, Q_LEFT,
  Q_CHILD, Q_PARENT
}

Functions

static SMESH_ComputeErrorPtr ComputePentahedralMesh (SMESH_Mesh &, const TopoDS_Shape &, SMESH_ProxyMesh *proxyMesh=0)
static bool EvaluatePentahedralMesh (SMESH_Mesh &, const TopoDS_Shape &, MapShapeNbElems &)

Typedef Documentation

Definition at line 56 of file StdMeshers_Hexa_3D.cxx.


Enumeration Type Documentation

enum EBoxSides
Enumerator:
B_BOTTOM 
B_RIGHT 
B_TOP 
B_LEFT 
B_FRONT 
B_BACK 
B_UNDEFINED 

Definition at line 155 of file StdMeshers_Hexa_3D.cxx.

{ B_BOTTOM=0, B_RIGHT, B_TOP, B_LEFT, B_FRONT, B_BACK, B_NB_SIDES };
enum EQuadSides
Enumerator:
Q_BOTTOM 
Q_RIGHT 
Q_TOP 
Q_LEFT 
Q_CHILD 
Q_PARENT 

Definition at line 158 of file StdMeshers_Hexa_3D.cxx.

{ Q_BOTTOM=0, Q_RIGHT, Q_TOP, Q_LEFT, Q_NB_SIDES };

Function Documentation

SMESH_ComputeErrorPtr ComputePentahedralMesh ( SMESH_Mesh &  aMesh,
const TopoDS_Shape &  aShape,
SMESH_ProxyMesh *  proxyMesh = 0 
) [static]

Definition at line 756 of file StdMeshers_Hexa_3D.cxx.

{
  SMESH_ComputeErrorPtr err = SMESH_ComputeError::New();
  if ( proxyMesh )
  {
    err->myName = COMPERR_BAD_INPUT_MESH;
    err->myComment = "Can't build pentahedral mesh on viscous layers";
    return err;
  }
  bool bOK;
  StdMeshers_Penta_3D anAlgo;
  //
  bOK=anAlgo.Compute(aMesh, aShape);
  //
  err = anAlgo.GetComputeError();
  //
  if ( !bOK && anAlgo.ErrorStatus() == 5 )
  {
    static StdMeshers_Prism_3D * aPrism3D = 0;
    if ( !aPrism3D ) {
      SMESH_Gen* gen = aMesh.GetGen();
      aPrism3D = new StdMeshers_Prism_3D( gen->GetANewId(), 0, gen );
    }
    SMESH_Hypothesis::Hypothesis_Status aStatus;
    if ( aPrism3D->CheckHypothesis( aMesh, aShape, aStatus ) ) {
      aPrism3D->InitComputeError();
      bOK = aPrism3D->Compute( aMesh, aShape );
      err = aPrism3D->GetComputeError();
    }
  }
  return err;
}

Here is the call graph for this function:

bool EvaluatePentahedralMesh ( SMESH_Mesh &  aMesh,
const TopoDS_Shape &  aShape,
MapShapeNbElems aResMap 
) [static]

Definition at line 797 of file StdMeshers_Hexa_3D.cxx.

{
  StdMeshers_Penta_3D anAlgo;
  bool bOK = anAlgo.Evaluate(aMesh, aShape, aResMap);

  //err = anAlgo.GetComputeError();
  //if ( !bOK && anAlgo.ErrorStatus() == 5 )
  if( !bOK ) {
    static StdMeshers_Prism_3D * aPrism3D = 0;
    if ( !aPrism3D ) {
      SMESH_Gen* gen = aMesh.GetGen();
      aPrism3D = new StdMeshers_Prism_3D( gen->GetANewId(), 0, gen );
    }
    SMESH_Hypothesis::Hypothesis_Status aStatus;
    if ( aPrism3D->CheckHypothesis( aMesh, aShape, aStatus ) ) {
      return aPrism3D->Evaluate(aMesh, aShape, aResMap);
    }
  }

  return bOK;
}