Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-25 09:18:53

0001 // Created on: 1996-04-10
0002 // Created by: Joelle CHAUVET
0003 // Copyright (c) 1996-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _AdvApp2Var_Patch_HeaderFile
0018 #define _AdvApp2Var_Patch_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Integer.hxx>
0025 #include <Standard_Boolean.hxx>
0026 #include <NCollection_Array1.hxx>
0027 #include <NCollection_HArray1.hxx>
0028 #include <NCollection_Array2.hxx>
0029 #include <NCollection_HArray2.hxx>
0030 #include <AdvApp2Var_EvaluatorFunc2Var.hxx>
0031 #include <gp_Pnt.hxx>
0032 class AdvApp2Var_Context;
0033 class AdvApp2Var_Framework;
0034 class AdvApp2Var_Criterion;
0035 
0036 //! used to store results on a domain [Ui,Ui+1]x[Vj,Vj+1]
0037 class AdvApp2Var_Patch : public Standard_Transient
0038 {
0039   DEFINE_STANDARD_RTTIEXT(AdvApp2Var_Patch, Standard_Transient)
0040 public:
0041   Standard_EXPORT AdvApp2Var_Patch();
0042 
0043   Standard_EXPORT AdvApp2Var_Patch(const double U0,
0044                                    const double U1,
0045                                    const double V0,
0046                                    const double V1,
0047                                    const int    iu,
0048                                    const int    iv);
0049 
0050   Standard_EXPORT bool IsDiscretised() const;
0051 
0052   Standard_EXPORT void Discretise(const AdvApp2Var_Context&           Conditions,
0053                                   const AdvApp2Var_Framework&         Constraints,
0054                                   const AdvApp2Var_EvaluatorFunc2Var& func);
0055 
0056   Standard_EXPORT bool IsApproximated() const;
0057 
0058   Standard_EXPORT bool HasResult() const;
0059 
0060   Standard_EXPORT void MakeApprox(const AdvApp2Var_Context&   Conditions,
0061                                   const AdvApp2Var_Framework& Constraints,
0062                                   const int                   NumDec);
0063 
0064   Standard_EXPORT void AddConstraints(const AdvApp2Var_Context&   Conditions,
0065                                       const AdvApp2Var_Framework& Constraints);
0066 
0067   Standard_EXPORT void AddErrors(const AdvApp2Var_Framework& Constraints);
0068 
0069   Standard_EXPORT void ChangeDomain(const double a, const double b, const double c, const double d);
0070 
0071   Standard_EXPORT void ResetApprox();
0072 
0073   Standard_EXPORT void OverwriteApprox();
0074 
0075   Standard_EXPORT double U0() const;
0076 
0077   Standard_EXPORT double U1() const;
0078 
0079   Standard_EXPORT double V0() const;
0080 
0081   Standard_EXPORT double V1() const;
0082 
0083   Standard_EXPORT int UOrder() const;
0084 
0085   Standard_EXPORT int VOrder() const;
0086 
0087   Standard_EXPORT int CutSense() const;
0088 
0089   Standard_EXPORT int CutSense(const AdvApp2Var_Criterion& Crit, const int NumDec) const;
0090 
0091   Standard_EXPORT int NbCoeffInU() const;
0092 
0093   Standard_EXPORT int NbCoeffInV() const;
0094 
0095   Standard_EXPORT void ChangeNbCoeff(const int NbCoeffU, const int NbCoeffV);
0096 
0097   Standard_EXPORT occ::handle<NCollection_HArray2<gp_Pnt>> Poles(
0098     const int                 SSPIndex,
0099     const AdvApp2Var_Context& Conditions) const;
0100 
0101   Standard_EXPORT occ::handle<NCollection_HArray1<double>> Coefficients(
0102     const int                 SSPIndex,
0103     const AdvApp2Var_Context& Conditions) const;
0104 
0105   Standard_EXPORT occ::handle<NCollection_HArray1<double>> MaxErrors() const;
0106 
0107   Standard_EXPORT occ::handle<NCollection_HArray1<double>> AverageErrors() const;
0108 
0109   Standard_EXPORT occ::handle<NCollection_HArray2<double>> IsoErrors() const;
0110 
0111   Standard_EXPORT double CritValue() const;
0112 
0113   Standard_EXPORT void SetCritValue(const double dist);
0114 
0115 private:
0116   AdvApp2Var_Patch(const AdvApp2Var_Patch& P)                   = delete;
0117   AdvApp2Var_Patch& operator=(const AdvApp2Var_Patch& theOther) = delete;
0118 
0119 private:
0120   double                                   myU0;
0121   double                                   myU1;
0122   double                                   myV0;
0123   double                                   myV1;
0124   int                                      myOrdInU;
0125   int                                      myOrdInV;
0126   int                                      myNbCoeffInU;
0127   int                                      myNbCoeffInV;
0128   bool                                     myApprIsDone;
0129   bool                                     myHasResult;
0130   occ::handle<NCollection_HArray1<double>> myEquation;
0131   occ::handle<NCollection_HArray1<double>> myMaxErrors;
0132   occ::handle<NCollection_HArray1<double>> myMoyErrors;
0133   occ::handle<NCollection_HArray2<double>> myIsoErrors;
0134   int                                      myCutSense;
0135   bool                                     myDiscIsDone;
0136   occ::handle<NCollection_HArray1<double>> mySosoTab;
0137   occ::handle<NCollection_HArray1<double>> myDisoTab;
0138   occ::handle<NCollection_HArray1<double>> mySodiTab;
0139   occ::handle<NCollection_HArray1<double>> myDidiTab;
0140   double                                   myCritValue;
0141 };
0142 
0143 #endif // _AdvApp2Var_Patch_HeaderFile