Commit 01f6c3ff authored by messner's avatar messner

minor changes


git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@418 2616d619-271b-44dc-8df4-d4a8f33a7222
parent 10473ae1
......@@ -360,8 +360,27 @@ FChebM2LHandler<ORDER, MatrixKernelClass>::ReadFromBinaryFileAndSet()
<< std::endl;
}
/*
unsigned int ReadRankFromBinaryFile(const std::string& filename)
{
// start reading process
std::ifstream stream(filename.c_str(), std::ios::in | std::ios::binary | std::ios::ate);
const std::ifstream::pos_type size = stream.tellg();
if (size<=0) throw std::runtime_error("The requested binary file does not exist.");
unsigned int rank = -1;
if (stream.good()) {
stream.seekg(0);
// 1) read number of interpolation points (int)
int npts;
stream.read(reinterpret_cast<char*>(&npts), sizeof(int));
// 2) read low rank (int)
stream.read(reinterpret_cast<char*>(&rank), sizeof(int));
return rank;
} else throw std::runtime_error("File could not be opened to read");
stream.close();
return rank;
}
*/
//////////////////////////////////////////////////////////////////////
......
......@@ -75,8 +75,8 @@ const FReal computeINFnorm(unsigned int N, FReal *const u, FReal *const v)
int main(int argc, char* argv[])
{
const unsigned int ORDER = 4;
const FReal epsilon = FParameters::getValue(argc, argv, "-eps", FReal(1e-3));
const long NbPart = FParameters::getValue(argc, argv, "-num", 100000);
const FReal epsilon = FParameters::getValue(argc, argv, "-eps", FReal(1e-4));
const long NbPart = FParameters::getValue(argc, argv, "-num", 500000);
const unsigned int TreeHeight = FParameters::getValue(argc, argv, "-h", 5);
const unsigned int SubTreeHeight = FParameters::getValue(argc, argv, "-sh", 2);
......@@ -161,7 +161,6 @@ int main(int argc, char* argv[])
// force
F3DPosition force(iTarget.data().getPosition() - iSource.data().getPosition());
force *= ((ws*wt) * (one_over_r*one_over_r*one_over_r));
// force
Force[counter*3 + 0] += force.getX();
Force[counter*3 + 1] += force.getY();
Force[counter*3 + 2] += force.getZ();
......
......@@ -79,7 +79,7 @@ int main(int, char **){
////////////////////////////////////////////////////////////////////
LeafClass X;
F3DPosition cx(0., 0., 0.);
const long M = 10000;
const unsigned long M = 10000;
std::cout << "Fill the leaf X of width " << width
<< " centered at cx=" << cx << " with M=" << M << " target particles" << std::endl;
{
......@@ -98,7 +98,7 @@ int main(int, char **){
////////////////////////////////////////////////////////////////////
LeafClass Y;
F3DPosition cy(FReal(2.)*width, 0., 0.);
const long N = 10000;
const unsigned long N = 10000;
std::cout << "Fill the leaf Y of width " << width
<< " centered at cy=" << cy << " with N=" << N << " target particles" << std::endl;
{
......
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