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
d1cb64fa
Commit
d1cb64fa
authored
May 12, 2017
by
COULAUD Olivier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace fabs by std::abs, remove unitialized variables
parent
f2b2cac0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
24 deletions
+24
-24
Src/Adaptive/FNode.hpp
Src/Adaptive/FNode.hpp
+1
-1
Src/Files/FBasicLoader.hpp
Src/Files/FBasicLoader.hpp
+12
-11
Src/Kernels/Chebyshev/FChebRoots.hpp
Src/Kernels/Chebyshev/FChebRoots.hpp
+4
-4
Src/Kernels/Uniform/FUnifRoots.hpp
Src/Kernels/Uniform/FUnifRoots.hpp
+4
-4
UTests/FUTester.hpp
UTests/FUTester.hpp
+3
-4
No files found.
Src/Adaptive/FNode.hpp
View file @
d1cb64fa
...
...
@@ -494,7 +494,7 @@ public:
position_t
other_center
=
other
.
getBox
().
center
();
for
(
std
::
size_t
i
=
0
;
i
<
Dim
;
++
i
)
{
FReal
distance
=
f
abs
(
my_center
[
i
]
-
other_center
[
i
]);
FReal
distance
=
std
::
abs
(
my_center
[
i
]
-
other_center
[
i
]);
if
(
Ffeq
(
distance
,
centers_distance
)
)
{
one_axis_is_at_exact_distance
=
true
;
}
else
if
(
distance
>
centers_distance
)
{
...
...
Src/Files/FBasicLoader.hpp
View file @
d1cb64fa
...
...
@@ -59,6 +59,7 @@ public:
else
{
this
->
boxWidth
=
0
;
this
->
nbParticles
=
0
;
this
->
centerOfBox
.
setPosition
(
0.0
,
0.0
,
0.0
);
}
}
...
...
Src/Kernels/Chebyshev/FChebRoots.hpp
View file @
d1cb64fa
...
...
@@ -46,8 +46,8 @@ struct FChebRoots : FNoCopyable
static
FReal
T
(
const
unsigned
int
n
,
FReal
x
)
{
//std::cout << x << std::endl;
assert
(
std
::
f
abs
(
x
)
-
1.
<
10.
*
std
::
numeric_limits
<
FReal
>::
epsilon
());
if
(
std
::
f
abs
(
x
)
>
1.
)
{
assert
(
std
::
abs
(
x
)
-
1.
<
10.
*
std
::
numeric_limits
<
FReal
>::
epsilon
());
if
(
std
::
abs
(
x
)
>
1.
)
{
x
=
(
x
>
FReal
(
1.
)
?
FReal
(
1.
)
:
x
);
x
=
(
x
<
FReal
(
-
1.
)
?
FReal
(
-
1.
)
:
x
);
}
...
...
@@ -68,8 +68,8 @@ struct FChebRoots : FNoCopyable
*/
static
FReal
U
(
const
unsigned
int
n
,
FReal
x
)
{
assert
(
std
::
f
abs
(
x
)
-
1.
<
10.
*
std
::
numeric_limits
<
FReal
>::
epsilon
());
if
(
std
::
f
abs
(
x
)
>
1.
)
{
assert
(
std
::
abs
(
x
)
-
1.
<
10.
*
std
::
numeric_limits
<
FReal
>::
epsilon
());
if
(
std
::
abs
(
x
)
>
1.
)
{
x
=
(
x
>
FReal
(
1.
)
?
FReal
(
1.
)
:
x
);
x
=
(
x
<
FReal
(
-
1.
)
?
FReal
(
-
1.
)
:
x
);
}
...
...
Src/Kernels/Uniform/FUnifRoots.hpp
View file @
d1cb64fa
...
...
@@ -48,8 +48,8 @@ struct FUnifRoots : FNoCopyable
*/
static
FReal
L
(
const
unsigned
int
n
,
FReal
x
)
{
assert
(
std
::
f
abs
(
x
)
-
1.
<
10.
*
std
::
numeric_limits
<
FReal
>::
epsilon
());
if
(
std
::
f
abs
(
x
)
>
1.
)
{
assert
(
std
::
abs
(
x
)
-
1.
<
10.
*
std
::
numeric_limits
<
FReal
>::
epsilon
());
if
(
std
::
abs
(
x
)
>
1.
)
{
//std::cout << "x=" << x << " out of bounds!" << std::endl;
x
=
(
x
>
FReal
(
1.
)
?
FReal
(
1.
)
:
x
);
x
=
(
x
<
FReal
(
-
1.
)
?
FReal
(
-
1.
)
:
x
);
...
...
@@ -93,8 +93,8 @@ struct FUnifRoots : FNoCopyable
*/
static
FReal
dL
(
const
unsigned
int
n
,
FReal
x
)
{
assert
(
std
::
f
abs
(
x
)
-
1.
<
10.
*
std
::
numeric_limits
<
FReal
>::
epsilon
());
if
(
std
::
f
abs
(
x
)
>
1.
)
{
assert
(
std
::
abs
(
x
)
-
1.
<
10.
*
std
::
numeric_limits
<
FReal
>::
epsilon
());
if
(
std
::
abs
(
x
)
>
1.
)
{
x
=
(
x
>
FReal
(
1.
)
?
FReal
(
1.
)
:
x
);
x
=
(
x
<
FReal
(
-
1.
)
?
FReal
(
-
1.
)
:
x
);
}
...
...
UTests/FUTester.hpp
View file @
d1cb64fa
...
...
@@ -41,7 +41,7 @@ class FUTester{
};
std
::
list
<
TestFuncDescriptor
>
tests
;
//< all tests
std
::
list
<
TestFuncDescriptor
>
tests
=
{}
;
//< all tests
int
totalTests
;
//< number of tests
...
...
@@ -53,9 +53,8 @@ class FUTester{
protected:
/** Constructor */
FUTester
(){
totalTests
=
0
;
}
FUTester
()
:
totalTests
(
0
),
currentTest
(
0
),
currentStep
(
0
),
failedSteps
(
0
),
failedTests
(
0
)
{
}
/** Callback before processing test */
virtual
void
Before
(){}
...
...
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