Commit 23553676 authored by Laurent Belcour's avatar Laurent Belcour
Browse files

Exporting the base environment in SCons

Correction of a bug in the data2moments code
parent d4f855f4
env = Environment()
Export('env')
external = env.SConscript('external/SConscript')
sources = env.SConscript('sources/SConscript')
......
......@@ -192,6 +192,7 @@ int main(int argc, char** argv)
const int dx = dim[0];
const int dy = dim[1];
int* indices = new int[nX];
// Integrate the moments over the integration domain
for(int i=0; i<nb; ++i)
......@@ -199,7 +200,6 @@ int main(int argc, char** argv)
// For the global index i of the sample, compute the index in the various
// dimensions and then compute the position within the dimension. All the
// samples are taken uniformly.
int indices[nX];
int global = i;
for(int k=0; k<nX; ++k)
{
......@@ -239,6 +239,9 @@ int main(int argc, char** argv)
}
}
// Clean memory
delete[] indices;
for(int k=0; k<nY; ++k)
{
m_x[k] /= m_0[k];
......
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