Commit dfbb7d72 authored by messner's avatar messner

removed icc compiler warnings


git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@449 2616d619-271b-44dc-8df4-d4a8f33a7222
parent 003ad8fc
......@@ -25,17 +25,17 @@ public:
~FChebCell() {}
/** Get Multipole */
const FReal *const getMultipole() const
const FReal* getMultipole() const
{ return this->multipole_exp; }
/** Get Local */
const FReal *const getLocal() const
const FReal* getLocal() const
{ return this->local_exp; }
/** Get Multipole */
FReal *const getMultipole()
FReal* getMultipole()
{ return this->multipole_exp; }
/** Get Local */
FReal *const getLocal()
FReal* getLocal()
{ return this->local_exp; }
};
......
......@@ -75,7 +75,7 @@ public:
// initialize chebyshev polynomials of root nodes: T_o(x_j)
for (unsigned int o=1; o<ORDER; ++o)
for (unsigned int j=0; j<ORDER; ++j)
T_of_roots[o][j] = FReal(BasisType::T(o, BasisType::roots[j]));
T_of_roots[o][j] = FReal(BasisType::T(o, FReal(BasisType::roots[j])));
// initialize root node ids
TensorType::setNodeIds(node_ids);
......@@ -176,7 +176,7 @@ public:
{
FBlas::gemtva(nnodes, nnodes, FReal(1.),
ChildParentInterpolator[ChildIndex],
const_cast<FReal *const>(ChildExpansion), ParentExpansion);
const_cast<FReal*>(ChildExpansion), ParentExpansion);
}
void applyL2L(const unsigned int ChildIndex,
......@@ -185,7 +185,7 @@ public:
{
FBlas::gemva(nnodes, nnodes, FReal(1.),
ChildParentInterpolator[ChildIndex],
const_cast<FReal *const>(ParentExpansion), ChildExpansion);
const_cast<FReal*>(ParentExpansion), ChildExpansion);
}
};
......
......@@ -177,7 +177,7 @@ public:
{
// 1) apply U
M2LHandler->applyU(ParentCell->getLocal() + nnodes,
const_cast<CellClass *const>(ParentCell)->getLocal());
const_cast<CellClass*>(ParentCell)->getLocal());
// 2) apply Sx
for (unsigned int ChildIndex=0; ChildIndex < 8; ++ChildIndex)
if (ChildCells[ChildIndex])
......@@ -191,8 +191,8 @@ public:
{
// 1) apply U
M2LHandler->applyU(LeafCell->getLocal() + nnodes,
const_cast<CellClass *const>(LeafCell)->getLocal());
const_cast<CellClass*>(LeafCell)->getLocal());
// 2.a) apply Sx
const F3DPosition LeafCellCenter(getLeafCellCenter(LeafCell->getCoordinate()));
Interpolator->applyL2P(LeafCellCenter,
......
......@@ -36,7 +36,7 @@ public:
/**
* @return Array containing source particles
*/
ContainerClass *const getSrc()
ContainerClass* getSrc()
{
return &particles;
}
......@@ -44,7 +44,7 @@ public:
/**
* @return Array containing target particles
*/
ContainerClass *const getTargets()
ContainerClass* getTargets()
{
return &particles;
}
......
......@@ -65,7 +65,7 @@ class FChebM2LHandler : FNoCopyable
public:
FChebM2LHandler(const FReal _epsilon)
: MatrixKernel(), U(NULL), C(NULL), B(NULL), epsilon(_epsilon), rank(-1)
: MatrixKernel(), U(NULL), C(NULL), B(NULL), epsilon(_epsilon), rank(0)
{}
~FChebM2LHandler()
......@@ -107,7 +107,7 @@ public:
* @param[out] C matrix of size \f$r\times 316 r\f$ storing \f$[C_1,\dots,C_{316}]\f$
* @param[out] B matrix of size \f$\ell^3\times r\f$
*/
static const unsigned int ComputeAndCompress(const FReal epsilon, FReal* &U, FReal* &C, FReal* &B);
static unsigned int ComputeAndCompress(const FReal epsilon, FReal* &U, FReal* &C, FReal* &B);
/**
* Computes, compresses and stores the matrices \f$Y, C_t, B\f$ in a binary
......@@ -135,7 +135,7 @@ public:
*/
void applyU(const FReal *const X, FReal *const x) const
{
FBlas::gemva(nnodes, rank, 1., U, const_cast<FReal *const>(X), x);
FBlas::gemva(nnodes, rank, 1., U, const_cast<FReal*>(X), x);
}
/**
......@@ -155,19 +155,19 @@ public:
const unsigned int idx
= (transfer[0]+3)*7*7 + (transfer[1]+3)*7 + (transfer[2]+3);
const FReal scale(MatrixKernel.getScaleFactor(CellWidth));
FBlas::gemva(rank, rank, scale, C + idx*rank*rank, const_cast<FReal *const>(Y), X);
FBlas::gemva(rank, rank, scale, C + idx*rank*rank, const_cast<FReal*>(Y), X);
}
void applyC(const unsigned int idx, FReal CellWidth,
const FReal *const Y, FReal *const X) const
{
const FReal scale(MatrixKernel.getScaleFactor(CellWidth));
FBlas::gemva(rank, rank, scale, C + idx*rank*rank, const_cast<FReal *const>(Y), X);
FBlas::gemva(rank, rank, scale, C + idx*rank*rank, const_cast<FReal*>(Y), X);
}
void applyC(FReal CellWidth,
const FReal *const Y, FReal *const X) const
{
const FReal scale(MatrixKernel.getScaleFactor(CellWidth));
FBlas::gemva(rank, rank * 343, scale, C, const_cast<FReal *const>(Y), X);
FBlas::gemva(rank, rank * 343, scale, C, const_cast<FReal*>(Y), X);
}
/**
......@@ -200,7 +200,7 @@ public:
template <int ORDER, class MatrixKernelClass>
const unsigned int
unsigned int
FChebM2LHandler<ORDER, MatrixKernelClass>::ComputeAndCompress(const FReal epsilon,
FReal* &U,
FReal* &C,
......@@ -457,7 +457,7 @@ unsigned int getRank(const FReal singular_values[], const double eps)
if (nrm2k > eps*eps * nrm2) return k;
}
throw std::runtime_error("rank cannot be larger than nnodes");
return -1;
return 0;
}
......
......@@ -41,7 +41,7 @@ struct FChebRoots : FNoCopyable
* @param[in] x coordinate in [-1,1]
* @return function value
*/
const static FReal T(const unsigned int n, FReal x)
static FReal T(const unsigned int n, FReal x)
{
//std::cout << x << std::endl;
assert(std::fabs(x)-1.<10.*std::numeric_limits<FReal>::epsilon());
......@@ -64,7 +64,7 @@ struct FChebRoots : FNoCopyable
* @param[in] x coordinate in [-1,1]
* @return function value
*/
const static FReal U(const unsigned int n, FReal x)
static FReal U(const unsigned int n, FReal x)
{
assert(std::fabs(x)-1.<10.*std::numeric_limits<FReal>::epsilon());
if (std::fabs(x)>1.) {
......
......@@ -72,13 +72,13 @@ public:
// weights in 1d
FReal weights_1d[ORDER];
for (unsigned int o=0; o<ORDER; ++o)
weights_1d[o] = FMath::FPi / ORDER * sqrt(FReal(1.) - BasisType::roots[o] * BasisType::roots[o]);
weights_1d[o] = FMath::FPi/ORDER * FMath::Sqrt(FReal(1.)-FReal(BasisType::roots[o])*FReal(BasisType::roots[o]));
// weights in 3d (tensor structure)
unsigned int node_ids[nnodes][3];
setNodeIds(node_ids);
for (unsigned int n=0; n<nnodes; ++n) {
FReal weight = FReal(1.); // no weighting
weight *= sqrt(weights_1d[node_ids[n][0]]*weights_1d[node_ids[n][1]]*weights_1d[node_ids[n][2]]); // 1/2
weight *= FMath::Sqrt(weights_1d[node_ids[n][0]]*weights_1d[node_ids[n][1]]*weights_1d[node_ids[n][2]]); // 1/2
//weight *= weight; // 1
//weight *= weight; // 2
//weight *= weight; // 4
......
......@@ -47,7 +47,7 @@
const FReal computeL2norm(unsigned int N, FReal *const u, FReal *const v)
FReal computeL2norm(unsigned int N, FReal *const u, FReal *const v)
{
FReal dot = FReal(0.);
FReal diff_dot = FReal(0.);
......@@ -61,7 +61,7 @@ const FReal computeL2norm(unsigned int N, FReal *const u, FReal *const v)
const FReal computeINFnorm(unsigned int N, FReal *const u, FReal *const v)
FReal computeINFnorm(unsigned int N, FReal *const u, FReal *const v)
{
FReal max = FReal(0.);
FReal diff_max = FReal(0.);
......@@ -81,7 +81,7 @@ int main(int argc, char* argv[])
const unsigned int ORDER = 7;
const FReal epsilon = FParameters::getValue(argc, argv, "-eps", FReal(1e-4));
const long NbPart = FParameters::getValue(argc, argv, "-num", 100000);
const unsigned int TreeHeight = FParameters::getValue(argc, argv, "-h", 5);
const unsigned int TreeHeight = FParameters::getValue(argc, argv, "-h", 6);
const unsigned int SubTreeHeight = FParameters::getValue(argc, argv, "-sh", 2);
const FReal Width = 10.;
......@@ -110,7 +110,8 @@ int main(int argc, char* argv[])
OctreeClass tree(TreeHeight, SubTreeHeight, Width, BoxCenter);
// -----------------------------------------------------
std::cout << "Creating and inserting " << NbPart << " particles ..." << std::endl;
std::cout << "Creating and inserting " << NbPart << " particles in a octree of height " << TreeHeight
<< " ..." << std::endl;
time.tic();
ParticleClass particle;
for(long i=0; i<NbPart; ++i) {
......
......@@ -41,7 +41,7 @@
const FReal computeL2norm(unsigned int N, FReal *const u, FReal *const v)
FReal computeL2norm(unsigned int N, FReal *const u, FReal *const v)
{
FReal dot = FReal(0.);
FReal diff_dot = FReal(0.);
......@@ -55,7 +55,7 @@ const FReal computeL2norm(unsigned int N, FReal *const u, FReal *const v)
const FReal computeINFnorm(unsigned int N, FReal *const u, FReal *const v)
FReal computeINFnorm(unsigned int N, FReal *const u, FReal *const v)
{
FReal max = FReal(0.);
FReal diff_max = FReal(0.);
......
......@@ -50,7 +50,7 @@ int main(int argc, char* argv[])
// constants
const FReal epsilon = FReal(atof(argv[1]));
const unsigned int order = 10;
const unsigned int order = 4;
// number of interpolation points per cell
const unsigned int nnodes = TensorTraits<order>::nnodes;
......
......@@ -41,7 +41,7 @@
const FReal computeL2norm(unsigned int N, FReal *const u, FReal *const v)
FReal computeL2norm(unsigned int N, FReal *const u, FReal *const v)
{
FReal dot = FReal(0.);
FReal diff_dot = FReal(0.);
......@@ -55,7 +55,7 @@ const FReal computeL2norm(unsigned int N, FReal *const u, FReal *const v)
const FReal computeINFnorm(unsigned int N, FReal *const u, FReal *const v)
FReal computeINFnorm(unsigned int N, FReal *const u, FReal *const v)
{
FReal max = FReal(0.);
FReal diff_max = FReal(0.);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment