Warning, /include/opencascade/Plate_Plate.lxx is written in an unsupported language. File is not indexed.
0001 // Created on: 1995-10-21
0002 // Created by: Andre LIEUTIER
0003 // Copyright (c) 1995-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 #include <gp_XY.hxx>
0018 #include <gp_XYZ.hxx>
0019
0020 inline double Plate_Plate::Polm(const gp_XY& point2d,
0021 const int iu,
0022 const int iv,
0023 const int idu,
0024 const int idv) const
0025 {
0026 if (idu > iu)
0027 return 0;
0028 if (idv > iv)
0029 return 0;
0030 double u = point2d.X();
0031 double v = point2d.Y();
0032
0033 double value = 1;
0034
0035 int degu = iu - idu;
0036 int i;
0037 for (i = 0; i < degu; i++)
0038 value *= u;
0039 for (i = iu; i > degu; i--)
0040 value *= i;
0041
0042 int degv = iv - idv;
0043 for (i = 0; i < degv; i++)
0044 value *= v;
0045 for (i = iv; i > degv; i--)
0046 value *= i;
0047
0048 // le produit par ddu[iu]*ddv[iv] n'est pas indispensable !! (il change
0049 // les valeurs claculles pour la partie coef polynomiaux de Sol
0050 // de telle facon que les methodes Evaluate et EvaluateDerivative donnent
0051 // en theorie les memes valeurs. Toutefois, il nous semble que ce produit
0052 // ameliore le conditionnmenet de la matrice
0053 return value * ddu[iu] * ddv[iv];
0054 // return value;
0055 }
0056
0057 inline int& Plate_Plate::Deru(const int index) const
0058 {
0059 return ((int*)deru)[index];
0060 }
0061
0062 inline int& Plate_Plate::Derv(const int index) const
0063 {
0064 return ((int*)derv)[index];
0065 }
0066
0067 inline gp_XYZ& Plate_Plate::Solution(const int index) const
0068 {
0069 return ((gp_XYZ*)solution)[index];
0070 }
0071
0072 inline gp_XY& Plate_Plate::Points(const int index) const
0073 {
0074 return ((gp_XY*)points)[index];
0075 }