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
b07e0909
Commit
b07e0909
authored
Mar 01, 2018
by
COULAUD Olivier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove initializer warnings
parent
a991bebc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
15 deletions
+22
-15
Src/Kernels/Chebyshev/FChebSymM2LHandler.hpp
Src/Kernels/Chebyshev/FChebSymM2LHandler.hpp
+8
-6
Src/Kernels/Interpolation/FInterpSymmetries.hpp
Src/Kernels/Interpolation/FInterpSymmetries.hpp
+14
-9
No files found.
Src/Kernels/Chebyshev/FChebSymM2LHandler.hpp
View file @
b07e0909
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#ifndef FCHEBSYMM2LHANDLER_HPP
#ifndef FCHEBSYMM2LHANDLER_HPP
#define FCHEBSYMM2LHANDLER_HPP
#define FCHEBSYMM2LHANDLER_HPP
#include <array>
#include <climits>
#include <climits>
#include <sstream>
#include <sstream>
...
@@ -36,9 +37,10 @@
...
@@ -36,9 +37,10 @@
permutations of the 16 we compute in this function). Depending on whether
permutations of the 16 we compute in this function). Depending on whether
FACASVD is defined or not, either ACA+SVD or only SVD is used to compress
FACASVD is defined or not, either ACA+SVD or only SVD is used to compress
them. */
them. */
template
<
class
FReal
,
int
ORDER
,
typename
MatrixKernelClass
>
template
<
class
FReal
,
int
ORDER
,
typename
MatrixKernelClass
,
class
ArrayK
,
class
ArrayLr
>
static
void
precompute
(
const
MatrixKernelClass
*
const
MatrixKernel
,
const
FReal
CellWidth
,
static
void
precompute
(
const
MatrixKernelClass
*
const
MatrixKernel
,
const
FReal
CellWidth
,
const
FReal
Epsilon
,
FReal
*
K
[
343
],
int
LowRank
[
343
])
const
FReal
Epsilon
,
ArrayK
K
,
ArrayLr
LowRank
)
// const FReal Epsilon, FReal* K[343], int LowRank[343])
{
{
// std::cout << "\nComputing 16 far-field interactions (l=" << ORDER << ", eps=" << Epsilon
// std::cout << "\nComputing 16 far-field interactions (l=" << ORDER << ", eps=" << Epsilon
// << ") for cells of width w = " << CellWidth << std::endl;
// << ") for cells of width w = " << CellWidth << std::endl;
...
@@ -492,10 +494,10 @@ static void ComputeAndCompressAndStoreInBinaryFile(const MatrixKernelClass *cons
...
@@ -492,10 +494,10 @@ static void ComputeAndCompressAndStoreInBinaryFile(const MatrixKernelClass *cons
static
const
unsigned
int
nnodes
=
ORDER
*
ORDER
*
ORDER
;
static
const
unsigned
int
nnodes
=
ORDER
*
ORDER
*
ORDER
;
// compute and compress ////////////
// compute and compress ////////////
FReal
*
K
[
343
]
;
std
::
array
<
FReal
*
,
343
>
K
{}
;
int
LowRank
[
343
]
;
std
::
array
<
int
,
343
>
LowRank
{}
;
for
(
unsigned
int
idx
=
0
;
idx
<
343
;
++
idx
)
//
for (unsigned int idx=0; idx<343; ++idx)
{
K
[
idx
]
=
nullptr
;
LowRank
[
idx
]
=
0
;
}
//
{ K[idx] = nullptr; LowRank[idx] = 0; }
precompute
<
FReal
,
ORDER
>
(
MatrixKernel
,
FReal
(
2.
),
Epsilon
,
K
,
LowRank
);
precompute
<
FReal
,
ORDER
>
(
MatrixKernel
,
FReal
(
2.
),
Epsilon
,
K
,
LowRank
);
// write to binary file ////////////
// write to binary file ////////////
...
...
Src/Kernels/Interpolation/FInterpSymmetries.hpp
View file @
b07e0909
...
@@ -48,8 +48,9 @@ class FInterpSymmetries
...
@@ -48,8 +48,9 @@ class FInterpSymmetries
// set quads and cones permutations
// set quads and cones permutations
unsigned
int
evn
[
ORDER
],
odd
[
ORDER
];
unsigned
int
evn
[
ORDER
],
odd
[
ORDER
];
for
(
unsigned
int
o
=
0
;
o
<
ORDER
;
++
o
)
for
(
unsigned
int
o
=
0
;
o
<
ORDER
;
++
o
)
{
{
evn
[
o
]
=
o
;
odd
[
o
]
=
ORDER
-
1
-
o
;}
evn
[
o
]
=
o
;
odd
[
o
]
=
ORDER
-
1
-
o
;}
for
(
unsigned
int
i
=
0
;
i
<
ORDER
;
++
i
)
{
for
(
unsigned
int
i
=
0
;
i
<
ORDER
;
++
i
)
{
for
(
unsigned
int
j
=
0
;
j
<
ORDER
;
++
j
)
{
for
(
unsigned
int
j
=
0
;
j
<
ORDER
;
++
j
)
{
...
@@ -81,12 +82,15 @@ class FInterpSymmetries
...
@@ -81,12 +82,15 @@ class FInterpSymmetries
}
}
// set 48 global permutations (combinations of 8 quadrants and 6 cones respectively)
// set 48 global permutations (combinations of 8 quadrants and 6 cones respectively)
for
(
unsigned
int
q
=
0
;
q
<
8
;
++
q
)
for
(
unsigned
int
q
=
0
;
q
<
8
;
++
q
)
{
for
(
unsigned
int
c
=
0
;
c
<
8
;
++
c
)
for
(
unsigned
int
c
=
0
;
c
<
8
;
++
c
){
if
(
c
!=
2
&&
c
!=
5
)
// cone 2 and 5 do not exist
if
(
c
!=
2
&&
c
!=
5
)
{
// cone 2 and 5 do not exist
for
(
unsigned
int
n
=
0
;
n
<
nnodes
;
++
n
)
for
(
unsigned
int
n
=
0
;
n
<
nnodes
;
++
n
){
permutations
[
q
*
8
+
c
][
n
]
=
cones
[
c
][
quads
[
q
][
n
]];
permutations
[
q
*
8
+
c
][
n
]
=
cones
[
c
][
quads
[
q
][
n
]];
}
}
}
}
// permutation of interaction indices (already absolute value)
// permutation of interaction indices (already absolute value)
perms
[
0
][
0
]
=
0
;
perms
[
0
][
1
]
=
1
;
perms
[
0
][
2
]
=
2
;
perms
[
0
][
0
]
=
0
;
perms
[
0
][
1
]
=
1
;
perms
[
0
][
2
]
=
2
;
perms
[
1
][
0
]
=
0
;
perms
[
1
][
1
]
=
2
;
perms
[
1
][
2
]
=
1
;
perms
[
1
][
0
]
=
0
;
perms
[
1
][
1
]
=
2
;
perms
[
1
][
2
]
=
1
;
...
@@ -119,7 +123,8 @@ class FInterpSymmetries
...
@@ -119,7 +123,8 @@ class FInterpSymmetries
const
int
cidx
=
(
q2
|
q1
|
q0
);
const
int
cidx
=
(
q2
|
q1
|
q0
);
// set permutation array /////////////////////////////////////////
// set permutation array /////////////////////////////////////////
for
(
unsigned
int
n
=
0
;
n
<
nnodes
;
++
n
)
permutation
[
n
]
=
permutations
[
qidx
*
8
+
cidx
][
n
];
for
(
unsigned
int
n
=
0
;
n
<
nnodes
;
++
n
)
{
permutation
[
n
]
=
permutations
[
qidx
*
8
+
cidx
][
n
];
}
// set permutation index /////////////////////////////////////////
// set permutation index /////////////////////////////////////////
return
static_cast
<
unsigned
>
(
u
[
perms
[
cidx
][
0
]]
+
3
)
*
7
*
7
+
(
u
[
perms
[
cidx
][
1
]]
+
3
)
*
7
+
(
u
[
perms
[
cidx
][
2
]]
+
3
);
return
static_cast
<
unsigned
>
(
u
[
perms
[
cidx
][
0
]]
+
3
)
*
7
*
7
+
(
u
[
perms
[
cidx
][
1
]]
+
3
)
*
7
+
(
u
[
perms
[
cidx
][
2
]]
+
3
);
...
...
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