From 75eb1e96b6a0bebb5954dce59f39dc5cb79d3710 Mon Sep 17 00:00:00 2001 From: wolf Date: Fri, 20 Aug 2004 19:55:31 +0000 Subject: [PATCH] Fix a few places where the C++ compiler stumbles. git-svn-id: https://svn.dealii.org/trunk@9558 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/contrib/umfpack/AMD/Source/amd_2.c | 2 +- .../umfpack/UMFPACK/Source/umf_extend_front.c | 4 ++-- .../umfpack/UMFPACK/Source/umf_grow_front.c | 8 ++++---- .../umfpack/UMFPACK/Source/umf_init_front.c | 4 ++-- .../umfpack/UMFPACK/Source/umf_start_front.c | 4 ++-- .../umfpack/UMFPACK/Source/umfpack_numeric.c | 2 +- .../umfpack/UMFPACK/Source/umfpack_qsymbolic.c | 12 ++++++------ .../UMFPACK/Source/umfpack_report_control.c | 14 +++++++------- .../umfpack/UMFPACK/Source/umfpack_report_info.c | 4 ++-- .../umfpack/UMFPACK/Source/umfpack_report_matrix.c | 2 +- .../UMFPACK/Source/umfpack_report_numeric.c | 2 +- .../umfpack/UMFPACK/Source/umfpack_report_perm.c | 2 +- .../umfpack/UMFPACK/Source/umfpack_report_status.c | 2 +- .../UMFPACK/Source/umfpack_report_symbolic.c | 2 +- .../UMFPACK/Source/umfpack_report_triplet.c | 2 +- .../umfpack/UMFPACK/Source/umfpack_report_vector.c | 2 +- .../contrib/umfpack/UMFPACK/Source/umfpack_solve.c | 2 +- 17 files changed, 35 insertions(+), 35 deletions(-) diff --git a/deal.II/contrib/umfpack/AMD/Source/amd_2.c b/deal.II/contrib/umfpack/AMD/Source/amd_2.c index ca1141e265..6de3ec507f 100644 --- a/deal.II/contrib/umfpack/AMD/Source/amd_2.c +++ b/deal.II/contrib/umfpack/AMD/Source/amd_2.c @@ -584,7 +584,7 @@ GLOBAL void AMD_2 } else { - dense = alpha * sqrt ((double) n) ; + dense = (Int) (alpha * sqrt ((double) n)) ; } dense = MAX (16, dense) ; dense = MIN (n, dense) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_extend_front.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_extend_front.c index 241ed8aa58..7c14b4648a 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_extend_front.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_extend_front.c @@ -127,8 +127,8 @@ GLOBAL Int UMF_extend_front if (Work->do_grow) { - fnr2 = UMF_FRONTAL_GROWTH * Work->fnrows_new + 2 ; - fnc2 = UMF_FRONTAL_GROWTH * Work->fncols_new + 2 ; + fnr2 = (Int) (UMF_FRONTAL_GROWTH * Work->fnrows_new + 2) ; + fnc2 = (Int) (UMF_FRONTAL_GROWTH * Work->fncols_new + 2) ; if (!UMF_grow_front (Numeric, fnr2, fnc2, Work, 1)) { DEBUGm4 (("out of memory: extend front\n")) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_grow_front.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_grow_front.c index 9ecf67388a..90f1ad02e7 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_grow_front.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_grow_front.c @@ -115,8 +115,8 @@ GLOBAL Int UMF_grow_front /* the desired front size is bigger than the integer maximum */ /* compute a such that a*a*s < Int_MAX / sizeof (Entry) */ double a = 0.9 * sqrt ((Int_MAX / sizeof (Entry)) / s) ; - fnr2 = MAX (fnr_min, a * fnr2) ; - fnc2 = MAX (fnc_min, a * fnc2) ; + fnr2 = (Int) MAX (fnr_min, a * fnr2) ; + fnc2 = (Int) MAX (fnc_min, a * fnc2) ; /* the new frontal size is a*r*a*c = a*a*s */ newsize = fnr2 * fnc2 ; ASSERT (fnr2 >= 0) ; @@ -188,8 +188,8 @@ GLOBAL Int UMF_grow_front /* try again with something smaller */ while ((fnr2 != fnr_min || fnc2 != fnc_min) && !eloc) { - fnr2 = MIN (fnr2 - 2, fnr2 * UMF_REALLOC_REDUCTION) ; - fnc2 = MIN (fnc2 - 2, fnc2 * UMF_REALLOC_REDUCTION) ; + fnr2 = (Int) MIN (fnr2 - 2, fnr2 * UMF_REALLOC_REDUCTION) ; + fnc2 = (Int) MIN (fnc2 - 2, fnc2 * UMF_REALLOC_REDUCTION) ; ASSERT (fnr_min >= 0) ; ASSERT (fnr_min % 2 == 1) ; fnr2 = MAX (fnr_min, fnr2) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_init_front.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_init_front.c index cce2dd1979..ec40ed806b 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_init_front.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_init_front.c @@ -65,8 +65,8 @@ GLOBAL Int UMF_init_front #endif if (Work->do_grow) { - fnr2 = UMF_FRONTAL_GROWTH * Work->fnrows_new + 2 ; - fnc2 = UMF_FRONTAL_GROWTH * Work->fncols_new + 2 ; + fnr2 = (Int) (UMF_FRONTAL_GROWTH * Work->fnrows_new + 2) ; + fnc2 = (Int) (UMF_FRONTAL_GROWTH * Work->fncols_new + 2) ; if (!UMF_grow_front (Numeric, fnr2, fnc2, Work, Work->pivrow_in_front ? 2 : 0)) { diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_start_front.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_start_front.c index bb34a9385c..e4eac15091 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_start_front.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_start_front.c @@ -159,7 +159,7 @@ GLOBAL Int UMF_start_front /* returns TRUE if successful, FALSE otherwise */ if (Numeric->front_alloc_init < 0) { /* allocate a front of -Numeric->front_alloc_init entries */ - fsize = -Numeric->front_alloc_init ; + fsize = (Int) -Numeric->front_alloc_init ; fsize = MAX (1, fsize) ; } else @@ -171,7 +171,7 @@ GLOBAL Int UMF_start_front /* returns TRUE if successful, FALSE otherwise */ } else { - fsize = Numeric->front_alloc_init * maxfrsize ; + fsize = (Int) (Numeric->front_alloc_init * maxfrsize) ; } if (cdeg > 0) diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_numeric.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_numeric.c index 9456d911ed..a79e8df3a9 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_numeric.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_numeric.c @@ -116,7 +116,7 @@ GLOBAL Int UMFPACK_numeric alloc_init = GET_CONTROL (UMFPACK_ALLOC_INIT, UMFPACK_DEFAULT_ALLOC_INIT) ; front_alloc_init = GET_CONTROL (UMFPACK_FRONT_ALLOC_INIT, UMFPACK_DEFAULT_FRONT_ALLOC_INIT) ; - scale = GET_CONTROL (UMFPACK_SCALE, UMFPACK_DEFAULT_SCALE) ; + scale = (Int) GET_CONTROL (UMFPACK_SCALE, UMFPACK_DEFAULT_SCALE) ; droptol = GET_CONTROL (UMFPACK_DROPTOL, UMFPACK_DEFAULT_DROPTOL) ; relpt = MAX (0.0, MIN (relpt, 1.0)) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_qsymbolic.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_qsymbolic.c index 910a50c117..db1406f13d 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_qsymbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_qsymbolic.c @@ -118,7 +118,7 @@ PRIVATE void do_amd AMD_1 (n, Ap, Ai, Q, Qinv, Sdeg, Clen, Ci, amd_Control, amd_Info) ; /* return estimates computed from AMD on PA+PA' */ - Symbolic->amd_dmax = amd_Info [AMD_DMAX] ; + Symbolic->amd_dmax = (Int) amd_Info [AMD_DMAX] ; Symbolic->amd_lunz = 2 * amd_Info [AMD_LNZ] + n ; Info [UMFPACK_SYMMETRIC_LUNZ] = Symbolic->amd_lunz ; Info [UMFPACK_SYMMETRIC_FLOPS] = DIV_FLOPS * amd_Info [AMD_NDIV] + @@ -345,8 +345,8 @@ GLOBAL Int UMFPACK_qsymbolic drow = GET_CONTROL (UMFPACK_DENSE_ROW, UMFPACK_DEFAULT_DENSE_ROW) ; dcol = GET_CONTROL (UMFPACK_DENSE_COL, UMFPACK_DEFAULT_DENSE_COL) ; - nb = GET_CONTROL (UMFPACK_BLOCK_SIZE, UMFPACK_DEFAULT_BLOCK_SIZE) ; - strategy = GET_CONTROL (UMFPACK_STRATEGY, UMFPACK_DEFAULT_STRATEGY) ; + nb = (Int) GET_CONTROL (UMFPACK_BLOCK_SIZE, UMFPACK_DEFAULT_BLOCK_SIZE) ; + strategy = (Int) GET_CONTROL (UMFPACK_STRATEGY, UMFPACK_DEFAULT_STRATEGY) ; tol = GET_CONTROL (UMFPACK_2BY2_TOLERANCE, UMFPACK_DEFAULT_2BY2_TOLERANCE) ; scale = GET_CONTROL (UMFPACK_SCALE, UMFPACK_DEFAULT_SCALE) ; force_fixQ = GET_CONTROL (UMFPACK_FIXQ, UMFPACK_DEFAULT_FIXQ) ; @@ -490,7 +490,7 @@ GLOBAL Int UMFPACK_qsymbolic Clen = UMF_COLAMD_RECOMMENDED (nz, n_row, n_col) ; Clen_analyze = UMF_ANALYZE_CLEN (nz, n_row, n_col, nn) ; Clen = MAX (Clen, Clen_analyze) ; - Clen_amd = 2.4 * nz + 8 * n_inner ; + Clen_amd = (Int) (2.4 * nz + 8 * n_inner) ; Clen_amd += MAX (nn, nz) ; /* for Ri, in UMF_2by2 */ Clen = MAX (Clen, Clen_amd) ; @@ -870,7 +870,7 @@ GLOBAL Int UMFPACK_qsymbolic #ifdef COMPLEX Az, #endif - tol, scale, Cperm1, + tol, (Int) scale, Cperm1, #ifndef NDEBUG Rperm1, #endif @@ -904,7 +904,7 @@ GLOBAL Int UMFPACK_qsymbolic } nz_papat = AMD_aat (n2, Rp, Ri, Sdeg, Wq, amd_Info) ; sym2 = amd_Info [AMD_SYMMETRY] ; - nzd2 = amd_Info [AMD_NZDIAG] ; + nzd2 = (Int) amd_Info [AMD_NZDIAG] ; Info [UMFPACK_2BY2_PATTERN_SYMMETRY] = sym2 ; Info [UMFPACK_2BY2_NZ_PA_PLUS_PAT] = nz_papat ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_control.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_control.c index fdc614f279..7431a86226 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_control.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_control.c @@ -25,7 +25,7 @@ GLOBAL void UMFPACK_report_control double drow, dcol, relpt, relpt2, alloc_init, front_alloc_init, amd_alpha, tol, force_fixQ, droptol, aggr ; - prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (prl < 2) { @@ -96,7 +96,7 @@ GLOBAL void UMFPACK_report_control /* block size */ /* ---------------------------------------------------------------------- */ - nb = GET_CONTROL (UMFPACK_BLOCK_SIZE, UMFPACK_DEFAULT_BLOCK_SIZE) ; + nb = (Int) GET_CONTROL (UMFPACK_BLOCK_SIZE, UMFPACK_DEFAULT_BLOCK_SIZE) ; nb = MAX (1, nb) ; PRINTF ((" "ID": block size for dense matrix kernels: "ID"\n", (Int) INDEX (UMFPACK_BLOCK_SIZE), nb)) ; @@ -105,7 +105,7 @@ GLOBAL void UMFPACK_report_control /* strategy */ /* ---------------------------------------------------------------------- */ - strategy = GET_CONTROL (UMFPACK_STRATEGY, UMFPACK_DEFAULT_STRATEGY) ; + strategy = (Int) GET_CONTROL (UMFPACK_STRATEGY, UMFPACK_DEFAULT_STRATEGY) ; if (strategy < UMFPACK_STRATEGY_AUTO || strategy > UMFPACK_STRATEGY_SYMMETRIC) { @@ -153,7 +153,7 @@ GLOBAL void UMFPACK_report_control } else { - s = -alloc_init ; + s =(Int) -alloc_init ; s = MAX (1, s) ; PRINTF ((" "ID": initial allocation (in Units): "ID"\n", (Int) INDEX (UMFPACK_ALLOC_INIT), s)) ; @@ -163,7 +163,7 @@ GLOBAL void UMFPACK_report_control /* maximum iterative refinement steps */ /* ---------------------------------------------------------------------- */ - irstep = GET_CONTROL (UMFPACK_IRSTEP, UMFPACK_DEFAULT_IRSTEP) ; + irstep = (Int) GET_CONTROL (UMFPACK_IRSTEP, UMFPACK_DEFAULT_IRSTEP) ; irstep = MAX (0, irstep) ; PRINTF ((" "ID": max iterative refinement steps: "ID"\n", (Int) INDEX (UMFPACK_IRSTEP), irstep)) ; @@ -230,7 +230,7 @@ GLOBAL void UMFPACK_report_control /* scaling */ /* ---------------------------------------------------------------------- */ - scale = GET_CONTROL (UMFPACK_SCALE, UMFPACK_DEFAULT_SCALE) ; + scale = (Int) GET_CONTROL (UMFPACK_SCALE, UMFPACK_DEFAULT_SCALE) ; if (scale != UMFPACK_SCALE_NONE && scale != UMFPACK_SCALE_MAX) { scale = UMFPACK_DEFAULT_SCALE ; @@ -264,7 +264,7 @@ GLOBAL void UMFPACK_report_control } else { - s = -front_alloc_init ; + s = (Int) -front_alloc_init ; s = MAX (1, s) ; PRINTF ((" "ID": initial frontal matrix size (# of Entry's): "ID"\n", (Int) INDEX (UMFPACK_FRONT_ALLOC_INIT), s)) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_info.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_info.c index 4c806d2f90..48a66233b5 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_info.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_info.c @@ -89,7 +89,7 @@ GLOBAL void UMFPACK_report_info /* get control settings and status to determine what to print */ /* ---------------------------------------------------------------------- */ - prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (!Info || prl < 2) { @@ -264,7 +264,7 @@ GLOBAL void UMFPACK_report_info Info [UMFPACK_NEMPTY_ROW]) ; PRINT_INFO (" number of empty columns %.0f\n", Info [UMFPACK_NEMPTY_COL]) ; - is_sym = Info [UMFPACK_S_SYMMETRIC] ; + is_sym = (Int) Info [UMFPACK_S_SYMMETRIC] ; if (is_sym > 0) { PRINTF ((" submatrix S square and diagonal preserved\n")) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_matrix.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_matrix.c index d5066a4a91..90331396e1 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_matrix.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_matrix.c @@ -40,7 +40,7 @@ GLOBAL Int UMFPACK_report_matrix /* determine the form, and check if inputs exist */ /* ---------------------------------------------------------------------- */ - prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (prl <= 2) { diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_numeric.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_numeric.c index c66a2c6c89..ac0d6dd6bc 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_numeric.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_numeric.c @@ -56,7 +56,7 @@ GLOBAL Int UMFPACK_report_numeric npiv ; NumericType *Numeric ; - prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (prl <= 2) { diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_perm.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_perm.c index 2dc4c13779..11ec1bc366 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_perm.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_perm.c @@ -31,7 +31,7 @@ GLOBAL Int UMFPACK_report_perm { Int prl, *W, status ; - prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (prl <= 2) { diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_status.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_status.c index 06bc9244c9..2ec58e9ec1 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_status.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_status.c @@ -28,7 +28,7 @@ GLOBAL void UMFPACK_report_status /* get control settings and status to determine what to print */ /* ---------------------------------------------------------------------- */ - prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (prl < 1) { diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_symbolic.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_symbolic.c index 14503d9280..c89248bc4b 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_symbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_symbolic.c @@ -37,7 +37,7 @@ GLOBAL Int UMFPACK_report_symbolic *Front_leftmostdesc, *Front_parent, done, status1, status2 ; SymbolicType *Symbolic ; - prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (prl <= 2) { diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_triplet.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_triplet.c index d044dad377..06ebbec9cb 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_triplet.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_triplet.c @@ -33,7 +33,7 @@ GLOBAL Int UMFPACK_report_triplet Int prl, prl1, k, i, j, do_values ; Entry t ; - prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (prl <= 2) { diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_vector.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_vector.c index d5e18a1353..3f8a39f3ec 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_vector.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_vector.c @@ -33,7 +33,7 @@ GLOBAL Int UMFPACK_report_vector double *Xz = (double *) NULL ; #endif - prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (prl <= 2) { diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_solve.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_solve.c index 30bf8121a4..8d13a41fbd 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_solve.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_solve.c @@ -100,7 +100,7 @@ UMFPACK_solve /* get parameters */ /* ---------------------------------------------------------------------- */ - irstep = GET_CONTROL (UMFPACK_IRSTEP, UMFPACK_DEFAULT_IRSTEP) ; + irstep = (Int) GET_CONTROL (UMFPACK_IRSTEP, UMFPACK_DEFAULT_IRSTEP) ; if (User_Info != (double *) NULL) { -- 2.39.5