+// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
-// AdvApp2Var_ApproxF2var.cxx
+// This file is part of Open CASCADE Technology software library.
//
-#include <math.h>
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License 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.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
#include <AdvApp2Var_SysBase.hxx>
#include <AdvApp2Var_MathBase.hxx>
#include <AdvApp2Var_Data_f2c.hxx>
#include <AdvApp2Var_Data.hxx>
#include <AdvApp2Var_ApproxF2var.hxx>
+#include <cmath>
static
int mmjacpt_(const integer *ndimen,
doublereal *hermit,
integer *iercod)
{
- static integer c__1 = 1;
+ integer c__1 = 1;
/* System generated locals */
integer contr1_dim1, contr1_offset, contr2_dim1, contr2_offset,
i__2, i__3;
/* Local variables */
- static integer nroo2, ncfhe, nd, ii, kk;
- static integer ibb, kkm, kkp;
- static doublereal bid1, bid2, bid3;
+ integer nroo2, ncfhe, nd, ii, kk;
+ integer ibb, kkm, kkp;
+ doublereal bid1, bid2, bid3 = 0.;
/* **********************************************************************
*/
i__2, i__3;
/* Local variables */
- static integer nd, ii, jj, ibb;
- static doublereal bid;
+ integer nd, ii, jj, ibb;
+ doublereal bid;
/* ***********************************************************************
doublereal d__1;
/* Local variables */
- static integer ideb, ifin, nroo2, ideru, iderv;
- static doublereal renor;
- static integer ii, nd, ibb, iim, nbp, iip;
- static doublereal bid1, bid2;
+ integer ideb, ifin, nroo2, ideru, iderv;
+ doublereal renor;
+ integer ii, nd, ibb, iim, nbp, iip;
+ doublereal bid1, bid2;
/* **********************************************************************
*/
/* ---------------------- Legendre polynom of degree NBROOT -------------------
*/
- foncnp.Evaluate (ndimen,
+ (*const_cast <AdvApp2Var_EvaluatorFunc2Var*> (&foncnp)).Evaluate (ndimen,
&uvfonc[3],
&uvfonc[5],
isofav,
bid1 = (uvfonc[6] - uvfonc[5]) / 2.;
i__1 = *iordre;
for (iderv = 1; iderv <= i__1; ++iderv) {
- foncnp.Evaluate (ndimen, &uvfonc[3], &uvfonc[5], isofav, tconst,
- &nbp, ttable, &ideru, &iderv, &contr1[(iderv + 1) *
+ (*const_cast <AdvApp2Var_EvaluatorFunc2Var*> (&foncnp)).Evaluate (
+ ndimen, &uvfonc[3], &uvfonc[5], isofav, tconst, &
+ nbp, ttable, &ideru, &iderv, &contr1[(iderv + 1) *
contr1_dim1 + 1], iercod);
if (*iercod > 0) {
goto L9999;
}
i__1 = *iordre;
for (iderv = 1; iderv <= i__1; ++iderv) {
- foncnp.Evaluate (ndimen, &uvfonc[3], &uvfonc[5], isofav, tconst,
- &nbp, &ttable[*nbroot + 1], &ideru, &iderv, &contr2[(
+ (*const_cast <AdvApp2Var_EvaluatorFunc2Var*> (&foncnp)).Evaluate (
+ ndimen, &uvfonc[3], &uvfonc[5], isofav, tconst, &
+ nbp, &ttable[*nbroot + 1], &ideru, &iderv, &contr2[(
iderv + 1) * contr2_dim1 + 1], iercod);
if (*iercod > 0) {
goto L9999;
bid1 = (uvfonc[4] - uvfonc[3]) / 2.;
i__1 = *iordre;
for (ideru = 1; ideru <= i__1; ++ideru) {
- foncnp.Evaluate (ndimen, &uvfonc[3], &uvfonc[5], isofav, tconst,
- &nbp, ttable, &ideru, &iderv, &contr1[(ideru + 1) *
+ (*const_cast <AdvApp2Var_EvaluatorFunc2Var*> (&foncnp)).Evaluate (
+ ndimen, &uvfonc[3], &uvfonc[5], isofav, tconst, &
+ nbp, ttable, &ideru, &iderv, &contr1[(ideru + 1) *
contr1_dim1 + 1], iercod);
if (*iercod > 0) {
goto L9999;
}
i__1 = *iordre;
for (ideru = 1; ideru <= i__1; ++ideru) {
- foncnp.Evaluate (ndimen, &uvfonc[3], &uvfonc[5], isofav, tconst,
- &nbp, &ttable[*nbroot + 1], &ideru, &iderv, &contr2[(
+ (*const_cast <AdvApp2Var_EvaluatorFunc2Var*> (&foncnp)).Evaluate (
+ ndimen, &uvfonc[3], &uvfonc[5], isofav, tconst, &
+ nbp, &ttable[*nbroot + 1], &ideru, &iderv, &contr2[(
ideru + 1) * contr2_dim1 + 1], iercod);
if (*iercod > 0) {
goto L9999;
integer crvjac_dim1, crvjac_offset, i__1, i__2;
/* Local variables */
- static integer idim, ncfja, ncfnw, ndses, ii, kk, ibb, ier;
- static integer nbr0;
+ integer idim, ncfja, ncfnw, ndses, ii, kk, ibb, ier;
+ integer nbr0;
/* ***********************************************************************
/* 0 = constraints of passage to limits (i.e. C0), */
/* 1 = C0 + constraintes of 1st derivatives (i.e. C1), */
/* 2 = C1 + constraintes of 2nd derivatives (i.e. C2). */
-/* NDGJAC: Degree of development in series to use for the calculation
+/* NDGJAC: Degree of development in series to use for the calculation */
/* in the base of Jacobi. */
/* CRVJAC: Table of coeff. of the curve of approximation in the */
/* base of Jacobi. */
/* =-1, warning, required tolerance can't be */
/* met with coefficients NFCLIM. */
/* = 1, order of constraints (IORDRE) is not within authorised values */
-/*
+
/* COMMONS USED : */
/* ------------------ */
i__2 = ndses;
for (kk = 1; kk <= i__2; ++kk) {
AdvApp2Var_SysBase::mvriraz_(&nbr0,
- (char *)&crvjac[ncfnw + (idim + kk - 1) * crvjac_dim1]);
+ &crvjac[ncfnw + (idim + kk - 1) * crvjac_dim1]);
/* L200: */
}
}
integer hermit_dim1, hermit_offset;
/* Local variables */
- static integer ibb;
+ integer ibb;
/* DESCRIPTION/NOTES/LIMITATIONS : */
/* ----------------------------------- */
-/* The part of HERMIT(*,2*i+j) table where j=1 or 2 and i=0 to IORDRE,
+/* The part of HERMIT(*,2*i+j) table where j=1 or 2 and i=0 to IORDRE, */
/* contains the coefficients of the polynom of degree 2*IORDRE+1 */
/* such as ALL values in -1 and in +1 of this polynom and its */
/* derivatives till order of derivation IORDRE are NULL, */
{
/* System generated locals */
integer somtab_dim1, somtab_offset, diftab_dim1, diftab_offset,
- crvjac_dim1, crvjac_offset, cgauss_dim1;
+ crvjac_dim1, crvjac_offset;
/* Local variables */
- static integer ibb;
+ integer ibb;
/* **********************************************************************
*/
/* ------------------ */
/* NDIMEN: Total dimension of the space (sum of dimensions */
/* of sub-spaces) */
-/* NBROOT: Nb of points of discretization of the iso, extremities not
+/* NBROOT: Nb of points of discretization of the iso, extremities not */
/* included. */
/* IORDRE: Order of constraint at the extremities of the boundary */
/* -1 = no constraints, */
/* 0 = constraints of passage of limits (i.e. C0), */
/* 1 = C0 + constraints of 1st derivatives (i.e. C1), */
/* 2 = C1 + constraints of 2nd derivatives (i.e. C2). */
-/* NDGJAC: Degree of development in series to be used for calculation in the
+/* NDGJAC: Degree of development in series to be used for calculation in the */
/* base of Jacobi. */
/* OUTPUT ARGUMENTS : */
crvjac_dim1 = *ndgjac + 1;
crvjac_offset = crvjac_dim1;
crvjac -= crvjac_offset;
- cgauss_dim1 = *nbroot / 2 + 1;
/* Function Body */
ibb = AdvApp2Var_SysBase::mnfndeb_();
doublereal d__1;
/* Local variables */
- static doublereal rider, riord;
- static integer nd, ibb;
- static doublereal bid;
+ doublereal rider, riord;
+ integer nd, ibb;
+ doublereal bid;
/* **********************************************************************
*/
integer i__1;
/* Local variables */
- static doublereal alinu, blinu, alinv, blinv;
- static integer ii, ibb;
+ doublereal alinu, blinu, alinv, blinv;
+ integer ii, ibb;
/* ***********************************************************************
*/
patjac_dim2, patjac_offset, i__1, i__2, i__3, i__4, i__5;
/* Local variables */
- static logical ldbg;
- static integer ndgu, ndgv;
- static doublereal bidu1, bidu2, bidv1, bidv2;
- static integer ioru1, iorv1, ii, nd, jj, ku, kv;
- static doublereal cnt1, cnt2, cnt3, cnt4;
+ logical ldbg;
+ integer ndgu, ndgv;
+ doublereal bidu1, bidu2, bidv1, bidv2;
+ integer ioru1, iorv1, ii, nd, jj, ku, kv;
+ doublereal cnt1, cnt2, cnt3, cnt4;
/* **********************************************************************
*/
vhermt_dim1, vhermt_offset, i__1, i__2, i__3, i__4;
/* Local variables */
- static logical ldbg;
- static integer ndgv1, ndgv2, ii, jj, nd, kk;
- static doublereal bid1, bid2;
+ logical ldbg;
+ integer ndgv1, ndgv2, ii, jj, nd, kk;
+ doublereal bid1, bid2;
/* **********************************************************************
*/
/* ------------------- */
/* PATJAC: Table of coefficients of the polynom P(u,v) by approximation */
/* of F(u,v) WITH taking into account of constraints. */
-/* > *//*
+/* > */
/* > */
uhermt_dim1, uhermt_offset, i__1, i__2, i__3, i__4;
/* Local variables */
- static logical ldbg;
- static integer ndgu1, ndgu2, ii, jj, nd, kk;
- static doublereal bid1, bid2;
+ logical ldbg;
+ integer ndgu1, ndgu2, ii, jj, nd, kk;
+ doublereal bid1, bid2;
/* **********************************************************************
*/
patcan_offset, i__1, i__2;
/* Local variables */
- static logical ldbg;
- static integer ilon1, ilon2, ii, nd;
+ logical ldbg;
+ integer ilon1, ilon2, ii, nd;
/* **********************************************************************
*/
pataux[1], &patcan[patcan_offset]);
/* --> Write all in a greater table */
- AdvApp2Var_MathBase::mmfmca8_((integer *)ncoefu,
- (integer *)ncoefv,
- (integer *)ndimen,
- (integer *)ncfmxu,
- (integer *)ncfmxv,
- (integer *)ndimen,
- (doublereal *)&patcan[patcan_offset],
- (doublereal *)&patcan[patcan_offset]);
+ AdvApp2Var_MathBase::mmfmca8_(ncoefu,
+ ncoefv,
+ ndimen,
+ ncfmxu,
+ ncfmxv,
+ ndimen,
+ &patcan[patcan_offset],
+ &patcan[patcan_offset]);
/* --> Complete with zeros the resulting table. */
ilon1 = *ncfmxu - *ncoefu;
i__2 = *ncoefv;
for (ii = 1; ii <= i__2; ++ii) {
AdvApp2Var_SysBase::mvriraz_(&ilon1,
- (char *)&patcan[*ncoefu + 1 + (ii + nd * patcan_dim2) * patcan_dim1]);
+ &patcan[*ncoefu + 1 + (ii + nd * patcan_dim2) * patcan_dim1]);
/* L110: */
}
}
if (ilon2 > 0) {
AdvApp2Var_SysBase::mvriraz_(&ilon2,
- (char *)&patcan[(*ncoefv + 1 + nd * patcan_dim2) * patcan_dim1 + 1]);
+ &patcan[(*ncoefv + 1 + nd * patcan_dim2) * patcan_dim1 + 1]);
}
/* L100: */
}
doublereal *diditb)
{
- static integer c__1 = 1;
+ integer c__1 = 1;
/* System generated locals */
integer contr1_dim1, contr1_dim2, contr1_offset, contr2_dim1, contr2_dim2,
i__5;
/* Local variables */
- static integer ncfhu, ncfhv, nuroo, nvroo, nd, ii, jj, kk, ll, ibb, kkm,
+ integer ncfhu, ncfhv, nuroo, nvroo, nd, ii, jj, kk, ll, ibb, kkm,
llm, kkp, llp;
- static doublereal bid1, bid2, bid3, bid4;
- static doublereal diu1, diu2, div1, div2, sou1, sou2, sov1, sov2;
+ doublereal bid1, bid2, bid3, bid4;
+ doublereal diu1, diu2, div1, div2, sou1, sou2, sov1, sov2;
/* **********************************************************************
*/
*/
/* NBPNTV: Nb of INTERNAL parameters of discretisation by V. */
/* This is also the nb of root of Legendre polynom where discretization is done. */
-/* VROOTL: Table of discretization parameters on (-1,1) by V.
+/* VROOTL: Table of discretization parameters on (-1,1) by V. */
/* IORDRU: Order of constraint imposed at the extremities of iso-V */
/* = 0, calculate the extremities of iso-V */
/* = 1, calculate, additionally, the 1st derivative in the direction of iso-V */
doublereal *diditb)
{
- static integer c__1 = 1;
+ integer c__1 = 1;
/* System generated locals */
integer sotbv1_dim1, sotbv1_dim2, sotbv1_offset, sotbv2_dim1, sotbv2_dim2,
sotbv2_offset, ditbv1_dim1, ditbv1_dim2, ditbv1_offset,
disotb_dim1, disotb_dim2, disotb_offset, i__1, i__2, i__3, i__4;
/* Local variables */
- static integer ncfhv, nuroo, nvroo, ii, nd, jj, kk, ibb, jjm, jjp;
- static doublereal bid1, bid2, bid3, bid4;
+ integer ncfhv, nuroo, nvroo, ii, nd, jj, kk, ibb, jjm, jjp;
+ doublereal bid1, bid2, bid3, bid4;
/* **********************************************************************
*/
*/
/* NBPNTV: Nb of INTERNAL parameters of discretisation by V. */
/* This is also the nb of root of Legendre polynom where discretization is done. */
-/* VROOTL: Table of discretization parameters on (-1,1) by V.
+/* VROOTL: Table of discretization parameters on (-1,1) by V. */
/* IORDRV: Order of constraint imposed at the extremities of iso-V */
/* = 0, calculate the extremities of iso-V */
/* = 1, calculate, additionally, the 1st derivative in the direction of iso-V */
doublereal *diditb)
{
- static integer c__1 = 1;
+ integer c__1 = 1;
/* System generated locals */
integer sotbu1_dim1, sotbu1_dim2, sotbu1_offset, sotbu2_dim1, sotbu2_dim2,
disotb_dim1, disotb_dim2, disotb_offset, i__1, i__2, i__3, i__4;
/* Local variables */
- static integer ncfhu, nuroo, nvroo, ii, nd, jj, kk, ibb, kkm, kkp;
- static doublereal bid1, bid2, bid3, bid4;
+ integer ncfhu, nuroo, nvroo, ii, nd, jj, kk, ibb, kkm, kkp;
+ doublereal bid1, bid2, bid3, bid4;
/* **********************************************************************
*/
integer *iercod)
{
- static integer c__8 = 8;
+ integer c__8 = 8;
/* System generated locals */
integer contr1_dim1, contr1_dim2, contr1_offset, contr2_dim1, contr2_dim2,
disotb_offset;
/* Local variables */
- static integer ilong;
- static long int iofwr;
- static doublereal wrkar[1];
- static integer iszwr;
- static integer ibb, ier;
- static integer isz1, isz2, isz3, isz4;
- static long int ipt1, ipt2, ipt3, ipt4;
+ integer ilong;
+ intptr_t iofwr;
+ doublereal* wrkar = 0;
+ integer iszwr;
+ integer ibb, ier = 0;
+ integer isz1, isz2, isz3, isz4;
+ intptr_t ipt1, ipt2, ipt3, ipt4;
*/
/* NBPNTV: Nb of INTERNAL parameters of discretisation by V. */
/* This is also the nb of root of Legendre polynom where discretization is done. */
-/* VROOTL: Table of parameters of discretisation ON (-1,1) by V.
+/* VROOTL: Table of parameters of discretisation ON (-1,1) by V.*/
/* IORDRV: Order of constraint imposed at the extremities of iso-U */
/* = 0, calculate the extremities of iso-U */
--sotbv2;
--ditbv1;
--ditbv2;
+ AdvApp2Var_SysBase anAdvApp2Var_SysBase;
/* Function Body */
ibb = AdvApp2Var_SysBase::mnfndeb_();
*/
ilong = (*nbpntu / 2 + 1) * (*nbpntv / 2 + 1) * *ndimen;
- AdvApp2Var_SysBase::mvriraz_(&ilong, (char *)&sosotb[sosotb_offset]);
- AdvApp2Var_SysBase::mvriraz_(&ilong, (char *)&diditb[diditb_offset]);
+ AdvApp2Var_SysBase::mvriraz_(&ilong, &sosotb[sosotb_offset]);
+ AdvApp2Var_SysBase::mvriraz_(&ilong, &diditb[diditb_offset]);
ilong = *nbpntu / 2 * (*nbpntv / 2) * *ndimen;
- AdvApp2Var_SysBase::mvriraz_(&ilong, (char *)&soditb[soditb_offset]);
- AdvApp2Var_SysBase::mvriraz_(&ilong, (char *)&disotb[disotb_offset]);
+ AdvApp2Var_SysBase::mvriraz_(&ilong, &soditb[soditb_offset]);
+ AdvApp2Var_SysBase::mvriraz_(&ilong, &disotb[disotb_offset]);
if (*iordru == -1 && *iordrv == -1) {
goto L9999;
}
isz3 = ((*iordru + 1) << 1) * *nbpntu;
isz4 = ((*iordrv + 1) << 1) * *nbpntv;
iszwr = isz1 + isz2 + isz3 + isz4;
- AdvApp2Var_SysBase::mcrrqst_(&c__8, &iszwr, wrkar, &iofwr, &ier);
+ anAdvApp2Var_SysBase.mcrrqst_(&c__8, &iszwr, wrkar, &iofwr, &ier);
if (ier > 0) {
goto L9013;
}
L9999:
if (iofwr != 0) {
- AdvApp2Var_SysBase::mcrdelt_(&c__8, &iszwr, wrkar, &iofwr, &ier);
+ anAdvApp2Var_SysBase.mcrdelt_(&c__8, &iszwr, wrkar, &iofwr, &ier);
}
if (ier > 0) {
*iercod = 13;
integer *iercod)
{
- static integer c__8 = 8;
+ integer c__8 = 8;
/* System generated locals */
integer sosotb_dim1, sosotb_dim2, sosotb_offset, disotb_dim1, disotb_dim2,
patjac_offset;
/* Local variables */
- static logical ldbg;
- static long int iofwr;
- static doublereal wrkar[1];
- static integer iszwr;
- static integer ier;
- static integer isz1, isz2, isz3, isz4, isz5, isz6, isz7;
- static long int ipt1, ipt2, ipt3, ipt4, ipt5, ipt6, ipt7;
+ logical ldbg;
+ intptr_t iofwr;
+ doublereal* wrkar = 0;
+ integer iszwr;
+ integer ier;
+ integer isz1, isz2, isz3, isz4, isz5, isz6, isz7;
+ intptr_t ipt1, ipt2, ipt3, ipt4, ipt5, ipt6, ipt7;
isz6 = *ndjacv + 1 - ((*iordrv + 1) << 1);
isz7 = *ndimen << 2;
iszwr = isz1 + isz2 + isz3 + isz4 + isz5 + isz6 + isz7;
- AdvApp2Var_SysBase::mcrrqst_(&c__8, &iszwr, wrkar, &iofwr, &ier);
+ AdvApp2Var_SysBase anAdvApp2Var_SysBase;
+ anAdvApp2Var_SysBase.mcrrqst_(&c__8, &iszwr, wrkar, &iofwr, &ier);
if (ier > 0) {
goto L9013;
}
L9999:
if (iofwr != 0) {
- AdvApp2Var_SysBase::mcrdelt_(&c__8, &iszwr, wrkar, &iofwr, &ier);
+ anAdvApp2Var_SysBase.mcrdelt_(&c__8, &iszwr, wrkar, &iofwr, &ier);
}
if (ier > 0) {
*iercod = 13;
patjac_offset, vecerr_dim1, vecerr_offset, i__1, i__2, i__3, i__4;
/* Local variables */
- static logical ldbg;
- static integer idim, igsu, minu, minv, maxu, maxv, igsv;
- static doublereal vaux[3];
- static integer i2rdu, i2rdv, ndses, nd, ii, jj, kk, nu, nv;
- static doublereal zu, zv;
- static integer nu1, nv1;
+ logical ldbg;
+ integer idim, igsu, minu, minv, maxu, maxv, igsv;
+ doublereal vaux[3];
+ integer i2rdu, i2rdv, ndses, nd, ii, jj, kk, nu, nv;
+ doublereal zu, zv;
+ integer nu1, nv1;
/* **********************************************************************
*/
*ndegpu = *ndminu;
*ndegpv = *ndminv;
/* --> For the moment, max errors are null */
- AdvApp2Var_SysBase::mvriraz_(nbsesp, (char *)&errmax[1]);
+ AdvApp2Var_SysBase::mvriraz_(nbsesp, &errmax[1]);
nd = *ndimen << 2;
- AdvApp2Var_SysBase::mvriraz_(&nd, (char *)&vecerr[vecerr_offset]);
+ AdvApp2Var_SysBase::mvriraz_(&nd, &vecerr[vecerr_offset]);
/* --> and the square, too. */
nd = (*ndjacu + 1) * (*ndjacv + 1) * *ndimen;
- AdvApp2Var_SysBase::mvriraz_(&nd, (char *)&patjac[patjac_offset]);
+ AdvApp2Var_SysBase::mvriraz_(&nd, &patjac[patjac_offset]);
i2rdu = (*iordru + 1) << 1;
i2rdv = (*iordrv + 1) << 1;
/* L320: */
}
-/* ----- Contribution of calculated terms to the approximation error
+/* ----- Contribution of calculated terms to the approximation error */
/* for terms (I,J) with MINU <= I <= MAXU, MINV <= J <= MAXV. */
idim = 1;
/* L700: */
}
-/* ----- Contribution of calculated terms to the approximation error
+/* ----- Contribution of calculated terms to the approximation error */
/* for terms (I,J) with MINU <= I <= MAXU, MINV <= J <= MAXV */
idim = 1;
soditb_offset, diditb_dim1, i__1, i__2;
/* Local variables */
- static logical ldbg;
- static integer nptu2, nptv2, ii, jj;
- static doublereal bid0, bid1, bid2;
+ logical ldbg;
+ integer nptu2, nptv2, ii, jj;
+ doublereal bid0, bid1, bid2;
/* **********************************************************************
*/
/* FUNCTION : */
/* ---------- */
/* Calculate the terms connected to degree NDUJAC by U of the polynomial approximation */
-/* of function F(u,v), starting from its discretisation
+/* of function F(u,v), starting from its discretisation */
/* on the roots of Legendre polynom of degree */
/* NBPNTU by U and NBPNTV by V. */
}
}
-/* ------- Add terms connected to the supplementary root (0.D0) ------
+/* ------- Add terms connected to the supplementary root (0.D0) ------ */
/* ----------- of Legendre polynom of uneven degree NBPNTU -----------
*/
/* --> Only even NDUJAC terms are modified as GSSUTB(0) = 0 */
patjac_offset, i__1, i__2;
/* Local variables */
- static logical ldbg;
- static integer nptv2, ii, jj;
- static doublereal bid1;
+ logical ldbg;
+ integer nptv2, ii, jj;
+ doublereal bid1;
/* **********************************************************************
*/
/* FUNCTION : */
/* ---------- */
-/* Calculate the coefficients of polynomial approximation of F(u,v)
+/* Calculate the coefficients of polynomial approximation of F(u,v) */
/* of degree NDVJAC by V and of degree by U varying from MINDGU to MAXDGU.
*/
/* ------------------ */
/* NDVJAC: Degree of the polynom of approximation by V. */
-/* The representation in the orthogonal base starts from degre 0.
+/* The representation in the orthogonal base starts from degre 0. */
/* The polynomial base is the base of Jacobi of order -1 */
/* (Legendre), 0, 1 or 2 */
/* MINDGU: Degree minimum by U of coeff. to calculate. */
/* by Gauss method. It is reqired that NBPNTV = 30, 40, 50 or 61 and NDVJAC < NBPNTV. */
/* GSSVTB: Table of coefficients of integration by Gauss method */
/* by V for NDVJAC fixed: j varies from 0 to NBPNTV/2. */
-/* CHPAIR: Table of terms connected to degrees from MINDGU to MAXDGU by U to
+/* CHPAIR: Table of terms connected to degrees from MINDGU to MAXDGU by U to */
/* calculate the coeff. of approximation of EVEN degree NDVJAC by V. */
-/* CHIMPR: Table of terms connected to degrees from MINDGU to MAXDGU by U to
+/* CHIMPR: Table of terms connected to degrees from MINDGU to MAXDGU by U to */
/* calculate the coeff. of approximation of UNEVEN degree NDVJAC by V. */
/* OUTPUT ARGUMENTS : */
fpntab_offset, i__1;
/* Local variables */
- static logical ldbg;
- static integer ibid1, ibid2, iuouv, nd;
- static integer isz1, isz2;
+ logical ldbg;
+ integer ibid1, ibid2, iuouv, nd;
+ integer isz1, isz2;
/* **********************************************************************
*/
integer *iercod)
{
- static integer c__0 = 0;
+ integer c__0 = 0;
/* System generated locals */
integer sosotb_dim1, sosotb_dim2, sosotb_offset, disotb_dim1, disotb_dim2,
disotb_offset, soditb_dim1, soditb_dim2, soditb_offset,
fpntab_offset, i__1, i__2, i__3;
/* Local variables */
- static integer jdec;
- static logical ldbg;
- static doublereal alinu, blinu, alinv, blinv, tcons;
- static doublereal dbfn1[2], dbfn2[2];
- static integer nuroo, nvroo, id, iu, iv;
- static doublereal um, up;
+ integer jdec;
+ logical ldbg;
+ doublereal alinu, blinu, alinv, blinv, tcons;
+ doublereal dbfn1[2], dbfn2[2];
+ integer nuroo, nvroo, id, iu, iv;
+ doublereal um, up;
/* **********************************************************************
i__1 = nvroo;
for (iv = 1; iv <= i__1; ++iv) {
tcons = blinv + alinv * vrootb[iv];
- foncnp.Evaluate (ndimen, dbfn1, dbfn2, iiuouv, &tcons, nbpntu,
- &ttable[1], &c__0, &c__0, &fpntab[fpntab_offset], iercod);
+ (*const_cast <AdvApp2Var_EvaluatorFunc2Var*> (&foncnp)).Evaluate (
+ ndimen, dbfn1, dbfn2, iiuouv, &tcons, nbpntu, &
+ ttable[1], &c__0, &c__0, &fpntab[fpntab_offset], iercod);
if (*iercod > 0) {
goto L9999;
}
if (*nbpntv % 2 != 0) {
tcons = blinv;
- foncnp.Evaluate (ndimen, dbfn1, dbfn2, iiuouv, &tcons, nbpntu,
- &ttable[1], &c__0, &c__0, &fpntab[fpntab_offset], iercod);
+ (*const_cast <AdvApp2Var_EvaluatorFunc2Var*> (&foncnp)).Evaluate (
+ ndimen, dbfn1, dbfn2, iiuouv, &tcons, nbpntu, &
+ ttable[1], &c__0, &c__0, &fpntab[fpntab_offset], iercod);
if (*iercod > 0) {
goto L9999;
}
i__1 = nvroo;
for (iv = 1; iv <= i__1; ++iv) {
tcons = alinv * vrootb[(*nbpntv + 1) / 2 + iv] + blinv;
- foncnp.Evaluate (ndimen, dbfn1, dbfn2, iiuouv, &tcons, nbpntu,
- &ttable[1], &c__0, &c__0, &fpntab[fpntab_offset], iercod);
+ (*const_cast <AdvApp2Var_EvaluatorFunc2Var*> (&foncnp)).Evaluate (
+ ndimen, dbfn1, dbfn2, iiuouv, &tcons, nbpntu, &
+ ttable[1], &c__0, &c__0, &fpntab[fpntab_offset], iercod);
if (*iercod > 0) {
goto L9999;
}
doublereal d__1;
/* Local variables */
- static logical ldbg;
- static integer minu, minv;
- static doublereal vaux[2];
- static integer ii, nd, jj;
- static doublereal bid0, bid1;
+ logical ldbg;
+ integer minu, minv;
+ doublereal vaux[2];
+ integer ii, nd, jj;
+ doublereal bid0, bid1;
/* **********************************************************************
*/
doublereal d__1;
/* Local variables */
- static logical ldbg;
- static doublereal vaux[2];
- static integer i2rdu, i2rdv;
- static doublereal errnu, errnv;
- static integer ii, nd, jj, nu, nv;
- static doublereal bid0, bid1;
+ logical ldbg;
+ doublereal vaux[2];
+ integer i2rdu, i2rdv;
+ doublereal errnu, errnv;
+ integer ii, nd, jj, nu, nv;
+ doublereal bid0, bid1;
/* **********************************************************************
*/
integer *iercod)
{
- static integer c__8 = 8;
+ integer c__8 = 8;
/* System generated locals */
integer courbe_dim1, courbe_dim2, courbe_offset, somtab_dim1, somtab_dim2,
doublereal d__1;
/* Local variables */
- static integer ideb;
- static doublereal tmil;
- static integer ideb1, ibid1, ibid2, ncfja, ndgre, ilong,
+ integer ideb;
+ doublereal tmil;
+ integer ideb1, ibid1, ibid2, ncfja, ndgre, ilong,
ndwrk;
- static doublereal wrkar[1];
- static integer nupil;
- static long int iofwr;
- static doublereal uvpav[4] /* was [2][2] */;
- static integer nd, ii;
- static integer ibb;
- static integer ier;
- static doublereal uv11[4] /* was [2][2] */;
- static integer ncb1;
- static doublereal eps3;
- static integer isz1, isz2, isz3, isz4, isz5;
- static long int ipt1, ipt2, ipt3, ipt4, ipt5,iptt, jptt;
+ doublereal* wrkar = 0;
+ integer nupil;
+ intptr_t iofwr;
+ doublereal uvpav[4] /* was [2][2] */;
+ integer nd, ii;
+ integer ibb;
+ integer ier = 0;
+ doublereal uv11[4] /* was [2][2] */;
+ integer ncb1;
+ doublereal eps3;
+ integer isz1, isz2, isz3, isz4, isz5;
+ intptr_t ipt1, ipt2, ipt3, ipt4, ipt5,iptt, jptt;
/* **********************************************************************
*/
/* ERRMAX: Table of MAX errors (sub-space by sub-space) */
/* committed in the approximation of FONCNP by NBCRBE curves. */
/* ERRMOY: Table of AVERAGE errors (sub-space by sub-space) */
-/* committed in the approximation of FONCNP by NBCRBE curves.
+/* committed in the approximation of FONCNP by NBCRBE curves. */
/* IERCOD: Error code: */
/* -1 = ERRMAX > EPSAPR for at least one sub-space. */
/* (the resulting curves of at least mathematic degree NCFLIM-1 */
courbe_dim2 = *ndimen;
courbe_offset = courbe_dim1 * (courbe_dim2 + 1) + 1;
courbe -= courbe_offset;
+ AdvApp2Var_SysBase anAdvApp2Var_SysBase;
/* Function Body */
ibb = AdvApp2Var_SysBase::mnfndeb_();
*/
ilong = *ndimen * *ncflim * *nbcrmx;
- AdvApp2Var_SysBase::mvriraz_(&ilong, (char *)&courbe[courbe_offset]);
+ AdvApp2Var_SysBase::mvriraz_(&ilong, &courbe[courbe_offset]);
/* **********************************************************************
*/
isz5 = (*ndgjac + 1) * *ndimen;
ndwrk = isz1 + isz2 + isz3 + isz4 + isz5;
- AdvApp2Var_SysBase::mcrrqst_(&c__8, &ndwrk, wrkar, &iofwr, &ier);
+ anAdvApp2Var_SysBase.mcrrqst_(&c__8, &ndwrk, wrkar, &iofwr, &ier);
if (ier > 0) {
goto L9013; }
/* --> For the parameters of discretisation (NBROOT+2 extremities). */
&wrkar[ipt2]);
/*pkv t*/
ilong = *ndimen * *ncflim;
- AdvApp2Var_SysBase::mvriraz_(&ilong, (char*)&wrkar[ipt5]);
+ AdvApp2Var_SysBase::mvriraz_(&ilong, &wrkar[ipt5]);
/* -> Passage to canonic base (-1,1) (result in WRKAR(IPT5)).
*/
ndgre = ncoeff[ncb1] - 1;
ideb = *nbcrbe + 1;
ideb1 = ideb + 1;
ilong = (nupil - *nbcrbe) << 3;
- AdvApp2Var_SysBase::mcrfill_(&ilong, (char *)&tabdec[ideb],(char *)&tabdec[ideb1]);
+ AdvApp2Var_SysBase::mcrfill_(&ilong, &tabdec[ideb],&tabdec[ideb1]);
tabdec[ideb] = tmil;
++nupil;
}
L9900:
if (iofwr != 0) {
- AdvApp2Var_SysBase::mcrdelt_(&c__8, &ndwrk, wrkar, &iofwr, &ier);
+ anAdvApp2Var_SysBase.mcrdelt_(&c__8, &ndwrk, wrkar, &iofwr, &ier);
}
if (ier > 0) {
*iercod = 13;
doublereal d__1, d__2;
/* Local variables */
- static integer idim, ncfu, ncfv, id, ii, nd, jj, ku, kv, ns, ibb;
- static doublereal bid;
- static doublereal tol;
+ integer idim, ncfu, ncfv, id, ii, nd, jj, ku, kv, ns, ibb;
+ doublereal bid;
+ doublereal tol;
/* **********************************************************************
*/
integer i__1;
/* Local variables */
- static logical ldbg;
- static integer numax, ii;
- static doublereal bid;
+ logical ldbg;
+ integer numax, ii;
+ doublereal bid;
/* **********************************************************************
integer patjac_dim1, patjac_dim2, patjac_offset, i__1, i__2, i__3;
/* Local variables */
- static logical ldbg;
- static integer minu, minv, idebu, idebv, ii, nd, jj;
- static doublereal bid0, bid1;
+ logical ldbg;
+ integer minu, minv, idebu, idebv, ii, nd, jj;
+ doublereal bid0, bid1;
/* **********************************************************************
integer i__1;
/* Local variables */
- static integer ii, ibb;
+ integer ii, ibb;
/* **********************************************************************
*/
crvjac_dim1, crvjac_offset, gsstab_dim1, i__1, i__2, i__3;
/* Local variables */
- static integer igss, ikdeb;
- static doublereal bidon;
- static integer nd, ik, ir, nbroot, ibb;
+ integer igss, ikdeb;
+ doublereal bidon;
+ integer nd, ik, ir, nbroot, ibb;
/* **********************************************************************
*/
integer crvjac_dim1, crvjac_offset, i__1, i__2;
/* Local variables */
- static doublereal bidj;
- static integer i__, ia, nd, ncfcut, ibb;
- static doublereal bid;
+ doublereal bidj;
+ integer i__, ia, nd, ncfcut, ibb;
+ doublereal bid;
/* **********************************************************************
*/
integer cgauss_dim1, i__1;
/* Local variables */
- static integer kjac, iptt, ipdb0, infdg, iptdb, mxjac, ilong, ibb;
+ integer kjac, iptt, ipdb0, infdg, iptdb, mxjac, ilong, ibb;
/* **********************************************************************
*/
/* FUNCTION : */
/* ---------- */
/* Load the elements required for integration by */
-/* Gauss method to obtain the coefficients in the base of
+/* Gauss method to obtain the coefficients in the base of */
/* Legendre of the approximation by the least squares of a */
/* function. The elements are stored in commons MMAPGSS */
/* (case without constraint), MMAPGS0 (constraints C0), MMAPGS1 */
/* INPUT ARGUMENTS : */
/* ------------------ */
/* NDGJAC : Max degree of the polynom of approximation. */
-/* The representation in orthogonal base goes from degree
+/* The representation in orthogonal base goes from degree */
/* 0 to degree NDGJAC-2*(JORDRE+1). The polynomial base */
/* is the base of Jacobi of order -1 (Legendre), 0, 1 and 2 */
/* NBPNTS : Degree of the polynom of Legendre on the roots which of */
for (kjac = 0; kjac <= i__1; ++kjac) {
iptt = iptdb + kjac * (*nbpnts / 2) + 1;
AdvApp2Var_SysBase::mcrfill_(&ilong,
- (char *)&mmapgss_.gslxjs[iptt - 1],
- (char *)&cgauss[kjac * cgauss_dim1 + 1]);
+ &mmapgss_.gslxjs[iptt - 1],
+ &cgauss[kjac * cgauss_dim1 + 1]);
/* L100: */
}
/* --> Case when the number of points is uneven. */
for (kjac = 0; kjac <= i__1; ++kjac) {
iptt = iptdb + kjac * (*nbpnts / 2) + 1;
AdvApp2Var_SysBase::mcrfill_(&ilong,
- (char *)&mmapgs0_.gslxj0[iptt - 1],
- (char *)&cgauss[kjac * cgauss_dim1 + 1]);
+ &mmapgs0_.gslxj0[iptt - 1],
+ &cgauss[kjac * cgauss_dim1 + 1]);
/* L200: */
}
/* --> Case when the number of points is uneven. */
for (kjac = 0; kjac <= i__1; ++kjac) {
iptt = iptdb + kjac * (*nbpnts / 2) + 1;
AdvApp2Var_SysBase::mcrfill_(&ilong,
- (char *)&mmapgs1_.gslxj1[iptt - 1],
- (char *)&cgauss[kjac * cgauss_dim1 + 1]);
+ &mmapgs1_.gslxj1[iptt - 1],
+ &cgauss[kjac * cgauss_dim1 + 1]);
/* L300: */
}
/* --> Case when the number of points is uneven. */
for (kjac = 0; kjac <= i__1; ++kjac) {
iptt = iptdb + kjac * (*nbpnts / 2) + 1;
AdvApp2Var_SysBase::mcrfill_(&ilong,
- (char *)&mmapgs2_.gslxj2[iptt - 1],
- (char *)&cgauss[kjac * cgauss_dim1 + 1]);
+ &mmapgs2_.gslxj2[iptt - 1],
+ &cgauss[kjac * cgauss_dim1 + 1]);
/* L400: */
}
/* --> Cas of uneven number of points. */
ptcaux_offset, i__1, i__2, i__3;
/* Local variables */
- static integer kdim, nd, ii, jj, ibb;
+ integer kdim, nd, ii, jj, ibb;
/* ***********************************************************************
*/
/* Passage into canonical by u. */
kdim = *ndimen * *ncoefv;
- AdvApp2Var_MathBase::mmjaccv_((integer *)ncoefu,
- (integer *)&kdim,
- (integer *)iordru,
- (doublereal *)&ptclgd[ptclgd_offset],
- (doublereal *)&ptcaux[ptcaux_offset],
- (doublereal *)&ptccan[ptccan_offset]);
+ AdvApp2Var_MathBase::mmjaccv_(ncoefu,
+ &kdim,
+ iordru,
+ &ptclgd[ptclgd_offset],
+ &ptcaux[ptcaux_offset],
+ &ptccan[ptccan_offset]);
/* Swapping of u and v. */
/* Passage into canonical by v. */
kdim = *ndimen * *ncoefu;
- AdvApp2Var_MathBase::mmjaccv_((integer *)ncoefv,
- (integer *)&kdim,
- (integer *)iordrv,
- (doublereal *)&ptcaux[((ptcaux_dim3 + 1) * ptcaux_dim2 + 1) * ptcaux_dim1 + 1],
- (doublereal *)&ptccan[ptccan_offset],
- (doublereal *)&ptcaux[(((ptcaux_dim3 << 1) + 1) * ptcaux_dim2 + 1) * ptcaux_dim1 + 1]);
+ AdvApp2Var_MathBase::mmjaccv_(ncoefv,
+ &kdim,
+ iordrv,
+ &ptcaux[((ptcaux_dim3 + 1) * ptcaux_dim2 + 1) * ptcaux_dim1 + 1],
+ &ptccan[ptccan_offset],
+ &ptcaux[(((ptcaux_dim3 << 1) + 1) * ptcaux_dim2 + 1) * ptcaux_dim1 + 1]);
/* Swapping of u and v. */