Commit 5c6d11eb by David Moxey

Merge branch 'ticket/9-int-parameter-rounding' into 'master'

Fix integer parameter rounding

Closes #9

See merge request !774
2 parents dba50c3d c948b39d
......@@ -28,6 +28,7 @@ v4.4.1
- Fix interpolation issue with Lagrange basis functions (!768)
- Fix issue with average fields not working with different polynomial order
fields (!776)
- Fix rounding of integer parameters (!774)
- Fix Hdf5 output in FilterFieldConvert (!781)
- Fixed extreme memory consumption of Interpolator when interpolating from pts
to fld or between different meshes (!783)
......
......@@ -719,7 +719,7 @@ namespace Nektar
ParameterMap::const_iterator paramIter = m_parameters.find(vName);
ASSERTL0(paramIter != m_parameters.end(), "Required parameter '" +
pName + "' not specified in session.");
pVar = (int)floor(paramIter->second);
pVar = (int)round(paramIter->second);
}
......@@ -733,7 +733,7 @@ namespace Nektar
ParameterMap::const_iterator paramIter = m_parameters.find(vName);
if(paramIter != m_parameters.end())
{
pVar = (int)floor(paramIter->second);
pVar = (int)round(paramIter->second);
}
else
{
......
......@@ -90,7 +90,7 @@ FilterAeroForces::FilterAeroForces(
else
{
LibUtilities::Equation equ(m_session, it->second);
m_outputFrequency = floor(equ.Evaluate());
m_outputFrequency = round(equ.Evaluate());
}
// Time after which we need to calculate the forces
......
......@@ -66,7 +66,7 @@ FilterCheckpoint::FilterCheckpoint(
it = pParams.find("OutputFrequency");
ASSERTL0(it != pParams.end(), "Missing parameter 'OutputFrequency'.");
LibUtilities::Equation equ(m_session, it->second);
m_outputFrequency = floor(equ.Evaluate());
m_outputFrequency = round(equ.Evaluate());
m_fld = LibUtilities::FieldIO::CreateDefault(pSession);
}
......
......@@ -86,7 +86,7 @@ FilterEnergy1D::FilterEnergy1D(
else
{
LibUtilities::Equation equ(m_session, it->second);
m_outputFrequency = floor(equ.Evaluate());
m_outputFrequency = round(equ.Evaluate());
}
}
......
......@@ -88,7 +88,7 @@ FilterEnergyBase::FilterEnergyBase(
it = pParams.find("OutputFrequency");
ASSERTL0(it != pParams.end(), "Missing parameter 'OutputFrequency'.");
LibUtilities::Equation equ(m_session, it->second);
m_outputFrequency = floor(equ.Evaluate());
m_outputFrequency = round(equ.Evaluate());
}
FilterEnergyBase::~FilterEnergyBase()
......
......@@ -105,7 +105,7 @@ FilterFieldConvert::FilterFieldConvert(
else
{
LibUtilities::Equation equ(m_session, it->second);
m_sampleFrequency = floor(equ.Evaluate());
m_sampleFrequency = round(equ.Evaluate());
}
// OutputFrequency
......@@ -117,7 +117,7 @@ FilterFieldConvert::FilterFieldConvert(
else
{
LibUtilities::Equation equ(m_session, it->second);
m_outputFrequency = floor(equ.Evaluate());
m_outputFrequency = round(equ.Evaluate());
}
m_numSamples = 0;
......
......@@ -84,7 +84,7 @@ FilterHistoryPoints::FilterHistoryPoints(
else
{
LibUtilities::Equation equ(m_session, it->second);
m_outputFrequency = floor(equ.Evaluate());
m_outputFrequency = round(equ.Evaluate());
}
// OutputPlane
......@@ -99,7 +99,7 @@ FilterHistoryPoints::FilterHistoryPoints(
else
{
LibUtilities::Equation equ(m_session, it->second);
m_outputPlane = floor(equ.Evaluate());
m_outputPlane = round(equ.Evaluate());
}
it = pParams.find("WaveSpace");
......
......@@ -83,7 +83,7 @@ FilterModalEnergy::FilterModalEnergy(
else
{
LibUtilities::Equation equ(m_session, it->second);
m_outputFrequency = floor(equ.Evaluate());
m_outputFrequency = round(equ.Evaluate());
}
......@@ -107,7 +107,7 @@ FilterModalEnergy::FilterModalEnergy(
else
{
LibUtilities::Equation equ(m_session, it->second);
m_outputPlane = floor(equ.Evaluate());
m_outputPlane = round(equ.Evaluate());
}
}
......
......@@ -94,7 +94,7 @@ FilterMovingBody::FilterMovingBody(
else
{
LibUtilities::Equation equ(m_session, it->second);
m_outputFrequency = floor(equ.Evaluate());
m_outputFrequency = round(equ.Evaluate());
}
pSession->MatchSolverInfo("Homogeneous", "1D", m_isHomogeneous1D, false);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!