Open CASCADE Technology 7.7.2
Public Member Functions
Extrema_FuncPSNorm Class Reference

Functional for search of extremum of the distance between point P and surface S, starting from approximate solution (u0, v0). More...

#include <Extrema_FuncPSNorm.hxx>

Inheritance diagram for Extrema_FuncPSNorm:
Inheritance graph
[legend]

Public Member Functions

 Extrema_FuncPSNorm ()
 
 Extrema_FuncPSNorm (const gp_Pnt &P, const Adaptor3d_Surface &S)
 
void Initialize (const Adaptor3d_Surface &S)
 sets the field mysurf of the function.
 
void SetPoint (const gp_Pnt &P)
 sets the field mysurf of the function.
 
Standard_Integer NbVariables () const override
 Returns the number of variables of the function.
 
Standard_Integer NbEquations () const override
 Returns the number of equations of the function.
 
Standard_Boolean Value (const math_Vector &UV, math_Vector &F) override
 Calculate Fi(U,V).
 
Standard_Boolean Derivatives (const math_Vector &UV, math_Matrix &DF) override
 Calculate Fi'(U,V).
 
Standard_Boolean Values (const math_Vector &UV, math_Vector &F, math_Matrix &DF) override
 Calculate Fi(U,V) and Fi'(U,V).
 
virtual Standard_Integer GetStateNumber () override
 Save the found extremum.
 
Standard_Integer NbExt () const
 Return the number of found extrema.
 
Standard_Real SquareDistance (const Standard_Integer N) const
 Return the value of the Nth distance.
 
const Extrema_POnSurfPoint (const Standard_Integer N) const
 Returns the Nth extremum.
 
virtual Standard_Integer NbVariables () const =0
 Returns the number of variables of the function.
 
virtual Standard_Integer NbEquations () const =0
 Returns the number of equations of the function.
 
virtual Standard_Boolean Value (const math_Vector &X, math_Vector &F)=0
 Computes the values <F> of the Functions for the variable <X>. Returns True if the computation was done successfully, False otherwise.
 
virtual Standard_Boolean Derivatives (const math_Vector &X, math_Matrix &D)=0
 Returns the values <D> of the derivatives for the variable <X>. Returns True if the computation was done successfully, False otherwise.
 
virtual Standard_Boolean Values (const math_Vector &X, math_Vector &F, math_Matrix &D)=0
 returns the values <F> of the functions and the derivatives <D> for the variable <X>. Returns True if the computation was done successfully, False otherwise.
 
- Public Member Functions inherited from math_FunctionSet
virtual Standard_Integer NbVariables () const =0
 Returns the number of variables of the function.
 
virtual Standard_Integer NbEquations () const =0
 Returns the number of equations of the function.
 
virtual Standard_Boolean Value (const math_Vector &X, math_Vector &F)=0
 Computes the values <F> of the functions for the variable <X>. returns True if the computation was done successfully, False otherwise.
 
virtual Standard_Integer GetStateNumber ()
 Returns the state of the function corresponding to the latestcall of any methods associated with the function. This function is called by each of the algorithms described later which define the function Integer Algorithm::StateNumber(). The algorithm has the responsibility to call this function when it has found a solution (i.e. a root or a minimum) and has to maintain the association between the solution found and this StateNumber. Byu default, this method returns 0 (which means for the algorithm: no state has been saved). It is the responsibility of the programmer to decide if he needs to save the current state of the function and to return an Integer that allows retrieval of the state.
 
virtual ~math_FunctionSet ()
 

Detailed Description

Functional for search of extremum of the distance between point P and surface S, starting from approximate solution (u0, v0).

The class inherits math_FunctionSetWithDerivatives and thus is intended for use in math_FunctionSetRoot algorithm .

Denoting derivatives of the surface S(u,v) by u and v, respectively, as Su and Sv, the two functions to be nullified are:

F1(u,v) = (S - P) * Su F2(u,v) = (S - P) * Sv

The derivatives of the functional are:

Duf1(u,v) = Su^2 + (S-P) * Suu; Dvf1(u,v) = Su * Sv + (S-P) * Suv Duf2(u,v) = Sv * Su + (S-P) * Suv = Dvf1 Dvf2(u,v) = Sv^2 + (S-P) * Svv

Here * denotes scalar product, and ^2 is square power.

Constructor & Destructor Documentation

◆ Extrema_FuncPSNorm() [1/2]

Extrema_FuncPSNorm::Extrema_FuncPSNorm ( )

◆ Extrema_FuncPSNorm() [2/2]

Extrema_FuncPSNorm::Extrema_FuncPSNorm ( const gp_Pnt P,
const Adaptor3d_Surface S 
)

Member Function Documentation

◆ Derivatives()

Standard_Boolean Extrema_FuncPSNorm::Derivatives ( const math_Vector UV,
math_Matrix DF 
)
overridevirtual

Calculate Fi'(U,V).

Implements math_FunctionSetWithDerivatives.

◆ GetStateNumber()

virtual Standard_Integer Extrema_FuncPSNorm::GetStateNumber ( )
overridevirtual

Save the found extremum.

Reimplemented from math_FunctionSet.

◆ Initialize()

void Extrema_FuncPSNorm::Initialize ( const Adaptor3d_Surface S)

sets the field mysurf of the function.

◆ NbEquations()

Standard_Integer Extrema_FuncPSNorm::NbEquations ( ) const
overridevirtual

Returns the number of equations of the function.

Implements math_FunctionSetWithDerivatives.

◆ NbExt()

Standard_Integer Extrema_FuncPSNorm::NbExt ( ) const

Return the number of found extrema.

◆ NbVariables()

Standard_Integer Extrema_FuncPSNorm::NbVariables ( ) const
overridevirtual

Returns the number of variables of the function.

Implements math_FunctionSetWithDerivatives.

◆ Point()

const Extrema_POnSurf & Extrema_FuncPSNorm::Point ( const Standard_Integer  N) const

Returns the Nth extremum.

◆ SetPoint()

void Extrema_FuncPSNorm::SetPoint ( const gp_Pnt P)

sets the field mysurf of the function.

◆ SquareDistance()

Standard_Real Extrema_FuncPSNorm::SquareDistance ( const Standard_Integer  N) const

Return the value of the Nth distance.

◆ Value()

Standard_Boolean Extrema_FuncPSNorm::Value ( const math_Vector UV,
math_Vector F 
)
overridevirtual

Calculate Fi(U,V).

Implements math_FunctionSetWithDerivatives.

◆ Values()

Standard_Boolean Extrema_FuncPSNorm::Values ( const math_Vector UV,
math_Vector F,
math_Matrix DF 
)
overridevirtual

Calculate Fi(U,V) and Fi'(U,V).

Implements math_FunctionSetWithDerivatives.


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