Back to index

salome-smesh  6.5.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
TNodeDistributor Class Reference

Class computing layers distribution using data of StdMeshers_LayerDistribution hypothesis. More...

Collaboration diagram for TNodeDistributor:
Collaboration graph
[legend]

List of all members.

Public Member Functions

bool Compute (vector< double > &positions, gp_Pnt pIn, gp_Pnt pOut, SMESH_Mesh &aMesh, const StdMeshers_LayerDistribution *hyp)

Static Public Member Functions

static TNodeDistributorGetDistributor (SMESH_Mesh &aMesh)

Protected Member Functions

 TNodeDistributor (int hypId, int studyId, SMESH_Gen *gen)
virtual const list< const
SMESHDS_Hypothesis * > & 
GetUsedHypothesis (SMESH_Mesh &, const TopoDS_Shape &, const bool)

Private Attributes

list< const SMESHDS_Hypothesis * > myUsedHyps

Detailed Description

Class computing layers distribution using data of StdMeshers_LayerDistribution hypothesis.

Definition at line 301 of file StdMeshers_RadialPrism_3D.cxx.


Constructor & Destructor Documentation

TNodeDistributor::TNodeDistributor ( int  hypId,
int  studyId,
SMESH_Gen *  gen 
) [inline, protected]

Definition at line 350 of file StdMeshers_RadialPrism_3D.cxx.

    : StdMeshers_Regular_1D( hypId, studyId, gen)
  {
  }

Here is the caller graph for this function:


Member Function Documentation

bool TNodeDistributor::Compute ( vector< double > &  positions,
gp_Pnt  pIn,
gp_Pnt  pOut,
SMESH_Mesh &  aMesh,
const StdMeshers_LayerDistribution *  hyp 
) [inline]

Definition at line 316 of file StdMeshers_RadialPrism_3D.cxx.

  {
    double len = pIn.Distance( pOut );
    if ( len <= DBL_MIN ) return error("Too close points of inner and outer shells");

    if ( !hyp || !hyp->GetLayerDistribution() )
      return error( "Invalid LayerDistribution hypothesis");
    myUsedHyps.clear();
    myUsedHyps.push_back( hyp->GetLayerDistribution() );

    TopoDS_Edge edge = BRepBuilderAPI_MakeEdge( pIn, pOut );
    SMESH_Hypothesis::Hypothesis_Status aStatus;
    if ( !StdMeshers_Regular_1D::CheckHypothesis( aMesh, edge, aStatus ))
      return error( "StdMeshers_Regular_1D::CheckHypothesis() failed "
                    "with LayerDistribution hypothesis");

    BRepAdaptor_Curve C3D(edge);
    double f = C3D.FirstParameter(), l = C3D.LastParameter();
    list< double > params;
    if ( !StdMeshers_Regular_1D::computeInternalParameters( aMesh, C3D, len, f, l, params, false ))
      return error("StdMeshers_Regular_1D failed to compute layers distribution");

    positions.clear();
    positions.reserve( params.size() );
    for (list<double>::iterator itU = params.begin(); itU != params.end(); itU++)
      positions.push_back( *itU / len );
    return true;
  }
static TNodeDistributor* TNodeDistributor::GetDistributor ( SMESH_Mesh &  aMesh) [inline, static]

Definition at line 306 of file StdMeshers_RadialPrism_3D.cxx.

  {
    const int myID = -1000;
    map < int, SMESH_1D_Algo * > & algoMap = aMesh.GetGen()->_map1D_Algo;
    map < int, SMESH_1D_Algo * >::iterator id_algo = algoMap.find( myID );
    if ( id_algo == algoMap.end() )
      return new TNodeDistributor( myID, 0, aMesh.GetGen() );
    return static_cast< TNodeDistributor* >( id_algo->second );
  }

Here is the call graph for this function:

virtual const list<const SMESHDS_Hypothesis *>& TNodeDistributor::GetUsedHypothesis ( SMESH_Mesh &  ,
const TopoDS_Shape &  ,
const bool   
) [inline, protected, virtual]

Definition at line 356 of file StdMeshers_RadialPrism_3D.cxx.

  {
    return myUsedHyps;
  }

Member Data Documentation

list<const SMESHDS_Hypothesis *> TNodeDistributor::myUsedHyps [private]

Definition at line 303 of file StdMeshers_RadialPrism_3D.cxx.


The documentation for this class was generated from the following file: