From 45850b859d45abc0a965da9cb411fff1270fac8e Mon Sep 17 00:00:00 2001 From: kmo Date: Thu, 10 Mar 2011 21:15:09 +0000 Subject: [PATCH] Extra braces to avoid warning git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@862 e10b68d5-8a6e-419e-a041-bce267b0401d --- src/Utility/GaussQuadrature.C | 86 +++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 38 deletions(-) diff --git a/src/Utility/GaussQuadrature.C b/src/Utility/GaussQuadrature.C index cb099c89..0c594a09 100644 --- a/src/Utility/GaussQuadrature.C +++ b/src/Utility/GaussQuadrature.C @@ -1,4 +1,4 @@ -// $Id: GaussQuadrature.C,v 1.1 2009-12-03 15:37:06 kmo Exp $ +// $Id$ //============================================================================== //! //! \file GaussQuadrature.C @@ -16,85 +16,91 @@ //! \brief 1-point rule. -static double G1[2][1] = { +static double G1[2][1] = {{ // coord - 0.0, + 0.0 +},{ // weight 2.0 -}; +}}; //! \brief 2-point rule. -static double G2[2][2] = { +static double G2[2][2] = {{ // coord -0.5773502691896257, - 0.5773502691896257, + 0.5773502691896257 +},{ // weight - 1.0 , + 1.0, 1.0 -}; +}}; //! \brief 3-point rule. -static double G3[2][3] = { +static double G3[2][3] = {{ // coord -0.7745966692414834, 0.0 , - 0.7745966692414834, + 0.7745966692414834 +},{ // weight 0.5555555555555556, 0.8888888888888889, 0.5555555555555556 -}; +}}; //! \brief 4-point rule. -static double G4[2][4] = { +static double G4[2][4] = {{ // coord -0.86113631159405257524, -0.33998104358485626481, 0.33998104358485626481, - 0.86113631159405257524, + 0.86113631159405257524 +},{ // weight 0.34785484513745385736, 0.65214515486254614264, 0.65214515486254614264, 0.34785484513745385736 -}; +}}; //! \brief 5-point rule. -static double G5[2][5] = { +static double G5[2][5] = {{ // coord -0.90617984593866399282, -0.53846931010568309105, 0.0 , 0.53846931010568309105, - 0.90617984593866399282, + 0.90617984593866399282 +},{ // weight 0.23692688505618908749, 0.47862867049936646808, 0.56888888888888888888, 0.47862867049936646808, - 0.23692688505618908749, -}; + 0.23692688505618908749 +}}; //! \brief 6-point rule. -static double G6[2][6] = { +static double G6[2][6] = {{ // coord -0.9324695142031520, -0.6612093864662645, -0.2386191860831969, 0.2386191860831969, 0.6612093864662645, - 0.9324695142031520, + 0.9324695142031520 +},{ // weight 0.1713244923791703, 0.3607615730481386, 0.4679139345726911, 0.4679139345726911, 0.3607615730481386, - 0.1713244923791703, -}; + 0.1713244923791703 +}}; //! \brief 7-point rule. -static double G7[2][7] = { +static double G7[2][7] = {{ // coord -0.9491079123427585, -0.7415311855993944, @@ -102,7 +108,8 @@ static double G7[2][7] = { 0.0 , 0.4058451513773972, 0.7415311855993944, - 0.9491079123427585, + 0.9491079123427585 +},{ // weight 0.1294849661688697, 0.2797053914892767, @@ -111,10 +118,10 @@ static double G7[2][7] = { 0.3818300505051189, 0.2797053914892767, 0.1294849661688697, -}; +}}; //! \brief 8-point rule. -static double G8[2][8] = { +static double G8[2][8] = {{ // coord -0.9602898564975362, -0.7966664774136267, @@ -123,7 +130,8 @@ static double G8[2][8] = { 0.1834346424956498, 0.5255324099163290, 0.7966664774136267, - 0.9602898564975362, + 0.9602898564975362 +},{ // weight 0.1012285362903763, 0.2223810344533745, @@ -133,10 +141,10 @@ static double G8[2][8] = { 0.3137066458778873, 0.2223810344533745, 0.1012285362903763, -}; +}}; //! \brief 9-point rule. -static double G9[2][9] = { +static double G9[2][9] = {{ // coord -0.9681602395076261, -0.8360311073266358, @@ -146,7 +154,8 @@ static double G9[2][9] = { 0.3242534234038089, 0.6133714327005904, 0.8360311073266358, - 0.9681602395076261, + 0.9681602395076261 +},{ // weight 0.0812743883615744, 0.1806481606948574, @@ -156,11 +165,11 @@ static double G9[2][9] = { 0.3123470770400028, 0.2606106964029355, 0.1806481606948574, - 0.0812743883615744, -}; + 0.0812743883615744 +}}; //! \brief 10-point rule. -static double G10[2][10] = { +static double G10[2][10] = {{ // coord -0.97390653, -0.86506337, @@ -171,8 +180,9 @@ static double G10[2][10] = { 0.43339539, 0.67940957, 0.86506337, - 0.97390653, + 0.97390653 // weight +},{ 0.06667134, 0.14945135, 0.21908636, @@ -182,11 +192,11 @@ static double G10[2][10] = { 0.26926672, 0.21908636, 0.14945135, - 0.06667134, -}; + 0.06667134 +}}; -const double* GaussQuadrature::getGauss(int n, int i) +const double* GaussQuadrature::getGauss (int n, int i) { switch (n) { case 1: return G1[i]; @@ -201,7 +211,7 @@ const double* GaussQuadrature::getGauss(int n, int i) case 10: return G10[i]; } - std::cerr <<"GaussQuadrature: "<< n <<"-point rule is not available" + std::cerr <<" *** GaussQuadrature: "<< n <<"-point rule is not available." << std::endl; return 0; }