Commit 57af4614 authored by mattijs's avatar mattijs
Browse files

small porting warnings

parent 0a1a66ec
......@@ -67,7 +67,12 @@ void Foam::Time::readDict()
case wcAdjustableRunTime:
// Recalculate outputTimeIndex_ to be in units of current
// writeInterval.
outputTimeIndex_ *= oldWriteInterval/writeInterval_;
outputTimeIndex_ = label
(
outputTimeIndex_
* oldWriteInterval
/ writeInterval_
);
break;
default:
......
......@@ -59,7 +59,7 @@ const NamedEnum<shellSurfaces::refineMode, 3> shellSurfaces::refineModeNames_;
void Foam::shellSurfaces::setAndCheckLevels
(
const scalar shellI,
const label shellI,
const List<Tuple2<scalar, label> >& distLevels
)
{
......
......@@ -97,7 +97,7 @@ private:
//- Helper function for initialisation.
void setAndCheckLevels
(
const scalar shellI,
const label shellI,
const List<Tuple2<scalar, label> >&
);
......
......@@ -78,11 +78,14 @@ Type Foam::Table<Type>::value(const scalar x) const
i++;
}
// Linear interpolation to find value
return
// Linear interpolation to find value. Note constructor needed for
// Table<label> to convert intermediate scalar back to label.
return Type
(
(x - table_[i].first())/(table_[i+1].first() - table_[i].first())
* (table_[i+1].second() - table_[i].second())
+ table_[i].second();
+ table_[i].second()
);
}
......
......@@ -98,7 +98,7 @@ Foam::scalar Foam::pairPotential::forceLookup(const scalar r) const
{
scalar k_rIJ = (r - rMin_)/dr_;
label k(k_rIJ);
label k = label(k_rIJ);
if (k < 0)
{
......@@ -135,7 +135,7 @@ Foam::scalar Foam::pairPotential::energyLookup(const scalar r) const
{
scalar k_rIJ = (r - rMin_)/dr_;
label k(k_rIJ);
label k = label(k_rIJ);
if (k < 0)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment