Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02: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 <TColStd_HArray1OfReal.hxx>
0027 #include <TColStd_HArray2OfReal.hxx>
0028 #include <AdvApp2Var_EvaluatorFunc2Var.hxx>
0029 #include <TColgp_HArray2OfPnt.hxx>
0030 class AdvApp2Var_Context;
0031 class AdvApp2Var_Framework;
0032 class AdvApp2Var_Criterion;
0033 
0034 
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   
0042   Standard_EXPORT AdvApp2Var_Patch();
0043   
0044   Standard_EXPORT AdvApp2Var_Patch(const Standard_Real U0, const Standard_Real U1, const Standard_Real V0, const Standard_Real V1, const Standard_Integer iu, const Standard_Integer iv);
0045   
0046   Standard_EXPORT Standard_Boolean IsDiscretised() const;
0047   
0048   Standard_EXPORT void Discretise (const AdvApp2Var_Context& Conditions, const AdvApp2Var_Framework& Constraints, const AdvApp2Var_EvaluatorFunc2Var& func);
0049   
0050   Standard_EXPORT Standard_Boolean IsApproximated() const;
0051   
0052   Standard_EXPORT Standard_Boolean HasResult() const;
0053   
0054   Standard_EXPORT void MakeApprox (const AdvApp2Var_Context& Conditions, const AdvApp2Var_Framework& Constraints, const Standard_Integer NumDec);
0055   
0056   Standard_EXPORT void AddConstraints (const AdvApp2Var_Context& Conditions, const AdvApp2Var_Framework& Constraints);
0057   
0058   Standard_EXPORT void AddErrors (const AdvApp2Var_Framework& Constraints);
0059   
0060   Standard_EXPORT void ChangeDomain (const Standard_Real a, const Standard_Real b, const Standard_Real c, const Standard_Real d);
0061   
0062   Standard_EXPORT void ResetApprox();
0063   
0064   Standard_EXPORT void OverwriteApprox();
0065   
0066   Standard_EXPORT Standard_Real U0() const;
0067   
0068   Standard_EXPORT Standard_Real U1() const;
0069   
0070   Standard_EXPORT Standard_Real V0() const;
0071   
0072   Standard_EXPORT Standard_Real V1() const;
0073   
0074   Standard_EXPORT Standard_Integer UOrder() const;
0075   
0076   Standard_EXPORT Standard_Integer VOrder() const;
0077   
0078   Standard_EXPORT Standard_Integer CutSense() const;
0079   
0080   Standard_EXPORT Standard_Integer CutSense (const AdvApp2Var_Criterion& Crit, const Standard_Integer NumDec) const;
0081   
0082   Standard_EXPORT Standard_Integer NbCoeffInU() const;
0083   
0084   Standard_EXPORT Standard_Integer NbCoeffInV() const;
0085   
0086   Standard_EXPORT void ChangeNbCoeff (const Standard_Integer NbCoeffU, const Standard_Integer NbCoeffV);
0087   
0088   Standard_EXPORT Handle(TColgp_HArray2OfPnt) Poles (const Standard_Integer SSPIndex, const AdvApp2Var_Context& Conditions) const;
0089   
0090   Standard_EXPORT Handle(TColStd_HArray1OfReal) Coefficients (const Standard_Integer SSPIndex, const AdvApp2Var_Context& Conditions) const;
0091   
0092   Standard_EXPORT Handle(TColStd_HArray1OfReal) MaxErrors() const;
0093   
0094   Standard_EXPORT Handle(TColStd_HArray1OfReal) AverageErrors() const;
0095   
0096   Standard_EXPORT Handle(TColStd_HArray2OfReal) IsoErrors() const;
0097   
0098   Standard_EXPORT Standard_Real CritValue() const;
0099   
0100   Standard_EXPORT void SetCritValue (const Standard_Real dist);
0101 
0102 private:
0103 
0104   AdvApp2Var_Patch(const AdvApp2Var_Patch& P);
0105   AdvApp2Var_Patch& operator= (const AdvApp2Var_Patch& theOther);
0106 
0107 private:
0108 
0109   Standard_Real myU0;
0110   Standard_Real myU1;
0111   Standard_Real myV0;
0112   Standard_Real myV1;
0113   Standard_Integer myOrdInU;
0114   Standard_Integer myOrdInV;
0115   Standard_Integer myNbCoeffInU;
0116   Standard_Integer myNbCoeffInV;
0117   Standard_Boolean myApprIsDone;
0118   Standard_Boolean myHasResult;
0119   Handle(TColStd_HArray1OfReal) myEquation;
0120   Handle(TColStd_HArray1OfReal) myMaxErrors;
0121   Handle(TColStd_HArray1OfReal) myMoyErrors;
0122   Handle(TColStd_HArray2OfReal) myIsoErrors;
0123   Standard_Integer myCutSense;
0124   Standard_Boolean myDiscIsDone;
0125   Handle(TColStd_HArray1OfReal) mySosoTab;
0126   Handle(TColStd_HArray1OfReal) myDisoTab;
0127   Handle(TColStd_HArray1OfReal) mySodiTab;
0128   Handle(TColStd_HArray1OfReal) myDidiTab;
0129   Standard_Real myCritValue;
0130 
0131 
0132 };
0133 
0134 
0135 
0136 
0137 
0138 
0139 
0140 #endif // _AdvApp2Var_Patch_HeaderFile