Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes
FairCurve_Energy Class Referenceabstract

necessary methodes to compute the energy of an FairCurve. More...

#include <FairCurve_Energy.hxx>

Inheritance diagram for FairCurve_Energy:
Inheritance graph
[legend]

Public Member Functions

int NbVariables () const override
 returns the number of variables of the energy.
 
bool Value (const math_Vector &X, double &E) override
 computes the values of the Energys E for the variable <X>. Returns True if the computation was done successfully, False otherwise.
 
bool Gradient (const math_Vector &X, math_Vector &G) override
 computes the gradient <G> of the energys for the variable <X>. Returns True if the computation was done successfully, False otherwise.
 
bool Values (const math_Vector &X, double &E, math_Vector &G) override
 computes the Energy <E> and the gradient <G> of the energy for the variable <X>. Returns True if the computation was done successfully, False otherwise.
 
bool Values (const math_Vector &X, double &E, math_Vector &G, math_Matrix &H) override
 computes the Energy <E>, the gradient <G> and the Hessian <H> of the energy for the variable <X>. Returns True if the computation was done successfully, False otherwise.
 
virtual bool Variable (math_Vector &X) const
 compute the variables <X> which correspond with the field <MyPoles>
 
const occ::handle< NCollection_HArray1< gp_Pnt2d > > & Poles () const
 return the poles
 
- Public Member Functions inherited from math_MultipleVarFunction
virtual int GetStateNumber ()
 return the state of the function corresponding to the latestt call of any methods associated to 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_MultipleVarFunction ()
 

Protected Member Functions

 FairCurve_Energy (const occ::handle< NCollection_HArray1< gp_Pnt2d > > &Poles, const int ConstrOrder1, const int ConstrOrder2, const bool WithAuxValue=false, const double Angle1=0, const double Angle2=0, const int Degree=2, const double Curvature1=0, const double Curvature2=0)
 Angles correspond to the Ox axis ConstrOrder1(2) can be equal to 0, 1 or 2.
 
void Gradient1 (const math_Vector &TheVector, math_Vector &G)
 It is use internally to make the Gradient Vector <G>
 
void Hessian1 (const math_Vector &TheVector, math_Matrix &H)
 It is use internally to make the Hessian Matrix <H>
 
virtual void ComputePoles (const math_Vector &X)
 compute the poles which correspond with the variable X
 
int Indice (const int i, const int j) const
 
void ComputePolesG1 (const int Side, const double Lambda, const gp_Pnt2d &P1, gp_Pnt2d &P2) const
 compute the pole which depend of variables and G1 constraint
 
void ComputePolesG2 (const int Side, const double Lambda, const double Rho, const gp_Pnt2d &P1, gp_Pnt2d &P2) const
 compute the pole which depend of variables and G2 constraint
 
virtual bool Compute (const int DerivativeOrder, math_Vector &Result)=0
 compute the energy (and derivatives) in intermediate format
 

Protected Attributes

occ::handle< NCollection_HArray1< gp_Pnt2d > > MyPoles
 
int MyContrOrder1
 
int MyContrOrder2
 
bool MyWithAuxValue
 
int MyNbVar
 

Detailed Description

necessary methodes to compute the energy of an FairCurve.

Constructor & Destructor Documentation

◆ FairCurve_Energy()

FairCurve_Energy::FairCurve_Energy ( const occ::handle< NCollection_HArray1< gp_Pnt2d > > & Poles,
const int ConstrOrder1,
const int ConstrOrder2,
const bool WithAuxValue = false,
const double Angle1 = 0,
const double Angle2 = 0,
const int Degree = 2,
const double Curvature1 = 0,
const double Curvature2 = 0 )
protected

Angles correspond to the Ox axis ConstrOrder1(2) can be equal to 0, 1 or 2.

Member Function Documentation

◆ Compute()

virtual bool FairCurve_Energy::Compute ( const int DerivativeOrder,
math_Vector & Result )
protectedpure virtual

compute the energy (and derivatives) in intermediate format

Implemented in FairCurve_EnergyOfBatten, and FairCurve_EnergyOfMVC.

◆ ComputePoles()

virtual void FairCurve_Energy::ComputePoles ( const math_Vector & X)
protectedvirtual

compute the poles which correspond with the variable X

Reimplemented in FairCurve_EnergyOfBatten, and FairCurve_EnergyOfMVC.

◆ ComputePolesG1()

void FairCurve_Energy::ComputePolesG1 ( const int Side,
const double Lambda,
const gp_Pnt2d & P1,
gp_Pnt2d & P2 ) const
protected

compute the pole which depend of variables and G1 constraint

◆ ComputePolesG2()

void FairCurve_Energy::ComputePolesG2 ( const int Side,
const double Lambda,
const double Rho,
const gp_Pnt2d & P1,
gp_Pnt2d & P2 ) const
protected

compute the pole which depend of variables and G2 constraint

◆ Gradient()

bool FairCurve_Energy::Gradient ( const math_Vector & X,
math_Vector & G )
overridevirtual

computes the gradient <G> of the energys for the variable <X>. Returns True if the computation was done successfully, False otherwise.

Implements math_MultipleVarFunctionWithHessian.

◆ Gradient1()

void FairCurve_Energy::Gradient1 ( const math_Vector & TheVector,
math_Vector & G )
protected

It is use internally to make the Gradient Vector <G>

◆ Hessian1()

void FairCurve_Energy::Hessian1 ( const math_Vector & TheVector,
math_Matrix & H )
protected

It is use internally to make the Hessian Matrix <H>

◆ Indice()

int FairCurve_Energy::Indice ( const int i,
const int j ) const
protected

◆ NbVariables()

int FairCurve_Energy::NbVariables ( ) const
overridevirtual

returns the number of variables of the energy.

Implements math_MultipleVarFunctionWithHessian.

◆ Poles()

const occ::handle< NCollection_HArray1< gp_Pnt2d > > & FairCurve_Energy::Poles ( ) const

return the poles

◆ Value()

bool FairCurve_Energy::Value ( const math_Vector & X,
double & E )
overridevirtual

computes the values of the Energys E for the variable <X>. Returns True if the computation was done successfully, False otherwise.

Implements math_MultipleVarFunctionWithHessian.

◆ Values() [1/2]

bool FairCurve_Energy::Values ( const math_Vector & X,
double & E,
math_Vector & G )
overridevirtual

computes the Energy <E> and the gradient <G> of the energy for the variable <X>. Returns True if the computation was done successfully, False otherwise.

Implements math_MultipleVarFunctionWithHessian.

◆ Values() [2/2]

bool FairCurve_Energy::Values ( const math_Vector & X,
double & E,
math_Vector & G,
math_Matrix & H )
overridevirtual

computes the Energy <E>, the gradient <G> and the Hessian <H> of the energy for the variable <X>. Returns True if the computation was done successfully, False otherwise.

Implements math_MultipleVarFunctionWithHessian.

◆ Variable()

virtual bool FairCurve_Energy::Variable ( math_Vector & X) const
virtual

compute the variables <X> which correspond with the field <MyPoles>

Reimplemented in FairCurve_EnergyOfBatten, and FairCurve_EnergyOfMVC.

Field Documentation

◆ MyContrOrder1

int FairCurve_Energy::MyContrOrder1
protected

◆ MyContrOrder2

int FairCurve_Energy::MyContrOrder2
protected

◆ MyNbVar

int FairCurve_Energy::MyNbVar
protected

◆ MyPoles

occ::handle<NCollection_HArray1<gp_Pnt2d> > FairCurve_Energy::MyPoles
protected

◆ MyWithAuxValue

bool FairCurve_Energy::MyWithAuxValue
protected

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