Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
64b860e9
Commit
64b860e9
authored
Jun 04, 2014
by
COULAUD Olivier
Browse files
Pb with utestChebyshevDirect.cpp and ICL++
parent
986c21fe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Src/Kernels/Chebyshev/FChebKernel.hpp
View file @
64b860e9
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, B
é
renger Bramas, Matthias Messner
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, B
e
renger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// This software is a computer program whose purpose is to compute the FMM.
//
...
...
@@ -60,9 +60,7 @@ public:
* precomputed and compressed M2L operators from a binary file (an
* runtime_error is thrown if the required file is not valid).
*/
FChebKernel
(
const
int
inTreeHeight
,
const
FReal
inBoxWidth
,
const
FPoint
&
inBoxCenter
,
FChebKernel
(
const
int
inTreeHeight
,
const
FReal
inBoxWidth
,
const
FPoint
&
inBoxCenter
,
const
FReal
Epsilon
)
:
FAbstractChebKernel
<
CellClass
,
ContainerClass
,
MatrixKernelClass
,
ORDER
,
NVALS
>
(
inTreeHeight
,
inBoxWidth
,
...
...
@@ -74,6 +72,11 @@ public:
M2LHandler
->
ComputeAndCompressAndSet
();
}
FChebKernel
(
const
int
inTreeHeight
,
const
FReal
inBoxWidth
,
const
FPoint
&
inBoxCenter
)
:
FChebKernel
(
inTreeHeight
,
inBoxWidth
,
inBoxCenter
,
FReal
(
1.0
/
FMath
::
pow
(
10
,
ORDER
)))
{
}
void
P2M
(
CellClass
*
const
LeafCell
,
const
ContainerClass
*
const
SourceParticles
)
...
...
Src/Kernels/Chebyshev/FChebSymM2LHandler.hpp
View file @
64b860e9
...
...
@@ -488,12 +488,12 @@ static void precompute(const MatrixKernelClass *const MatrixKernel, const FReal
}
}
}
std
::
cout
<<
"The approximation of the "
<<
counter
<<
" far-field interactions (overall rank "
<<
overall_rank
<<
" / "
<<
16
*
nnodes
<<
" , sizeM2L= "
<<
2
*
overall_rank
*
nnodes
*
sizeof
(
FReal
)
<<
""
<<
" / "
<<
16
*
nnodes
*
nnodes
*
sizeof
(
FReal
)
<<
" B"
<<
") took "
<<
overall_time
<<
"s
\n
"
<<
std
::
endl
;
//
std::cout << "The approximation of the " << counter
//
<< " far-field interactions (overall rank " << overall_rank
//
<< " / " << 16*nnodes
//
<< " , sizeM2L= " << 2*overall_rank*nnodes*sizeof(FReal) << ""
//
<< " / " << 16*nnodes*nnodes*sizeof(FReal) << " B"
//
<< ") took " << overall_time << "s\n" << std::endl;
delete
[]
U
;
delete
[]
WORK
;
delete
[]
VT
;
...
...
UTests/utestChebyshevDirect.cpp
View file @
64b860e9
...
...
@@ -56,7 +56,7 @@ class TestChebyshevDirect : public FUTester<TestChebyshevDirect> {
template
<
class
CellClass
,
class
ContainerClass
,
class
KernelClass
,
class
MatrixKernelClass
,
class
LeafClass
,
class
OctreeClass
,
class
FmmClass
>
void
RunTest
(
const
FReal
epsilon
)
{
void
RunTest
()
{
// Warning in make test the exec dir it Build/UTests
// Load particles
const
char
*
const
filename
=
(
sizeof
(
FReal
)
==
sizeof
(
float
))
?
...
...
@@ -71,9 +71,8 @@ class TestChebyshevDirect : public FUTester<TestChebyshevDirect> {
Print
(
"Number of particles:"
);
Print
(
loader
.
getNumberOfParticles
());
const
int
NbLevels
=
4
;
const
int
NbLevels
=
4
;
const
int
SizeSubLevels
=
2
;
//const FReal epsilon = FReal(1e-5);
// Create octree
struct
TestParticle
{
...
...
@@ -105,7 +104,7 @@ class TestChebyshevDirect : public FUTester<TestChebyshevDirect> {
// Run FMM
Print
(
"Fmm..."
);
KernelClass
kernels
(
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
()
,
epsilon
);
KernelClass
kernels
(
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
());
FmmClass
algo
(
&
tree
,
&
kernels
);
algo
.
execute
();
...
...
@@ -167,7 +166,7 @@ class TestChebyshevDirect : public FUTester<TestChebyshevDirect> {
// Assert
const
FReal
MaximumDiffPotential
=
FReal
(
9e-5
);
const
FReal
MaximumDiffForces
=
FReal
(
9e-3
);
const
FReal
MaximumDiffForces
=
FReal
(
9e-3
);
uassert
(
potentialDiff
.
getRelativeL2Norm
()
<
MaximumDiffPotential
);
uassert
(
potentialDiff
.
getRelativeInfNorm
()
<
MaximumDiffPotential
);
...
...
@@ -199,8 +198,7 @@ class TestChebyshevDirect : public FUTester<TestChebyshevDirect> {
/** TestChebKernel */
void
TestChebKernel
(){
const
unsigned
int
ORDER
=
5
;
const
FReal
epsilon
=
FReal
(
1e-5
);
const
unsigned
int
ORDER
=
6
;
typedef
FP2PParticleContainerIndexed
<>
ContainerClass
;
typedef
FSimpleLeaf
<
ContainerClass
>
LeafClass
;
typedef
FInterpMatrixKernelR
MatrixKernelClass
;
...
...
@@ -209,13 +207,12 @@ class TestChebyshevDirect : public FUTester<TestChebyshevDirect> {
typedef
FChebKernel
<
CellClass
,
ContainerClass
,
MatrixKernelClass
,
ORDER
>
KernelClass
;
typedef
FFmmAlgorithm
<
OctreeClass
,
CellClass
,
ContainerClass
,
KernelClass
,
LeafClass
>
FmmClass
;
// run test
RunTest
<
CellClass
,
ContainerClass
,
KernelClass
,
MatrixKernelClass
,
LeafClass
,
OctreeClass
,
FmmClass
>
(
epsilon
);
RunTest
<
CellClass
,
ContainerClass
,
KernelClass
,
MatrixKernelClass
,
LeafClass
,
OctreeClass
,
FmmClass
>
();
}
/** TestChebSymKernel */
void
TestChebSymKernel
(){
const
unsigned
int
ORDER
=
5
;
const
FReal
epsilon
=
FReal
(
1e-5
);
const
unsigned
int
ORDER
=
6
;
typedef
FP2PParticleContainerIndexed
<>
ContainerClass
;
typedef
FSimpleLeaf
<
ContainerClass
>
LeafClass
;
typedef
FInterpMatrixKernelR
MatrixKernelClass
;
...
...
@@ -224,7 +221,7 @@ class TestChebyshevDirect : public FUTester<TestChebyshevDirect> {
typedef
FChebSymKernel
<
CellClass
,
ContainerClass
,
MatrixKernelClass
,
ORDER
>
KernelClass
;
typedef
FFmmAlgorithm
<
OctreeClass
,
CellClass
,
ContainerClass
,
KernelClass
,
LeafClass
>
FmmClass
;
// run test
RunTest
<
CellClass
,
ContainerClass
,
KernelClass
,
MatrixKernelClass
,
LeafClass
,
OctreeClass
,
FmmClass
>
(
epsilon
);
RunTest
<
CellClass
,
ContainerClass
,
KernelClass
,
MatrixKernelClass
,
LeafClass
,
OctreeClass
,
FmmClass
>
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment