Commit 959aac6c authored by Michael Turner's avatar Michael Turner

remove need for ifdef nektar_use_meshgen

parent 65ad804b
......@@ -36,7 +36,7 @@
#ifndef NEKMESHUTILS_CADSYSTEM_CADCURVE
#define NEKMESHUTILS_CADSYSTEM_CADCURVE
#include <NekMeshUtils/CADSystem/CADObj.h>
#include <NekMeshUtils/CADSystem/CADObject.h>
#include <NekMeshUtils/CADSystem/CADVert.h>
#include <NekMeshUtils/CADSystem/CADSurf.h>
......@@ -49,7 +49,7 @@ namespace NekMeshUtils
* @brief base class for CAD curves.
*
*/
class CADCurve : public CADObj
class CADCurve : public CADObject
{
public:
friend class MemoryManager<CADCurve>;
......
......@@ -47,24 +47,24 @@ namespace NekMeshUtils
enum cadType
{
vert,
curve,
surf
eVert,
eCurve,
eSurf
};
class CADObj
class CADObject
{
public:
friend class MemoryManager<CADObj>;
friend class MemoryManager<CADObject>;
/**
* @brief Default constructor.
*/
CADObj()
CADObject()
{
}
virtual ~CADObj(){}
virtual ~CADObject(){}
/**
* @brief Return ID of the vertex
......@@ -86,7 +86,7 @@ protected:
cadType m_type;
};
typedef boost::shared_ptr<CADObj> CADObjSharedPtr;
typedef boost::shared_ptr<CADObject> CADObjectSharedPtr;
}
}
......
......@@ -36,7 +36,7 @@
#ifndef NekMeshUtils_CADSYSTEM_CADSURF
#define NekMeshUtils_CADSYSTEM_CADSURF
#include <NekMeshUtils/CADSystem/CADObj.h>
#include <NekMeshUtils/CADSystem/CADObject.h>
#include <NekMeshUtils/CADSystem/CADVert.h>
#include <NekMeshUtils/CADSystem/CADSystem.h>
......@@ -52,7 +52,7 @@ typedef boost::shared_ptr<CADCurve> CADCurveSharedPtr;
* @brief base class for a cad surface
*/
class CADSurf : public CADObj
class CADSurf : public CADObject
{
public:
friend class MemoryManager<CADSurf>;
......
......@@ -43,6 +43,8 @@
#include <LibUtilities/BasicUtils/NekFactory.hpp>
#include "CADObject.h"
namespace Nektar
{
namespace NekMeshUtils
......
......@@ -41,7 +41,7 @@
#include <LibUtilities/BasicUtils/SharedArray.hpp>
#include <LibUtilities/Memory/NekMemoryManager.hpp>
#include <NekMeshUtils/CADSystem/CADObj.h>
#include <NekMeshUtils/CADSystem/CADObject.h>
#include <NekMeshUtils/MeshElements/Node.h>
namespace Nektar
......@@ -53,7 +53,7 @@ namespace NekMeshUtils
* @brief base class for CAD verticies.
*
*/
class CADVert : public CADObj
class CADVert : public CADObject
{
public:
friend class MemoryManager<CADVert>;
......
......@@ -13,6 +13,8 @@ SET(NEKMESHUTILS_SOURCES
MeshElements/Pyramid.cpp
MeshElements/Prism.cpp
MeshElements/Hexahedron.cpp
CADSystem/CADSystem.cpp
CADSystem/ProcessLoadCAD.cpp
)
IF(NEKTAR_USE_MESHGEN)
......@@ -30,11 +32,8 @@ IF(NEKTAR_USE_MESHGEN)
VolumeMeshing/VolumeMesh.cpp
VolumeMeshing/TetMeshing/TetMesh.cpp
VolumeMeshing/BLMeshing/BLMesh.cpp
CADSystem/CADSystem.cpp
CADSystem/ProcessLoadCAD.cpp
Optimisation/BGFS-B.cpp
Triangle/Triangle.cpp
CADSystem/CADSystem.cpp
CADSystem/OCE/CADSystemOCE.cpp
CADSystem/OCE/CADVertOCE.cpp
CADSystem/OCE/CADCurveOCE.cpp
......@@ -61,6 +60,12 @@ SET(NEKMESHUTILS_HEADERS
MeshElements/Hexahedron.h
MeshElements/HOAlignment.h
MeshElements/ElementConfig.h
CADSystem/CADObject.h
CADSystem/CADSystem.h
CADSystem/CADVert.h
CADSystem/CADCurve.h
CADSystem/CADSurf.h
CADSystem/ProcessLoadCAD.h
)
IF(NEKTAR_USE_MESHGEN)
......@@ -79,12 +84,6 @@ IF(NEKTAR_USE_MESHGEN)
VolumeMeshing/VolumeMesh.h
VolumeMeshing/TetMeshing/TetMesh.h
VolumeMeshing/BLMeshing/BLMesh.h
CADSystem/CADObj.h
CADSystem/CADSystem.h
CADSystem/CADVert.h
CADSystem/CADCurve.h
CADSystem/CADSurf.h
CADSystem/ProcessLoadCAD.h
CADSystem/OCE/OpenCascade.h
CADSystem/OCE/CADSystemOCE.h
CADSystem/OCE/CADVertOCE.h
......
......@@ -64,23 +64,12 @@ public:
std::vector<NodeSharedPtr> pEdgeNodes,
LibUtilities::PointsType pCurveType)
: m_n1(pVertex1), m_n2(pVertex2), m_edgeNodes(pEdgeNodes),
m_curveType(pCurveType), m_geom()
{
#ifdef NEKTAR_USE_MESHGEN
onCurve = false;
onSurf = false;
#endif
}
m_curveType(pCurveType), m_geom(){}
/// Creates a new linear edge.
NEKMESHUTILS_EXPORT Edge(NodeSharedPtr pVertex1, NodeSharedPtr pVertex2)
: m_n1(pVertex1), m_n2(pVertex2), m_edgeNodes(), m_curveType(), m_geom()
{
#ifdef NEKTAR_USE_MESHGEN
onCurve = false;
onSurf = false;
#endif
}
{}
/// Copies an existing edge.
NEKMESHUTILS_EXPORT Edge(const Edge &pSrc)
......@@ -137,14 +126,7 @@ public:
/// Element(s) which are linked to this edge.
std::vector<std::pair<ElementSharedPtr, int> > m_elLink;
#ifdef NEKTAR_USE_MESHGEN
bool onCurve;
int CADCurveId;
CADCurveSharedPtr CADCurve;
bool onSurf;
int CADSurfId;
CADSurfSharedPtr CADSurf;
#endif
CADObjectSharedPtr parentCAD;
private:
SpatialDomains::SegGeomSharedPtr m_geom;
......
......@@ -67,19 +67,14 @@ public:
std::vector<EdgeSharedPtr> pEdgeList,
LibUtilities::PointsType pCurveType)
: m_vertexList(pVertexList), m_edgeList(pEdgeList),
m_faceNodes(pFaceNodes), m_curveType(pCurveType), m_geom()
{
onSurf = false;
}
m_faceNodes(pFaceNodes), m_curveType(pCurveType), m_geom(){}
/// Copy an existing face.
NEKMESHUTILS_EXPORT Face(const Face &pSrc)
: m_vertexList(pSrc.m_vertexList), m_edgeList(pSrc.m_edgeList),
m_faceNodes(pSrc.m_faceNodes), m_curveType(pSrc.m_curveType),
m_geom(pSrc.m_geom)
{
onSurf = false;
}
m_geom(pSrc.m_geom){}
NEKMESHUTILS_EXPORT ~Face()
{
}
......@@ -147,12 +142,7 @@ public:
/// Nektar++ representation of geometry
SpatialDomains::Geometry2DSharedPtr m_geom;
#ifdef NEKTAR_USE_MESHGEN
bool onSurf;
int CADSurfId;
CADSurfSharedPtr CADSurf;
#endif
CADObjectSharedPtr parentCAD;
};
typedef boost::shared_ptr<Face> FaceSharedPtr;
......
......@@ -38,11 +38,7 @@
#include <NekMeshUtils/NekMeshUtilsDeclspec.h>
#include <NekMeshUtils/MeshElements/Element.h>
#include <NekMeshUtils/MeshElements/Composite.h>
#ifdef NEKTAR_USE_MESHGEN
#include <NekMeshUtils/CADSystem/CADSystem.h>
#endif
#include <NekMeshUtils/MeshElements/Composite.h>
namespace Nektar
{
......@@ -135,10 +131,10 @@ public:
bool m_hasCAD;
/// CAD file ID
std::string m_CADId;
#ifdef NEKTAR_USE_MESHGEN
CADSystemSharedPtr m_cad;
OctreeSharedPtr m_octree;
#endif
/// Returns the total number of elements in the mesh with
/// dimension expDim.
......
......@@ -40,10 +40,8 @@
#include <iomanip>
#ifdef NEKTAR_USE_MESHGEN
#include <SpatialDomains/PointGeom.h>
#include <NekMeshUtils/CADSystem/CADSystem.h>
#endif
namespace Nektar
{
......@@ -230,7 +228,7 @@ public:
return an;
}
#ifdef NEKTAR_USE_MESHGEN // fucntions for cad information
// fucntions for cad information
void SetCADCurve(int i, CADCurveSharedPtr c, NekDouble t)
{
......@@ -363,26 +361,6 @@ public:
}
return ret;
}
#else
int GetNumCadCurve()
{
return 0;
}
int GetNumCADSurf()
{
return 0;
}
std::vector<std::pair<int,std::string> > GetCADCurveInfoVector()
{
return std::vector<std::pair<int,std::string> >();
}
std::vector<std::pair<int,std::string> > GetCADSurfInfoVector()
{
return std::vector<std::pair<int,std::string> >();
}
#endif
/// ID of node.
int m_id;
......@@ -393,14 +371,11 @@ public:
/// Z-coordinate.
NekDouble m_z;
#ifdef NEKTAR_USE_MESHGEN // tag to tell the meshelemnets to include cad
// information
/// list of cadcurves the node lies on
std::map<int, std::pair<CADCurveSharedPtr, NekDouble> > CADCurveList;
/// list of cadsurfs the node lies on
std::map<int, std::pair<CADSurfSharedPtr, Array<OneD, NekDouble> > >
CADSurfList;
#endif
private:
SpatialDomains::PointGeomSharedPtr m_geom;
......
......@@ -157,7 +157,6 @@ void Module::ProcessEdges(bool ReprocessEdges)
vector<ElementSharedPtr> &elmt = m_mesh->m_element[m_mesh->m_expDim];
m_mesh->m_edgeSet.clear();
int ct=0;
// Clear all edge links
......
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