Commit 19076e5d authored by Dave Moxey's avatar Dave Moxey
Browse files

Final fixes, regression tests passing on full configuration

parent c0d12426
......@@ -73,9 +73,9 @@ MeshPartitionFactory &GetMeshPartitionFactory()
MeshPartition::MeshPartition(const LibUtilities::SessionReaderSharedPtr session,
const MeshGraphSharedPtr m)
: m_numFields(0), m_fieldNameToId(), m_session(session),
m_comm(session->GetComm()), m_meshgraph(m), m_weightingRequired(false),
m_weightBnd(false), m_weightDofs(false), m_dim(m->GetMeshDimension())
: m_dim(m->GetMeshDimension()), m_numFields(0), m_session(session),
m_meshgraph(m), m_fieldNameToId(), m_comm(session->GetComm()),
m_weightingRequired(false), m_weightBnd(false), m_weightDofs(false)
{
// leave the meshpartition method of reading expansions and conditions
ReadConditions();
......
......@@ -33,14 +33,11 @@
//
///////////////////////////////////////////////////////////////////////////////
#include "LibUtilities/BasicUtils/SharedArray.hpp"
#include "SpatialDomains/SessionReader.h"
#include "MeshPartitionScotch.h"
#include <SpatialDomains/MeshPartitionScotch.h>
namespace Nektar
{
namespace LibUtilities
namespace SpatialDomains
{
std::string MeshPartitionScotch::className
......@@ -50,12 +47,14 @@ namespace LibUtilities
"Partitioning using the Scotch library.");
std::string MeshPartitionScotch::cmdSwitch
= SessionReader::RegisterCmdLineFlag("use-scotch","","Use Scotch for mesh partitioning.");
= LibUtilities::SessionReader::RegisterCmdLineFlag(
"use-scotch","","Use Scotch for mesh partitioning.");
MeshPartitionScotch::MeshPartitionScotch(const SessionReaderSharedPtr& pSession)
: MeshPartition(pSession)
MeshPartitionScotch::MeshPartitionScotch(
const LibUtilities::SessionReaderSharedPtr session,
const MeshGraphSharedPtr meshGraph)
: MeshPartition(session, meshGraph)
{
}
MeshPartitionScotch::~MeshPartitionScotch()
......
......@@ -32,18 +32,18 @@
// Description: Scotch partitioner interface
//
///////////////////////////////////////////////////////////////////////////////
#ifndef NEKTAR_LIB_UTILITIES_MESHPARTITIONMETIS_H
#define NEKTAR_LIB_UTILITIES_MESHPARTITIONMETIS_H
#include "LibUtilities/Memory/NekMemoryManager.hpp"
#ifndef NEKTAR_SPATIALDOMAINS_MESHPARTITIONSCOTCH_H
#define NEKTAR_SPATIALDOMAINS_MESHPARTITIONSCOTCH_H
#include "MeshPartition.h"
#include <LibUtilities/Memory/NekMemoryManager.hpp>
#include <SpatialDomains/MeshPartition.h>
#include "scotch.h"
#include <scotch.h>
namespace Nektar
{
namespace LibUtilities
namespace SpatialDomains
{
class MeshPartitionScotch : public MeshPartition
......@@ -51,17 +51,20 @@ namespace LibUtilities
public:
/// Creates an instance of this class
static MeshPartitionSharedPtr create(
const SessionReaderSharedPtr& pSession)
const LibUtilities::SessionReaderSharedPtr session,
const MeshGraphSharedPtr meshGraph)
{
return MemoryManager<MeshPartitionScotch>
::AllocateSharedPtr(pSession);
::AllocateSharedPtr(session, meshGraph);
}
/// Name of class
static std::string className;
static std::string cmdSwitch;
MeshPartitionScotch(const SessionReaderSharedPtr& pSession);
MeshPartitionScotch(
const LibUtilities::SessionReaderSharedPtr session,
const MeshGraphSharedPtr meshGraph);
virtual ~MeshPartitionScotch();
private:
......
......@@ -4,7 +4,7 @@
#include <iomanip>
#include <boost/filesystem.hpp>
#include <SpatialDomains/MeshGraph3D.h>
#include <SpatialDomains/MeshGraph.h>
#include <MultiRegions/ContField3D.h>
using namespace std;
......@@ -182,7 +182,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Read in mesh from input file
SpatialDomains::MeshGraphSharedPtr graph3D = MemoryManager<SpatialDomains::MeshGraph3D>::AllocateSharedPtr(vSession);;
SpatialDomains::MeshGraphSharedPtr graph3D = SpatialDomains::MeshGraph::Read(vSession);;
//----------------------------------------------
//----------------------------------------------
......
......@@ -3,7 +3,7 @@
#include <iomanip>
#include <boost/filesystem/path.hpp>
#include <SpatialDomains/MeshGraph2D.h>
#include <SpatialDomains/MeshGraph.h>
#include <MultiRegions/ContField2D.h>
using namespace std;
......@@ -200,7 +200,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Read in mesh from input file
SpatialDomains::MeshGraphSharedPtr graph2D = MemoryManager<SpatialDomains::MeshGraph2D>::AllocateSharedPtr(vSession);
SpatialDomains::MeshGraphSharedPtr graph2D = SpatialDomains::MeshGraph::Read(vSession);;
//----------------------------------------------
//----------------------------------------------
......
......@@ -3,7 +3,7 @@
#include <iomanip>
#include <boost/filesystem/path.hpp>
#include <SpatialDomains/MeshGraph3D.h>
#include <SpatialDomains/MeshGraph.h>
#include <MultiRegions/ContField3D.h>
using namespace std;
......@@ -201,7 +201,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Read in mesh from input file
SpatialDomains::MeshGraphSharedPtr graph3D = MemoryManager<SpatialDomains::MeshGraph3D>::AllocateSharedPtr(vSession);
SpatialDomains::MeshGraphSharedPtr graph3D = SpatialDomains::MeshGraph::Read(vSession);;
//----------------------------------------------
//----------------------------------------------
......
......@@ -4,7 +4,7 @@
#include <iomanip>
#include <boost/filesystem/path.hpp>
#include <SpatialDomains/MeshGraph2D.h>
#include <SpatialDomains/MeshGraph.h>
#include <MultiRegions/ContField2D.h>
using namespace std;
......@@ -181,7 +181,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Read in mesh from input file
SpatialDomains::MeshGraphSharedPtr graph2D = MemoryManager<SpatialDomains::MeshGraph2D>::AllocateSharedPtr(vSession);
SpatialDomains::MeshGraphSharedPtr graph2D = SpatialDomains::MeshGraph::Read(vSession);;
//----------------------------------------------
//----------------------------------------------
......
......@@ -4,7 +4,7 @@
#include <iomanip>
#include <boost/filesystem/path.hpp>
#include <SpatialDomains/MeshGraph3D.h>
#include <SpatialDomains/MeshGraph.h>
#include <MultiRegions/ContField3D.h>
using namespace std;
......@@ -177,7 +177,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Read in mesh from input file
SpatialDomains::MeshGraphSharedPtr graph3D = MemoryManager<SpatialDomains::MeshGraph3D>::AllocateSharedPtr(vSession);
SpatialDomains::MeshGraphSharedPtr graph3D = SpatialDomains::MeshGraph::Read(vSession);;
//----------------------------------------------
//----------------------------------------------
......
......@@ -3,7 +3,7 @@
#include <iomanip>
#include <boost/filesystem/path.hpp>
#include <SpatialDomains/MeshGraph2D.h>
#include <SpatialDomains/MeshGraph.h>
#include <MultiRegions/DisContField2D.h>
using namespace std;
......@@ -198,7 +198,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Read in mesh from input file
SpatialDomains::MeshGraphSharedPtr graph2D = MemoryManager<SpatialDomains::MeshGraph2D>::AllocateSharedPtr(vSession);
SpatialDomains::MeshGraphSharedPtr graph2D = SpatialDomains::MeshGraph::Read(vSession);;
//----------------------------------------------
//----------------------------------------------
......
......@@ -3,7 +3,7 @@
#include <iomanip>
#include <boost/filesystem/path.hpp>
#include <SpatialDomains/MeshGraph3D.h>
#include <SpatialDomains/MeshGraph.h>
#include <MultiRegions/DisContField3D.h>
using namespace std;
......@@ -202,7 +202,7 @@ int main(int argc, char *argv[])
timer.Start();
//----------------------------------------------
// Read in mesh from input file
SpatialDomains::MeshGraphSharedPtr graph3D = MemoryManager<SpatialDomains::MeshGraph3D>::AllocateSharedPtr(vSession);
SpatialDomains::MeshGraphSharedPtr graph3D = SpatialDomains::MeshGraph::Read(vSession);;
//----------------------------------------------
//----------------------------------------------
......
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