Commit c6f931d2 authored by Michael Turner's avatar Michael Turner

attempt fix 3

parent ecc683a8
......@@ -44,8 +44,6 @@
#include <NekMeshUtils/MeshElements/MeshElements.h>
#include <NekMeshUtils/CADSystem/CADSystem.h>
#include <NekMeshUtils/NekMeshUtilsDeclspec.h>
namespace Nektar
{
namespace NekMeshUtils
......@@ -59,7 +57,7 @@ public:
/**
*@brief default constructor
*/
NEKMESHUTILS_EXPORT BLMesh(MeshSharedPtr m, std::vector<unsigned int> bls,
BLMesh(MeshSharedPtr m, std::vector<unsigned int> bls,
std::vector<unsigned int> syms, NekDouble b) :
m_mesh(m), m_blsurfs(bls), m_symsurfs(syms), m_bl(b)
{
......@@ -69,12 +67,12 @@ public:
/**
*@brief execute tet meshing
*/
NEKMESHUTILS_EXPORT void Mesh();
void Mesh();
/**
* @brief Get the map of surface element id to pseudo surface prism face
*/
NEKMESHUTILS_EXPORT std::map<int, FaceSharedPtr> GetSurfToPri()
std::map<int, FaceSharedPtr> GetSurfToPri()
{
return m_surftopriface;
}
......
......@@ -46,8 +46,6 @@
#include <NekMeshUtils/CADSystem/CADVert.h>
#include <NekMeshUtils/CADSystem/CADSurf.h>
#include <NekMeshUtils/NekMeshUtilsDeclspec.h>
namespace Nektar
{
namespace NekMeshUtils
......@@ -67,14 +65,14 @@ public:
/**
* @brief Default constructor.
*/
NEKMESHUTILS_EXPORT CADCurve(int i, TopoDS_Shape in);
CADCurve(int i, TopoDS_Shape in);
/**
* @brief Returns the minimum and maximum parametric coords t of the curve.
*
* @return Array of two entries, min and max parametric coordinate.
*/
NEKMESHUTILS_EXPORT Array<OneD, NekDouble> Bounds();
Array<OneD, NekDouble> Bounds();
/**
* @brief Calculates the arclength between the two paremetric points \p ti
......@@ -84,7 +82,7 @@ public:
* @param tf Second parametric coordinate.
* @return Arc length between \p ti and \p tf.
*/
NEKMESHUTILS_EXPORT NekDouble Length(NekDouble ti, NekDouble tf);
NekDouble Length(NekDouble ti, NekDouble tf);
/**
* @brief Gets the location (x,y,z) in an array out of the curve at point \p t.
......@@ -92,7 +90,7 @@ public:
* @param t Parametric coordinate
* @return Array of x,y,z
*/
NEKMESHUTILS_EXPORT Array<OneD, NekDouble> P(NekDouble t);
Array<OneD, NekDouble> P(NekDouble t);
/**
* @brief Calculates the parametric coordinate and arclength location
......@@ -103,46 +101,46 @@ public:
*
* @todo This really needs improving for accuracy.
*/
NEKMESHUTILS_EXPORT NekDouble tAtArcLength(NekDouble s);
NekDouble tAtArcLength(NekDouble s);
/**
* @brief Gets the start and end of the curve.
*
* @return Array with 6 entries of endpoints x1,y1,z1,x2,y2,z2.
*/
NEKMESHUTILS_EXPORT Array<OneD, NekDouble> GetMinMax();
Array<OneD, NekDouble> GetMinMax();
/// return the id of the curve
NEKMESHUTILS_EXPORT int GetID()
int GetID()
{
return m_ID;
}
///set the ids of the surfaces either side of the curve
NEKMESHUTILS_EXPORT void SetAdjSurf(std::vector<CADSurfSharedPtr> i)
void SetAdjSurf(std::vector<CADSurfSharedPtr> i)
{
m_adjSurfs = i;
}
/// returns the ids of neigbouring surfaces
NEKMESHUTILS_EXPORT std::vector<CADSurfSharedPtr> GetAdjSurf()
std::vector<CADSurfSharedPtr> GetAdjSurf()
{
return m_adjSurfs;
}
/// returns lenght of the curve
NEKMESHUTILS_EXPORT NekDouble GetTotLength(){return m_length;}
NekDouble GetTotLength(){return m_length;}
/*
* @brief assign ids of end vertices in main cad
*/
NEKMESHUTILS_EXPORT void SetVert(std::vector<CADVertSharedPtr> &falVert)
void SetVert(std::vector<CADVertSharedPtr> &falVert)
{
m_mainVerts = falVert;
}
/// get the ids of the vertices that are the ends of the curve, which are in the main cad list
NEKMESHUTILS_EXPORT std::vector<CADVertSharedPtr> GetVertex()
std::vector<CADVertSharedPtr> GetVertex()
{
return m_mainVerts;
}
......
......@@ -45,8 +45,6 @@
#include <NekMeshUtils/CADSystem/CADVert.h>
#include <NekMeshUtils/NekMeshUtilsDeclspec.h>
namespace Nektar
{
namespace NekMeshUtils
......@@ -78,7 +76,7 @@ public:
/**
* @brief Default constructor.
*/
NEKMESHUTILS_EXPORT CADSurf(int i, TopoDS_Shape in, std::vector<EdgeLoop> ein);
CADSurf(int i, TopoDS_Shape in, std::vector<EdgeLoop> ein);
/**
* @brief Get the IDs of the edges which bound the surface.
......@@ -89,7 +87,7 @@ public:
* integer that indicates whether this edge is orientated forwards or
* backwards on this surface to form the loop.
*/
NEKMESHUTILS_EXPORT std::vector<EdgeLoop> GetEdges()
std::vector<EdgeLoop> GetEdges()
{
return m_edges;
}
......@@ -99,7 +97,7 @@ public:
*
* @return Array of 4 entries with parametric umin,umax,vmin,vmax.
*/
NEKMESHUTILS_EXPORT Array<OneD, NekDouble> GetBounds()
Array<OneD, NekDouble> GetBounds()
{
Array<OneD,NekDouble> b(4);
......@@ -117,7 +115,7 @@ public:
* @param uv Array of u and v parametric coords.
* @return Array of xyz components of normal vector.
*/
NEKMESHUTILS_EXPORT Array<OneD, NekDouble> N (Array<OneD, NekDouble> uv);
Array<OneD, NekDouble> N (Array<OneD, NekDouble> uv);
/**
* @brief Get the set of first derivatives at parametric point u,v
......@@ -125,7 +123,7 @@ public:
* @param uv Array of u and v parametric coords.
* @return Array of xyz copmonents of first derivatives.
*/
NEKMESHUTILS_EXPORT Array<OneD, NekDouble> D1 (Array<OneD, NekDouble> uv);
Array<OneD, NekDouble> D1 (Array<OneD, NekDouble> uv);
/**
* @brief Get the set of second derivatives at parametric point u,v
......@@ -133,7 +131,7 @@ public:
* @param uv array of u and v parametric coords
* @return array of xyz copmonents of second derivatives
*/
NEKMESHUTILS_EXPORT Array<OneD, NekDouble> D2 (Array<OneD, NekDouble> uv);
Array<OneD, NekDouble> D2 (Array<OneD, NekDouble> uv);
/**
* @brief Get the x,y,z at parametric point u,v.
......@@ -141,7 +139,7 @@ public:
* @param uv Array of u and v parametric coords.
* @return Array of xyz location.
*/
NEKMESHUTILS_EXPORT Array<OneD, NekDouble> P (Array<OneD, NekDouble> uv);
Array<OneD, NekDouble> P (Array<OneD, NekDouble> uv);
/**
* @brief Performs a reverse look up to find u,v and x,y,z.
......@@ -149,24 +147,24 @@ public:
* @param p Array of xyz location
* @return The parametric location of xyz on this surface
*/
NEKMESHUTILS_EXPORT Array<OneD, NekDouble> locuv(Array<OneD, NekDouble> p);
Array<OneD, NekDouble> locuv(Array<OneD, NekDouble> p);
/**
* @brief returns true if the surface is flat (2D)
*/
NEKMESHUTILS_EXPORT bool IsPlane();
bool IsPlane();
/**
* @brief sets the flag to reverse the normal for this suface,
* this is determined in cadsystem and ensures all surface normals,
* point internaly
*/
NEKMESHUTILS_EXPORT void SetReverseNomral()
void SetReverseNomral()
{
m_correctNormal = false;
}
NEKMESHUTILS_EXPORT bool IsReversedNormal()
bool IsReversedNormal()
{
return !m_correctNormal;
}
......@@ -174,7 +172,7 @@ public:
/**
* @brief surface needs to know if it is bounded by only two curves
*/
NEKMESHUTILS_EXPORT void SetTwoC()
void SetTwoC()
{
m_hasTwoCurves = true;
}
......@@ -182,24 +180,24 @@ public:
/**
* @brief query two curves
*/
NEKMESHUTILS_EXPORT bool GetTwoC(){return m_hasTwoCurves;}
bool GetTwoC(){return m_hasTwoCurves;}
/**
* @brief return id
*/
NEKMESHUTILS_EXPORT int GetId(){return m_ID;}
int GetId(){return m_ID;}
/**
* @brief does unconstrained locuv to project point from anywhere
*/
NEKMESHUTILS_EXPORT NekDouble DistanceTo(Array<OneD, NekDouble> p);
NekDouble DistanceTo(Array<OneD, NekDouble> p);
NEKMESHUTILS_EXPORT void ProjectTo(Array<OneD, NekDouble> &tp, Array<OneD, NekDouble> &uv);
void ProjectTo(Array<OneD, NekDouble> &tp, Array<OneD, NekDouble> &uv);
/**
* @brief returns curvature at point uv
*/
NEKMESHUTILS_EXPORT NekDouble Curvature(Array<OneD, NekDouble> uv);
NekDouble Curvature(Array<OneD, NekDouble> uv);
private:
......
......@@ -48,8 +48,6 @@
#include <NekMeshUtils/CADSystem/CADCurve.h>
#include <NekMeshUtils/CADSystem/CADSurf.h>
#include <NekMeshUtils/NekMeshUtilsDeclspec.h>
namespace Nektar
{
namespace NekMeshUtils
......@@ -69,26 +67,26 @@ public:
/**
* @brief Default constructor.
*/
NEKMESHUTILS_EXPORT CADSystem(const std::string &name) : m_name(name)
CADSystem(const std::string &name) : m_name(name)
{
}
/**
* @brief Return the name of the CAD system.
*/
NEKMESHUTILS_EXPORT std::string GetName();
std::string GetName();
/**
* @brief Initialises CAD and makes surface, curve and vertex maps.
*
* @return true if completed successfully
*/
NEKMESHUTILS_EXPORT bool LoadCAD();
bool LoadCAD();
/**
* @brief Reports basic properties to screen.
*/
NEKMESHUTILS_EXPORT void Report();
void Report();
/**
* @brief Returns bounding box of the domain.
......@@ -98,12 +96,12 @@ public:
*
* @return Array with 6 entries: xmin, xmax, ymin, ymax, zmin and zmax.
*/
NEKMESHUTILS_EXPORT Array<OneD, NekDouble> GetBoundingBox();
Array<OneD, NekDouble> GetBoundingBox();
/**
* @brief Get the number of surfaces.
*/
NEKMESHUTILS_EXPORT int GetNumSurf()
int GetNumSurf()
{
return m_surfs.size();
}
......@@ -111,7 +109,7 @@ public:
/**
* @brief Get the number of curves.
*/
NEKMESHUTILS_EXPORT int GetNumCurve()
int GetNumCurve()
{
return m_curves.size();
}
......@@ -119,7 +117,7 @@ public:
/**
* @brief Gets a curve from the map.
*/
NEKMESHUTILS_EXPORT CADCurveSharedPtr GetCurve(int i)
CADCurveSharedPtr GetCurve(int i)
{
std::map<int,CADCurveSharedPtr>::iterator
search = m_curves.find(i);
......@@ -131,7 +129,7 @@ public:
/**
* @brief Gets a suface from the map.
*/
NEKMESHUTILS_EXPORT CADSurfSharedPtr GetSurf(int i)
CADSurfSharedPtr GetSurf(int i)
{
std::map<int,CADSurfSharedPtr>::iterator
search = m_surfs.find(i);
......@@ -143,7 +141,7 @@ public:
/**
* @brief Gets map of all vertices
*/
NEKMESHUTILS_EXPORT std::map<int, CADVertSharedPtr> GetVerts()
std::map<int, CADVertSharedPtr> GetVerts()
{
return m_verts;
}
......@@ -151,7 +149,7 @@ public:
/**
* @brief Gets number of vertices
*/
NEKMESHUTILS_EXPORT int GetNumVerts(){return m_verts.size();}
int GetNumVerts(){return m_verts.size();}
/**
* @brief based on location in space, uses opencascade routines to
......@@ -159,7 +157,7 @@ public:
* and should be used sparingly, it is smart enough to take and form
* of geometry
*/
NEKMESHUTILS_EXPORT bool InsideShape(Array<OneD, NekDouble> loc);
bool InsideShape(Array<OneD, NekDouble> loc);
private:
......
......@@ -45,8 +45,6 @@
#include <NekMeshUtils/MeshElements/MeshElements.h>
#include <NekMeshUtils/NekMeshUtilsDeclspec.h>
namespace Nektar
{
namespace NekMeshUtils
......@@ -66,7 +64,7 @@ public:
/**
* @brief Default constructor.
*/
NEKMESHUTILS_EXPORT CADVert(int i, TopoDS_Shape in)
CADVert(int i, TopoDS_Shape in)
{
gp_Trsf transform;
gp_Pnt ori(0.0, 0.0, 0.0);
......@@ -85,7 +83,7 @@ public:
/**
* @brief Get x,y,z location of the vertex
*/
NEKMESHUTILS_EXPORT Array<OneD, NekDouble> GetLoc()
Array<OneD, NekDouble> GetLoc()
{
Array<OneD, NekDouble> out(3);
out[0] = m_occVert.X(); out[1] = m_occVert.Y(); out[2] = m_occVert.Z();
......@@ -95,17 +93,17 @@ public:
/**
* @brief Return ID of the vertex
*/
NEKMESHUTILS_EXPORT int GetId(){return m_ID;}
int GetId(){return m_ID;}
/**
* @brief returns a node object of the cad vertex
*/
NEKMESHUTILS_EXPORT NodeSharedPtr GetNode(){return m_node;}
NodeSharedPtr GetNode(){return m_node;}
/**
* @brief if the vertex is degenerate manually set uv for that surface
*/
NEKMESHUTILS_EXPORT void SetDegen(int s, CADSurfSharedPtr su, NekDouble u, NekDouble v)
void SetDegen(int s, CADSurfSharedPtr su, NekDouble u, NekDouble v)
{
degen = true;
degensurf = s;
......@@ -118,7 +116,7 @@ public:
/**
* @brief query is degenerate
*/
NEKMESHUTILS_EXPORT int IsDegen()
int IsDegen()
{
if(degen)
{
......
......@@ -46,8 +46,6 @@
#include <NekMeshUtils/MeshElements/MeshElements.h>
#include <NekMeshUtils/NekMeshUtilsDeclspec.h>
namespace Nektar
{
namespace NekMeshUtils
......@@ -64,35 +62,35 @@ class TetGenInterface
/**
* @brief default constructor
*/
NEKMESHUTILS_EXPORT TetGenInterface()
TetGenInterface()
{
};
/**
* @brief assign parameters for meshing
*/
NEKMESHUTILS_EXPORT void InitialMesh(std::map<int, NodeSharedPtr> tgidton,
void InitialMesh(std::map<int, NodeSharedPtr> tgidton,
std::vector<Array<OneD, int> > tri);
/**
* @brief gets the locations of the stiener points added by tetgen
*/
NEKMESHUTILS_EXPORT void GetNewPoints(int num, std::vector<Array<OneD, NekDouble> > &newp);
void GetNewPoints(int num, std::vector<Array<OneD, NekDouble> > &newp);
/**
* @brief refines a previously made tetmesh with node delta information from the Octree
*/
NEKMESHUTILS_EXPORT void RefineMesh(std::map<int, NekDouble> delta);
void RefineMesh(std::map<int, NekDouble> delta);
/**
* @brief get the list of connectivites of the nodes
*/
NEKMESHUTILS_EXPORT std::vector<Array<OneD, int> > Extract();
std::vector<Array<OneD, int> > Extract();
/**
* @brief clear previous mesh
*/
NEKMESHUTILS_EXPORT void freetet();
void freetet();
private:
......
......@@ -53,8 +53,6 @@ extern "C"{
#include <LibUtilities/BasicUtils/SharedArray.hpp>
#include <LibUtilities/Memory/NekMemoryManager.hpp>
#include <NekMeshUtils/NekMeshUtilsDeclspec.h>
namespace Nektar
{
namespace NekMeshUtils
......@@ -71,14 +69,14 @@ public:
/**
* @brief default constructor
*/
NEKMESHUTILS_EXPORT TriangleInterface()
TriangleInterface()
{
};
/**
* @brief assign meshing paramters
*/
NEKMESHUTILS_EXPORT void Assign(std::vector<std::vector<NodeSharedPtr> > &boundingloops,
void Assign(std::vector<std::vector<NodeSharedPtr> > &boundingloops,
std::vector<Array<OneD, NekDouble> > &centers, int i,
NekDouble str = 1.0)
{
......@@ -88,7 +86,7 @@ public:
sid = i;
}
NEKMESHUTILS_EXPORT void AssignStiener(std::vector<NodeSharedPtr> stiner)
void AssignStiener(std::vector<NodeSharedPtr> stiner)
{
m_stienerpoints = stiner;
}
......@@ -96,12 +94,12 @@ public:
/**
* @brief execute meshing
*/
NEKMESHUTILS_EXPORT void Mesh(bool Quiet = true, bool Quality = false);
void Mesh(bool Quiet = true, bool Quality = false);
/**
* @brief extract mesh
*/
NEKMESHUTILS_EXPORT void Extract(std::vector<std::vector<NodeSharedPtr> > &Connec);
void Extract(std::vector<std::vector<NodeSharedPtr> > &Connec);
private:
......
......@@ -36,6 +36,8 @@
#ifndef NekMeshUtils_MESHELEMENTS_COMPOSITE
#define NekMeshUtils_MESHELEMENTS_COMPOSITE
#include <NekMeshUtils/NekMeshUtilsDeclspec.h>
namespace Nektar
{
namespace NekMeshUtils
......
......@@ -36,6 +36,8 @@
#ifndef NekMeshUtils_MESHELEMENTS_EDGE
#define NekMeshUtils_MESHELEMENTS_EDGE
#include <NekMeshUtils/NekMeshUtilsDeclspec.h>
namespace Nektar
{
namespace NekMeshUtils
......
......@@ -36,6 +36,8 @@
#ifndef NekMeshUtils_MESHELEMENTS_ELEMENT
#define NekMeshUtils_MESHELEMENTS_ELEMENT
#include <NekMeshUtils/NekMeshUtilsDeclspec.h>
namespace Nektar
{
namespace NekMeshUtils
......
......@@ -33,8 +33,10 @@
//
////////////////////////////////////////////////////////////////////////////////
#ifndef NekMeshUtils_MESHELEMENTS_FACE
#define NekMeshUtils_MESHELEMENTS_FACE
#ifndef NEKMESHUTILS_MESHELEMENTS_FACE
#define NEKMESHUTILS_MESHELEMENTS_FACE
#include <NekMeshUtils/NekMeshUtilsDeclspec.h>
namespace Nektar
{
......
......@@ -36,6 +36,8 @@
#ifndef NekMeshUtils_MESHELEMENTS_HEX
#define NekMeshUtils_MESHELEMENTS_HEX
#include <NekMeshUtils/NekMeshUtilsDeclspec.h>
namespace Nektar
{
namespace NekMeshUtils
......
......@@ -36,6 +36,8 @@
#ifndef NekMeshUtils_MESHELEMENTS_LINE
#define NekMeshUtils_MESHELEMENTS_LINE
#include <NekMeshUtils/NekMeshUtilsDeclspec.h>
namespace Nektar
{
namespace NekMeshUtils
......
......@@ -33,8 +33,10 @@
//
////////////////////////////////////////////////////////////////////////////////
#ifndef NekMeshUtils_MESHELEMENTS_MESH
#define NekMeshUtils_MESHELEMENTS_MESH
#ifndef NEKMESHUTILS_MESHELEMENTS_MESH
#define NEKMESHUTILS_MESHELEMENTS_MESH
#include <NekMeshUtils/NekMeshUtilsDeclspec.h>
namespace Nektar
{
......
......@@ -68,8 +68,6 @@ namespace NekMeshUtils
#include <SpatialDomains/Curve.hpp>
#include <SpatialDomains/MeshComponents.h>
#include <NekMeshUtils/NekMeshUtilsDeclspec.h>
#include "Node.h"
#include "Edge.h"
#include "Face.h"
......
......@@ -33,8 +33,10 @@
//
////////////////////////////////////////////////////////////////////////////////