-// Copyright (c) 1999-2012 OPEN CASCADE SAS
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
+// This file is part of Open CASCADE Technology software library.
//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+// This library is free software; you can redistribute it and / or modify it
+// under the terms of the GNU Lesser General Public version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
// AdvApp2Var_MathBase.cxx
#include <math.h>
/* KEYWORDS : */
/* ----------- */
/* JACOBI, POLYGON, APPROXIMATION, ERROR. */
-/*
+/**/
/* INPUT ARGUMENTS : */
/* ------------------ */
/* NCOFMX : Max. degree of the curve. */
/* GNSTOC: Number of coefficients in the profile of matrix GMATRI */
/* GPOSIT: Table of positioning of terms of storage */
-/* GPOSIT(1,I) contains the number of terms-1 on the line I
+/* GPOSIT(1,I) contains the number of terms-1 on the line I */
/* in the profile of the matrix. */
/* GPOSIT(2,I) contains the index of storage of diagonal term*/
/* of line I */
/* GMATRI : Matrix of constraints in form of profile */
/* VECIN : Input vector */
/* DEBLIG : Line indexusing which the vector matrix is calculated */
-/*
+/**/
/* OUTPUT ARGUMENTS */
/* --------------------- */
/* VECOUT : VECTOR PRODUCT */
integer ndeg, i__, j, nd, ndgcrb, iptpnt, ibb;
-/* ***********************************************************************
+/* *********************************************************************** */
/* FUNCTION : */
/* ---------- */
/* DEMSCRIPTION/NOTES/LIMITATIONS : */
/* ----------------------------------- */
-/* INITIALISATION : profile , **VIA MPRFTX** at input in stream
+/* INITIALISATION : profile , **VIA MPRFTX** at input in stream */
/* loading of default values of the profile in MPRFTX at input */
/* in stream. They are preserved in local variables of MPRFTX */
/* DESCRIPTION/NOTES/LIMITATIONS : */
/* ----------------------------------- */
/* ATTENTION: The condition on NDEGRE ( 2 <= NDEGRE <= 61) is not */
-/* tested. The caller should make the test.
+/* tested. The caller should make the test. */
/* Name of the routine */
/* ---> The max number of coeff by u and v of PATOLD is 61 */
-/* ---> If NCOEFU < NCOFMX, the data is compressed by MMFMCA9 before
+/* ---> If NCOEFU < NCOFMX, the data is compressed by MMFMCA9 before */
/* limitation by v to get time during the execution */
/* of MMARC41 that follows (the square is processed as a curve of
*/
/* OUTPUT ARGUMENTS : */
/* ------------------- */
-/* TABLE2: Table of reals by two dimensions, containing the transposition
+/* TABLE2: Table of reals by two dimensions, containing the transposition */
/* of the rectangular table TABLE1. */
/* ISIZE2: Nb of useful elements of TABLE2 on the 1st dimension */
/* JSIZE2: Nb of useful elements of TABLE2 on the 2nd dimension */
/* between limits XD and XF . */
/* The function should be calculated for any value */
/* of the variable in the given interval.. */
-/* The method GAUSS-LEGENDRE is used.
+/* The method GAUSS-LEGENDRE is used. */
/* For explications refer to the book : */
/* Complements de mathematiques a l'usage des Ingenieurs de */
/* l'electrotechnique et des telecommunications. */
/* If you wish to calculate the integral with a given precision, */
/* loop on k varying from 1 to 10 and test the difference of 2
*/
-/* consecutive iterations. Stop the loop if this difference is less that
+/* consecutive iterations. Stop the loop if this difference is less that */
/* an epsilon value set to 10E-6 for example. */
/* If S1 and S2 are 2 successive iterations, test following this example :
*/
/* FUNCTION : */
/* ---------- */
-/* Used to STORE coefficients of Hermit interpolation polynoms
+/* Used to STORE coefficients of Hermit interpolation polynoms */
/* KEYWORDS : */
/* ----------- */
/* there is no choice : ORDRMX should be equal to the value */
/* of PARAMETER IORDMX of INCLUDE MMCMHER, or 2 for the moment */
-/* IORDRE (2) : Orders of constraints in each corresponding parameter DEBFIN(I)
+/* IORDRE (2) : Orders of constraints in each corresponding parameter DEBFIN(I) */
/* should be between -1 (no constraints) and ORDRMX. */
/* FUNCTION : */
/* ---------- */
-/* Serves to STORE the coefficients of Hermit interpolation polynoms
+/* Serves to STORE the coefficients of Hermit interpolation polynoms */
/* KEYWORDS : */
/* ----------- */
/* . Level of de debug = 3 */
-/*
+/**/
/* DECLARATIONS , CONTROL OF INPUT ARGUMENTS , INITIALIZATION */
/* ***********************************************************************
*/
/* FUNCTION : Length of an arc of curve on a given interval */
/* ---------- for a function the mathematic representation */
/* which of is a multidimensional polynom. */
-/* The polynom is a set of polynoms the coefficients which of are ranked
- /* in a table with 2 indices, each line relative to 1 polynom. */
+/* The polynom is a set of polynoms the coefficients which of are ranked */
+/* in a table with 2 indices, each line relative to 1 polynom. */
/* The polynom is defined by its coefficients ordered by increasing
* power of the variable. */
/* All polynoms have the same number of coefficients (and the same degree). */
{
integer c__2 = 2;
- /* Initialized data */
-
- integer nbcof = -1;
-
/* System generated locals */
integer valjac_dim1, i__1, i__2;
c__2, &i__2));
}
- nbcof = *ncoeff;
-
/* END IF */
/* --- Trivial Positions ----- */
/* NISTOC: NUMBER OF COEFFICIENTS IN THE PROFILE */
/* DIMMAT: NUMBER OF LINE OF THE SYMMETRIC SQUARE MATRIX */
/* APOSIT: TABLE OF POSITIONING OF STORAGE TERMS */
-/* APOSIT(1,I) CONTAINS THE NUMBER OF TERMES-1 ON LINE
+/* APOSIT(1,I) CONTAINS THE NUMBER OF TERMES-1 ON LINE */
/* I IN THE PROFILE OF THE MATRIX */
-/* APOSIT(2,I) CONTAINS THE INDEX OF STORAGE OF DIAGONAL TERM
+/* APOSIT(2,I) CONTAINS THE INDEX OF STORAGE OF DIAGONAL TERM */
/* OF LINE I */
/* GNSTOC: NOMBERS OF TERMS IN THE PROFILE OF THE MATRIX OF CONSTRAINTS */
/* MNSTOC: NOMBERS OF TERMS IN THE PROFILE OF THE MATRIX M= G H t(G) */
/* where H IS THE HESSIAN MATRIX AND G IS THE MATRIX OF CONSTRAINTS */
-/* MATSYH: TRIANGULAR INFERIOR PART OF THE HESSIAN MATRIX
+/* MATSYH: TRIANGULAR INFERIOR PART OF THE HESSIAN MATRIX */
/* IN FORM OF PROFILE */
/* MATSYG: MATRIX OF CONSTRAINTS IN FORM OF PROFILE */
/* VECSYH: VECTOR OF THE SECOND MEMBER ASSOCIATED TO MATSYH */
/* GPOSIT: TABLE OF POSITIONING OF THE MATRIX OF CONSTRAINTS */
/* GPOSIT(1,I) CONTAINS THE NUMBER OF TERMS OF LINE I */
/* WHICH ARE IN THE PROFILE */
-/* GPOSIT(2,I) CONTAINS THE INDEX OF STORAGE OF THE LAST TERM
+/* GPOSIT(2,I) CONTAINS THE INDEX OF STORAGE OF THE LAST TERM */
/* OF LINE I WHICH IS IN THE PROFILE */
/* GPOSIT(3,I) CONTAINS THE NUMBER OF COLUMN CORRESPONDING */
/* TO THE FIRST TERM OF LINE I WHICH IS IN THE PROFILE */
-/* MMPOSUI, MPOSIT: SAME STRUCTURE AS HPOSUI, BUT FOR MATRIX
+/* MMPOSUI, MPOSIT: SAME STRUCTURE AS HPOSUI, BUT FOR MATRIX */
/* M=G H t(G) */
}
goto L9999;
-/* ------If the absolute value of a pivot is smaller than --------
+/* ------If the absolute value of a pivot is smaller than -------- */
/* ---------- EPSPIV: return the code of error. ------------
*/
goto L1000;
-/* -------------- TEST IF TPARAM IS NOT A VALUE ---------
+/* -------------- TEST IF TPARAM IS NOT A VALUE --------- */
/* ------------------------OF TABLEV UP TO EPSIL ----------------------
*/
/* NLIGNE : NUMBER OF LINE OF THE MATRIX */
/* NCOLON : NOMBER OF COLUMN OF THE MATRIX */
/* GPOSIT: TABLE OF POSITIONING OF TERMS OF STORAGE */
-/* GPOSIT(1,I) CONTAINS THE NUMBER of TERMS-1 ON LINE
- I IN THE PROFILE OF THE MATRIX */
-/* GPOSIT(2,I) CONTAINS THE INDEX OF STORAGE OF THE DIAGONAL TERM
+/* GPOSIT(1,I) CONTAINS THE NUMBER of TERMS-1 ON LINE */
+/* I IN THE PROFILE OF THE MATRIX */
+/* GPOSIT(2,I) CONTAINS THE INDEX OF STORAGE OF THE DIAGONAL TERM*/
/* OF LINE I */
-/* GPOSIT(3,I) CONTAINS THE INDEX COLUMN OF THE FIRST TERM OF
+/* GPOSIT(3,I) CONTAINS THE INDEX COLUMN OF THE FIRST TERM OF */
/* PROFILE OF LINE I */
/* GNSTOC : NOMBER OF TERM IN THE PROFILE OF GMATRI */
/* GMATRI : MATRIX OF CONSTRAINTS IN FORM OF PROFILE */
/* OUTPUT ARGUMENTS : */
/* ------------------- */
-/* YCVMAX : Auxiliary table (max error on each dimension).
+/* YCVMAX : Auxiliary table (max error on each dimension). */
/* EPSTRC : Precision of the approximation. */
/* NCFNEW : Degree +1 of the resulting polynom. */
/* ----------------------------------- */
/* VECTOR and VECNRM can be identic. */
-/* The norm of vector is calculated and each component is divided by
+/* The norm of vector is calculated and each component is divided by */
/* this norm. After this it is checked if all componentes of the */
/* vector except for one cost 0 with machine precision. In */
/* this case the quasi-null components are set to 0.D0. */
logical colin;
doublereal valaux;
integer aux;
- logical nul;
/* ***********************************************************************
*/
if (*ndimen <= 1 || *ndimen > 3) {
goto L9101;
}
- nul = FALSE_;
d__ = 1;
aux = 0;
while(d__ <= *ndimen) {
/* to 40 directly (ATTENTION to overload - to avoid it, */
/* preview UROOTL and HILTAB dimensioned at least to 20). */
-/* The value of coefficients was calculated with quadruple precision
+/* The value of coefficients was calculated with quadruple precision */
/* by JJM with help of GD. */
/* Checking of roots was done by GD. */