Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ScalFMM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
ScalFMM
Commits
741d8f8c
Commit
741d8f8c
authored
Mar 13, 2018
by
COULAUD Olivier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix SonarQube problem
parent
d70d77e1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
Src/Kernels/Chebyshev/FChebM2LHandler.hpp
Src/Kernels/Chebyshev/FChebM2LHandler.hpp
+11
-6
No files found.
Src/Kernels/Chebyshev/FChebM2LHandler.hpp
View file @
741d8f8c
...
...
@@ -474,15 +474,17 @@ unsigned int Compress(const FReal epsilon, const unsigned int ninteractions,
// init SVD
const
unsigned
int
LWORK
=
2
*
(
3
*
nnodes
+
ninteractions
*
nnodes
);
FReal
*
const
WORK
=
new
FReal
[
LWORK
];
FReal
*
const
WORK
=
new
FReal
[
LWORK
]
{}
;
// K_col ///////////////////////////////////////////////////////////
FReal
*
const
K_col
=
new
FReal
[
ninteractions
*
nnodes
*
nnodes
];
for
(
unsigned
int
i
=
0
;
i
<
ninteractions
;
++
i
)
for
(
unsigned
int
j
=
0
;
j
<
nnodes
;
++
j
)
for
(
unsigned
int
i
=
0
;
i
<
ninteractions
;
++
i
)
{
for
(
unsigned
int
j
=
0
;
j
<
nnodes
;
++
j
)
{
FBlas
::
copy
(
nnodes
,
C
+
i
*
nnodes
*
nnodes
+
j
*
nnodes
,
K_col
+
j
*
ninteractions
*
nnodes
+
i
*
nnodes
);
}
}
// singular value decomposition
FReal
*
const
Q
=
new
FReal
[
nnodes
*
nnodes
];
FReal
*
const
S
=
new
FReal
[
nnodes
];
...
...
@@ -499,8 +501,8 @@ unsigned int Compress(const FReal epsilon, const unsigned int ninteractions,
// Q' -> B
B
=
new
FReal
[
nnodes
*
k_col
];
for
(
unsigned
int
i
=
0
;
i
<
k_col
;
++
i
)
FBlas
::
copy
(
nnodes
,
Q
+
i
,
nnodes
,
B
+
i
*
nnodes
,
1
);
for
(
unsigned
int
i
=
0
;
i
<
k_col
;
++
i
)
{
FBlas
::
copy
(
nnodes
,
Q
+
i
,
nnodes
,
B
+
i
*
nnodes
,
1
);
}
// K_row //////////////////////////////////////////////////////////////
FReal
*
const
K_row
=
C
;
...
...
@@ -511,6 +513,10 @@ unsigned int Compress(const FReal epsilon, const unsigned int ninteractions,
if
(
info_row
!=
0
){
std
::
stringstream
stream
;
stream
<<
info_row
;
delete
[]
WORK
;
delete
[]
B
;
delete
[]
Q
;
delete
[]
S
;
throw
std
::
runtime_error
(
"SVD did not converge with "
+
stream
.
str
());
}
const
unsigned
int
k_row
=
FSvd
::
getRank
<
FReal
,
ORDER
>
(
S
,
epsilon
);
...
...
@@ -540,7 +546,6 @@ unsigned int Compress(const FReal epsilon, const unsigned int ninteractions,
B
+
j
*
nnodes
);
}
}
delete
[]
V
;
delete
[]
S
;
delete
[]
K_row
;
...
...
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