Commit b101ba57 authored by David Moxey's avatar David Moxey

ADRSolver compiling

parent a61639ba
......@@ -118,11 +118,13 @@ void OutputInfo::Process(po::variables_map &vm)
// Construct MeshGraph to read geometry.
SpatialDomains::MeshGraphSharedPtr mesh =
GetMeshGraphFactory().CreateInstance(vSession->GetGeometryType());
SpatialDomains::GetMeshGraphFactory().CreateInstance(
vSession->GetGeometryType());
SpatialDomains::MeshPartitionSharedPtr vMeshPartition =
SpatialDomains::GetMeshPartitionFactory().CreateInstance(
vPartitionerName, vSession);
vPartitionerName, vSession, mesh);
mesh->ReadGeometry(SpatialDomains::NullDomainRangeShPtr, false);
vMeshPartition->PartitionMesh(nparts, true);
......
......@@ -120,7 +120,7 @@ void ProcessCreateExp::Process(po::variables_map &vm)
{
for (auto &compIter : domain[d])
{
for (auto &x : *compIter.second->m_geomVec)
for (auto &x : compIter.second->m_geomVec)
{
IDs.push_back(x->GetGlobalID());
}
......
......@@ -88,7 +88,8 @@ FilterAeroForces::FilterAeroForces(
}
else
{
LibUtilities::Equation equ(m_session, it->second);
LibUtilities::Equation equ(
m_session->GetExpressionEvaluator(), it->second);
m_outputFrequency = round(equ.Evaluate());
}
......@@ -100,7 +101,8 @@ FilterAeroForces::FilterAeroForces(
}
else
{
LibUtilities::Equation equ(m_session, it->second);
LibUtilities::Equation equ(
m_session->GetExpressionEvaluator(), it->second);
m_startTime = equ.Evaluate();
}
......@@ -169,7 +171,8 @@ FilterAeroForces::FilterAeroForces(
directionStream >> directionString;
if (!directionString.empty())
{
LibUtilities::Equation equ(m_session, directionString);
LibUtilities::Equation equ(
m_session->GetExpressionEvaluator(), directionString);
m_directions[i][j] = equ.Evaluate();
norm += m_directions[i][j]*m_directions[i][j];
}
......
......@@ -63,7 +63,7 @@ FilterCheckpoint::FilterCheckpoint(
// OutputFrequency
it = pParams.find("OutputFrequency");
ASSERTL0(it != pParams.end(), "Missing parameter 'OutputFrequency'.");
LibUtilities::Equation equ(m_session, it->second);
LibUtilities::Equation equ(m_session->GetExpressionEvaluator(), it->second);
m_outputFrequency = round(equ.Evaluate());
m_fld = LibUtilities::FieldIO::CreateDefault(pSession);
......
......@@ -84,7 +84,8 @@ FilterEnergy1D::FilterEnergy1D(
}
else
{
LibUtilities::Equation equ(m_session, it->second);
LibUtilities::Equation equ(
m_session->GetExpressionEvaluator(), it->second);
m_outputFrequency = round(equ.Evaluate());
}
}
......
......@@ -86,7 +86,7 @@ FilterEnergyBase::FilterEnergyBase(
// OutputFrequency
it = pParams.find("OutputFrequency");
ASSERTL0(it != pParams.end(), "Missing parameter 'OutputFrequency'.");
LibUtilities::Equation equ(m_session, it->second);
LibUtilities::Equation equ(m_session->GetExpressionEvaluator(), it->second);
m_outputFrequency = round(equ.Evaluate());
}
......
......@@ -102,7 +102,8 @@ FilterFieldConvert::FilterFieldConvert(
}
else
{
LibUtilities::Equation equ(m_session, it->second);
LibUtilities::Equation equ(
m_session->GetExpressionEvaluator(), it->second);
m_sampleFrequency = round(equ.Evaluate());
}
......@@ -114,7 +115,8 @@ FilterFieldConvert::FilterFieldConvert(
}
else
{
LibUtilities::Equation equ(m_session, it->second);
LibUtilities::Equation equ(
m_session->GetExpressionEvaluator(), it->second);
m_outputFrequency = round(equ.Evaluate());
}
......
......@@ -81,7 +81,8 @@ FilterHistoryPoints::FilterHistoryPoints(
}
else
{
LibUtilities::Equation equ(m_session, it->second);
LibUtilities::Equation equ(
m_session->GetExpressionEvaluator(), it->second);
m_outputFrequency = round(equ.Evaluate());
}
......@@ -96,7 +97,8 @@ FilterHistoryPoints::FilterHistoryPoints(
}
else
{
LibUtilities::Equation equ(m_session, it->second);
LibUtilities::Equation equ(
m_session->GetExpressionEvaluator(), it->second);
m_outputPlane = round(equ.Evaluate());
}
......@@ -277,7 +279,7 @@ void FilterHistoryPoints::v_Initialise(
if (dist_loc[i] == dist[i])
{
// Set element id to Vid of m_history point for later use
m_historyPoints[i]->SetVid(idList[i]);
m_historyPoints[i]->SetGlobalID(idList[i]);
}
else
{
......@@ -454,7 +456,7 @@ void FilterHistoryPoints::v_Update(const Array<OneD, const MultiRegions::ExpList
for (auto &x : m_historyList)
{
locCoord = x.second;
expId = x.first->GetVid();
expId = x.first->GetGlobalID();
NekDouble value;
int plane = m_planeIDs[m_historyLocalPointMap[k]];
......@@ -553,7 +555,7 @@ void FilterHistoryPoints::v_Update(const Array<OneD, const MultiRegions::ExpList
for (auto &x : m_historyList)
{
locCoord = x.second;
expId = x.first->GetVid();
expId = x.first->GetGlobalID();
physvals = pFields[j]->UpdatePhys() + pFields[j]->GetPhys_Offset(expId);
......
......@@ -80,7 +80,8 @@ FilterModalEnergy::FilterModalEnergy(
}
else
{
LibUtilities::Equation equ(m_session, it->second);
LibUtilities::Equation equ(
m_session->GetExpressionEvaluator(), it->second);
m_outputFrequency = round(equ.Evaluate());
}
......@@ -104,7 +105,8 @@ FilterModalEnergy::FilterModalEnergy(
}
else
{
LibUtilities::Equation equ(m_session, it->second);
LibUtilities::Equation equ(
m_session->GetExpressionEvaluator(), it->second);
m_outputPlane = round(equ.Evaluate());
}
}
......
......@@ -61,7 +61,8 @@ FilterMovingAverage::FilterMovingAverage(
else
{
// Load time constant
LibUtilities::Equation equ(m_session, it->second);
LibUtilities::Equation equ(
m_session->GetExpressionEvaluator(), it->second);
NekDouble tau = equ.Evaluate();
// Load delta T between samples
NekDouble dT;
......@@ -73,7 +74,8 @@ FilterMovingAverage::FilterMovingAverage(
}
else
{
LibUtilities::Equation equ(m_session, it->second);
LibUtilities::Equation equ(
m_session->GetExpressionEvaluator(), it->second);
m_alpha = equ.Evaluate();
// Check if tau was also defined
it = pParams.find("tau");
......
......@@ -54,13 +54,15 @@ FilterThresholdMax::FilterThresholdMax(
// ThresholdValue
auto it = pParams.find("ThresholdValue");
ASSERTL0(it != pParams.end(), "Missing parameter 'ThresholdValue'.");
LibUtilities::Equation equ1(m_session, it->second);
LibUtilities::Equation equ1(
m_session->GetExpressionEvaluator(), it->second);
m_thresholdValue = equ1.Evaluate();
// InitialValue
it = pParams.find("InitialValue");
ASSERTL0(it != pParams.end(), "Missing parameter 'InitialValue'.");
LibUtilities::Equation equ2(m_session, it->second);
LibUtilities::Equation equ2(
m_session->GetExpressionEvaluator(), it->second);
m_initialValue = equ2.Evaluate();
// StartTime
......@@ -68,7 +70,8 @@ FilterThresholdMax::FilterThresholdMax(
m_startTime = 0.0;
if (it != pParams.end())
{
LibUtilities::Equation equ(m_session, it->second);
LibUtilities::Equation equ(
m_session->GetExpressionEvaluator(), it->second);
m_startTime = equ.Evaluate();
}
......
......@@ -58,13 +58,15 @@ FilterThresholdMin::FilterThresholdMin(
// ThresholdValue
auto it = pParams.find("ThresholdValue");
ASSERTL0(it != pParams.end(), "Missing parameter 'ThresholdValue'.");
LibUtilities::Equation equ1(m_session, it->second);
LibUtilities::Equation equ1(
m_session->GetExpressionEvaluator(), it->second);
m_thresholdValue = equ1.Evaluate();
// InitialValue
it = pParams.find("InitialValue");
ASSERTL0(it != pParams.end(), "Missing parameter 'InitialValue'.");
LibUtilities::Equation equ2(m_session, it->second);
LibUtilities::Equation equ2(
m_session->GetExpressionEvaluator(), it->second);
m_initialValue = equ2.Evaluate();
// StartTime
......@@ -72,7 +74,8 @@ FilterThresholdMin::FilterThresholdMin(
m_startTime = 0.0;
if (it != pParams.end())
{
LibUtilities::Equation equ(m_session, it->second);
LibUtilities::Equation equ(
m_session->GetExpressionEvaluator(), it->second);
m_startTime = equ.Evaluate();
}
......
......@@ -104,7 +104,7 @@ namespace SolverUtils
m_session->SubstituteExpressions(funcNameTime);
m_timeFcnEqn = MemoryManager<LibUtilities::Equation>
::AllocateSharedPtr(m_session,funcNameTime);
::AllocateSharedPtr(m_session->GetExpressionEvaluator(),funcNameTime);
m_hasTimeFcnScaling = true;
}
......
......@@ -404,7 +404,6 @@ public:
return m_bndRegOrder;
}
protected:
/*an inital read which loads a very light weight data structure*/
virtual void ReadGeometry(
DomainRangeShPtr rng,
......@@ -412,6 +411,8 @@ protected:
virtual void PartitionMesh(
LibUtilities::SessionReaderSharedPtr session) = 0;
protected:
void PopulateFaceToElMap(Geometry3DSharedPtr element, int kNfaces);
ExpansionMapShPtr SetUpExpansionMap();
......
......@@ -168,8 +168,6 @@ void MeshGraphXml::PartitionMesh(
// Read 'lite' geometry information
ReadGeometry(NullDomainRangeShPtr, false);
std::cout << "Read " << m_hexGeoms.size() << " elements" << std::endl;
// Create mesh partitioner.
MeshPartitionSharedPtr partitioner =
GetMeshPartitionFactory().CreateInstance(
......
......@@ -68,12 +68,12 @@ public:
static std::string className;
protected:
virtual void ReadGeometry(DomainRangeShPtr rng,
bool fillGraph);
virtual void PartitionMesh(
LibUtilities::SessionReaderSharedPtr session);
protected:
// some of these functions are going to be virtual because they will be
// inherited by the XmlCompressed version
......
Markdown is supported
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