Version: 6.3.1
Public Member Functions | Static Public Member Functions | Protected Attributes

SMESH.Controls.NumericalFunctor Class Reference

#include <SMESH_ControlsDef.hxx>

Inheritance diagram for SMESH.Controls.NumericalFunctor:
Inheritance graph
[legend]

Public Member Functions

 NumericalFunctor ()
virtual void SetMesh (const SMDS_Mesh *theMesh)
virtual double GetValue (long theElementId)
virtual double GetValue (const TSequenceOfXYZ &thePoints)
void GetHistogram (int nbIntervals, std::vector< int > &nbEvents, std::vector< double > &funValues, const std::vector< int > &elements, const double *minmax=0)
virtual SMDSAbs_ElementType GetType () const =0
virtual double GetBadRate (double Value, int nbNodes) const =0
long GetPrecision () const
void SetPrecision (const long thePrecision)
double Round (const double &value)
bool GetPoints (const int theId, TSequenceOfXYZ &theRes) const

Static Public Member Functions

static bool GetPoints (const SMDS_MeshElement *theElem, TSequenceOfXYZ &theRes)

Protected Attributes

const SMDS_MeshmyMesh
const SMDS_MeshElementmyCurrElement
long myPrecision
double myPrecisionValue

Detailed Description

Definition at line 124 of file SMESH_ControlsDef.hxx.


Constructor & Destructor Documentation

NumericalFunctor::NumericalFunctor ( )

Definition at line 217 of file SMESH_Controls.cxx.

References SMESH.Controls.NumericalFunctor.myPrecision.

                                  :
  myMesh(NULL)
{
  myPrecision = -1;
}

Member Function Documentation

virtual double SMESH.Controls.NumericalFunctor.GetBadRate ( double  Value,
int  nbNodes 
) const [pure virtual]
void SMESH.Controls.NumericalFunctor.GetHistogram ( int  nbIntervals,
std::vector< int > &  nbEvents,
std::vector< double > &  funValues,
const std::vector< int > &  elements,
const double *  minmax = 0 
)

Referenced by SaveDistribution().

bool NumericalFunctor::GetPoints ( const int  theId,
TSequenceOfXYZ theRes 
) const
bool NumericalFunctor::GetPoints ( const SMDS_MeshElement theElem,
TSequenceOfXYZ theRes 
) [static]

Definition at line 239 of file SMESH_Controls.cxx.

References SMESH.Controls.TSequenceOfXYZ.clear(), SMDS_MeshElement.GetType(), SMDS_MeshElement.IsQuadratic(), SMDS_MeshElement.NbNodes(), SMDS_MeshElement.nodesIterator(), SMESH.Controls.TSequenceOfXYZ.push_back(), SMESH.Controls.TSequenceOfXYZ.reserve(), SMDSAbs_Edge, SMDSAbs_Face, SMDS_MeshNode.X(), SMDS_MeshNode.Y(), and SMDS_MeshNode.Z().

{
  theRes.clear();

  if ( anElem == 0)
    return false;

  theRes.reserve( anElem->NbNodes() );

  // Get nodes of the element
  SMDS_ElemIteratorPtr anIter;

  if ( anElem->IsQuadratic() ) {
    switch ( anElem->GetType() ) {
    case SMDSAbs_Edge:
      anIter = dynamic_cast<const SMDS_VtkEdge*>
        (anElem)->interlacedNodesElemIterator();
      break;
    case SMDSAbs_Face:
      anIter = dynamic_cast<const SMDS_VtkFace*>
        (anElem)->interlacedNodesElemIterator();
      break;
    default:
      anIter = anElem->nodesIterator();
      //return false;
    }
  }
  else {
    anIter = anElem->nodesIterator();
  }

  if ( anIter ) {
    while( anIter->more() ) {
      if ( const SMDS_MeshNode* aNode = static_cast<const SMDS_MeshNode*>( anIter->next() ))
        theRes.push_back( gp_XYZ( aNode->X(), aNode->Y(), aNode->Z() ) );
    }
  }

  return true;
}
long NumericalFunctor::GetPrecision ( ) const

Definition at line 281 of file SMESH_Controls.cxx.

References SMESH.Controls.NumericalFunctor.myPrecision.

{
  return myPrecision;
}
virtual SMDSAbs_ElementType SMESH.Controls.NumericalFunctor.GetType ( ) const [pure virtual]
double NumericalFunctor::GetValue ( long  theElementId) [virtual]
virtual double SMESH.Controls.NumericalFunctor.GetValue ( const TSequenceOfXYZ thePoints) [virtual]
double NumericalFunctor::Round ( const double &  value)
void NumericalFunctor::SetMesh ( const SMDS_Mesh theMesh) [virtual]

Implements SMESH.Controls.Functor.

Definition at line 223 of file SMESH_Controls.cxx.

References SMESH.Controls.NumericalFunctor.myMesh.

{
  myMesh = theMesh;
}
void NumericalFunctor::SetPrecision ( const long  thePrecision)

Field Documentation

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS