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
9919134d
Commit
9919134d
authored
May 13, 2015
by
BLANCHARD Pierre
Browse files
Resolved some warnings related to float/double conversion.
parent
88be8bd4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Src/Files/FFmaGenericLoader.hpp
View file @
9919134d
...
...
@@ -631,7 +631,7 @@ public:
if
(
ndata
!=
typeFReal
[
1
]){
typeFReal
[
1
]
=
ndata
;
}
FReal
x
=
boxWidth
*
0.5
;
FReal
x
=
boxWidth
*
FReal
(
0.5
)
;
if
(
this
->
binaryFile
)
{
this
->
writerBinaryHeader
(
centerOfBox
,
x
,
nbParticles
,
typeFReal
);
}
...
...
@@ -654,7 +654,7 @@ public:
void
writeHeader
(
const
FPoint
<
FReal
>
&
centerOfBox
,
const
FReal
&
boxWidth
,
const
FSize
&
nbParticles
,
const
unsigned
int
dataType
,
const
unsigned
int
nbDataPerRecord
)
{
unsigned
int
typeFReal
[
2
]
=
{
dataType
,
nbDataPerRecord
};
FReal
x
=
boxWidth
*
0.5
;
FReal
x
=
boxWidth
*
FReal
(
0.5
)
;
if
(
this
->
binaryFile
)
{
this
->
writerBinaryHeader
(
centerOfBox
,
x
,
nbParticles
,
typeFReal
);
}
...
...
Src/Kernels/Interpolation/FInterpTensor.hpp
View file @
9919134d
...
...
@@ -144,7 +144,7 @@ public:
{
1
,
1
,
-
1
},
{
1
,
1
,
1
}
};
// Translate center if cell widths are extended
const
FReal
frac
=
(
1.
-
ExtendedCellRatio
);
const
FReal
frac
=
(
FReal
(
1.
)
-
ExtendedCellRatio
);
ChildCenter
.
setX
(
FReal
(
RelativeChildPositions
[
ChildIndex
][
0
])
*
frac
);
ChildCenter
.
setY
(
FReal
(
RelativeChildPositions
[
ChildIndex
][
1
])
*
frac
);
...
...
Src/Kernels/Uniform/FUnifInterpolator.hpp
View file @
9919134d
...
...
@@ -121,7 +121,7 @@ class FUnifInterpolator : FNoCopyable
FReal
(
FReal
(
ParentWidth
)
/
FReal
(
2.
)
+
CellWidthExtension
)
/
FReal
(
ParentWidth
+
CellWidthExtension
);
// Child cell width
const
FReal
ChildWidth
(
2.
*
ExtendedCellRatio
);
const
FReal
ChildWidth
(
FReal
(
2.
)
*
ExtendedCellRatio
);
// loop: child cells
for
(
unsigned
int
child
=
0
;
child
<
8
;
++
child
)
{
...
...
Src/Kernels/Uniform/FUnifRoots.hpp
View file @
9919134d
...
...
@@ -75,9 +75,9 @@ struct FUnifRoots : FNoCopyable
// NB: scale factor could be hardcoded (just as the roots)
FReal
scale
;
int
omn
=
order
-
n
-
1
;
if
(
omn
%
2
)
scale
=-
1.
;
// (-1)^(n-1-(k+1)+1)=(-1)^(omn-1)
else
scale
=
1.
;
scale
/=
FMath
::
pow
(
2.
,
order
-
1
)
*
FMath
::
factorial
<
FReal
>
(
n
)
*
FMath
::
factorial
<
FReal
>
(
omn
);
if
(
omn
%
2
)
scale
=
FReal
(
-
1.
)
;
// (-1)^(n-1-(k+1)+1)=(-1)^(omn-1)
else
scale
=
FReal
(
1.
)
;
scale
/=
FReal
(
FMath
::
pow
(
FReal
(
2.
)
,
order
-
1
)
*
FMath
::
factorial
<
FReal
>
(
n
)
*
FMath
::
factorial
<
FReal
>
(
omn
)
)
;
// compute L
FReal
L
=
FReal
(
1.
);
...
...
@@ -88,7 +88,7 @@ struct FUnifRoots : FNoCopyable
// new version (reducing round-off)
// regular grid on [-1,1] (h simplifies, only the size of the domain and a remains i.e. 2. and -1.)
L
*=
((
order
-
1
)
*
(
x
+
1.
)
-
2.
*
m
);
L
*=
(
FReal
(
order
-
1
)
*
(
x
+
FReal
(
1.
)
)
-
FReal
(
2.
)
*
FReal
(
m
)
);
}
}
...
...
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