Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
ce4ebe2b
Commit
ce4ebe2b
authored
Jun 20, 2012
by
Matthias Messner
Browse files
bla
parent
f5450854
Changes
2
Hide whitespace changes
Inline
Side-by-side
Tests/Kernels/testChebAlgorithm.cpp
View file @
ce4ebe2b
...
...
@@ -80,8 +80,8 @@ int main(int argc, char* argv[])
const
unsigned
int
SubTreeHeight
=
FParameters
::
getValue
(
argc
,
argv
,
"-sh"
,
2
);
const
unsigned
int
NbThreads
=
FParameters
::
getValue
(
argc
,
argv
,
"-t"
,
1
);
const
unsigned
int
ORDER
=
7
;
const
FReal
epsilon
=
FReal
(
1e-
7
);
const
unsigned
int
ORDER
=
9
;
const
FReal
epsilon
=
FReal
(
1e-
9
);
// init timer
FTic
time
;
...
...
Tests/Utils/testACA.cpp
View file @
ce4ebe2b
...
...
@@ -74,21 +74,34 @@ int main(int argc, char* argv[])
typedef
FChebMatrixKernelR
MatrixKernelClass
;
MatrixKernelClass
MatrixKernel
;
const
unsigned
int
ORDER
=
10
;
const
FReal
epsilon
=
1e-
10
;
const
unsigned
int
ORDER
=
5
;
const
FReal
epsilon
=
1e-
5
;
const
unsigned
int
nnodes
=
TensorTraits
<
ORDER
>::
nnodes
;
// cell size
FReal
width
=
FReal
(
2.
);
//// width of cell X and Y
//FReal wx = FReal(2.);
//FReal wy = FReal(2.);
//// centers of cells X and Y
//FPoint cx( 0., 0., 0.);
//FPoint cy( 4., 0., 0.);
// width of cell X and Y
FReal
wx
=
FReal
(
2.
);
FReal
wy
=
FReal
(
4.
);
// centers of cells X and Y
FPoint
cx
(
0.
,
0.
,
0.
);
FPoint
cy
(
FReal
(
2.
)
*
width
,
0.
,
0.
);
FPoint
cx
(
1.
,
-
1.
,
-
1.
);
//FPoint cy(-4., 0., 0.);
FPoint
cy
(
-
4.
,
4.
,
4.
);
std
::
cout
<<
"[cx = "
<<
cx
<<
", wx = "
<<
wx
<<
"] [cy = "
<<
cy
<<
", wy = "
<<
wy
<<
"] -> dist = "
<<
FPoint
(
cx
-
cy
).
norm
()
<<
std
::
endl
;
// compute Cheb points in cells X and Y
FPoint
rootsX
[
nnodes
],
rootsY
[
nnodes
];
FChebTensor
<
ORDER
>::
setRoots
(
cx
,
w
idth
,
rootsX
);
FChebTensor
<
ORDER
>::
setRoots
(
cy
,
w
idth
,
rootsY
);
FChebTensor
<
ORDER
>::
setRoots
(
cx
,
w
x
,
rootsX
);
FChebTensor
<
ORDER
>::
setRoots
(
cy
,
w
y
,
rootsY
);
// initialize timer
...
...
@@ -118,7 +131,7 @@ int main(int argc, char* argv[])
FReal
*
U
,
*
V
;
unsigned
int
k
;
/*
// call fACA /////////////////////////////////
std
::
cout
<<
"|- Computing fACA"
<<
std
::
flush
;
time
.
tic
();
...
...
@@ -132,11 +145,11 @@ int main(int argc, char* argv[])
FBlas
::
gemtv
(
nnodes
,
k
,
FReal
(
1.
),
V
,
w
,
c1
);
FBlas
::
gemv
(
nnodes
,
k
,
FReal
(
1.
),
U
,
c1
,
f1
);
delete
[]
c1
;
std::cout << "
|- L2 error = " << computeL2norm(nnodes, f0, f1) << std::endl;
std
::
cout
<<
"
|
|- L2 error = "
<<
computeL2norm
(
nnodes
,
f0
,
f1
)
<<
std
::
endl
;
delete
[]
U
;
delete
[]
V
;
delete
[]
f1
;
*/
// call pACA ///////////////////////////////////
std
::
cout
<<
"|- Computing pACA"
<<
std
::
flush
;
...
...
@@ -149,7 +162,7 @@ int main(int argc, char* argv[])
FBlas
::
gemtv
(
nnodes
,
k
,
FReal
(
1.
),
V
,
w
,
c2
);
FBlas
::
gemv
(
nnodes
,
k
,
FReal
(
1.
),
U
,
c2
,
f2
);
delete
[]
c2
;
std
::
cout
<<
"
|- L2 error = "
<<
computeL2norm
(
nnodes
,
f0
,
f2
)
<<
std
::
endl
;
std
::
cout
<<
"
|
|- L2 error = "
<<
computeL2norm
(
nnodes
,
f0
,
f2
)
<<
std
::
endl
;
delete
[]
U
;
delete
[]
V
;
...
...
Write
Preview
Markdown
is supported
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