Commit f9b18179 authored by Michael Turner's avatar Michael Turner

replace virtual functions with pure virtual functions

parent e42692c8
......@@ -9,9 +9,6 @@ OPTION(NEKTAR_USE_CCM
"CCM star i/o library is available." OFF)
IF( NEKTAR_USE_CCM )
<<<<<<< HEAD
FIND_LIBRARY(CCMIO_LIBRARY NAMES "ccmio" "adf" PATHS /usr/local/lib ${Nektar++_TP_LIBRARY_DIRS})
=======
set(CCMIO_LIBRARIES
ccmio
......@@ -19,7 +16,6 @@ IF( NEKTAR_USE_CCM )
)
FIND_LIBRARY(CCMIO_LIBRARY NAMES "ccmio" PATHS /usr/local/lib ${Nektar++_TP_LIBRARY_DIRS})
>>>>>>> origin/master
IF( CCMIO_LIBRARY )
MESSAGE(STATUS "Found Ccmio: ${CCMIO_LIBRARY}")
......
......@@ -68,11 +68,7 @@ public:
*
* @return Array of two entries, min and max parametric coordinate.
*/
virtual Array<OneD, NekDouble> Bounds()
{
ASSERTL0(false,"must be implement at derived level");
return Array<OneD, NekDouble>();
}
virtual Array<OneD, NekDouble> Bounds() = 0;
/**
* @brief Calculates the arclength between the two paremetric points \p ti
......@@ -82,11 +78,7 @@ public:
* @param tf Second parametric coordinate.
* @return Arc length between \p ti and \p tf.
*/
virtual NekDouble Length(NekDouble ti, NekDouble tf)
{
ASSERTL0(false,"must be implement at derived level");
return 0.0;
}
virtual NekDouble Length(NekDouble ti, NekDouble tf) = 0;
/**
* @brief Gets the location (x,y,z) in an array out of the curve at
......@@ -95,20 +87,12 @@ public:
* @param t Parametric coordinate
* @return Array of x,y,z
*/
virtual Array<OneD, NekDouble> P(NekDouble t)
{
ASSERTL0(false,"must be implement at derived level");
return Array<OneD, NekDouble>();
}
virtual Array<OneD, NekDouble> P(NekDouble t) = 0;
/**
* @brief Gets the second derivatives at t
*/
virtual Array<OneD, NekDouble> D2(NekDouble t)
{
ASSERTL0(false,"must be implement at derived level");
return Array<OneD, NekDouble>();
}
virtual Array<OneD, NekDouble> D2(NekDouble t) = 0;
/**
* @brief Calculates the parametric coordinate and arclength location
......@@ -119,22 +103,14 @@ public:
*
* @todo This really needs improving for accuracy.
*/
virtual NekDouble tAtArcLength(NekDouble s)
{
ASSERTL0(false,"must be implement at derived level");
return 0.0;
}
virtual NekDouble tAtArcLength(NekDouble s) = 0;
/**
* @brief Gets the start and end of the curve.
*
* @return Array with 6 entries of endpoints x1,y1,z1,x2,y2,z2.
*/
virtual Array<OneD, NekDouble> GetMinMax()
{
ASSERTL0(false,"must be implement at derived level");
return Array<OneD, NekDouble>();
}
virtual Array<OneD, NekDouble> GetMinMax() = 0;
/// set the ids of the surfaces either side of the curve
void SetAdjSurf(std::vector<CADSurfSharedPtr> i)
......
......@@ -83,11 +83,7 @@ public:
*
* @return Array of 4 entries with parametric umin,umax,vmin,vmax.
*/
virtual Array<OneD, NekDouble> GetBounds()
{
ASSERTL0(false,"must be implement at derived level");
return Array<OneD, NekDouble>();
}
virtual Array<OneD, NekDouble> GetBounds() = 0;
/**
* @brief Get the normal vector at parametric point u,v.
......@@ -95,11 +91,7 @@ public:
* @param uv Array of u and v parametric coords.
* @return Array of xyz components of normal vector.
*/
virtual Array<OneD, NekDouble> N (Array<OneD, NekDouble> uv)
{
ASSERTL0(false,"must be implement at derived level");
return Array<OneD, NekDouble>();
}
virtual Array<OneD, NekDouble> N (Array<OneD, NekDouble> uv) = 0;
/**
* @brief Get the set of first derivatives at parametric point u,v
......@@ -107,11 +99,7 @@ public:
* @param uv Array of u and v parametric coords.
* @return Array of xyz copmonents of first derivatives.
*/
virtual Array<OneD, NekDouble> D1 (Array<OneD, NekDouble> uv)
{
ASSERTL0(false,"must be implement at derived level");
return Array<OneD, NekDouble>();
}
virtual Array<OneD, NekDouble> D1 (Array<OneD, NekDouble> uv) = 0;
/**
* @brief Get the set of second derivatives at parametric point u,v
......@@ -119,11 +107,7 @@ public:
* @param uv array of u and v parametric coords
* @return array of xyz copmonents of second derivatives
*/
virtual Array<OneD, NekDouble> D2 (Array<OneD, NekDouble> uv)
{
ASSERTL0(false,"must be implement at derived level");
return Array<OneD, NekDouble>();
}
virtual Array<OneD, NekDouble> D2 (Array<OneD, NekDouble> uv) = 0;
/**
* @brief Get the x,y,z at parametric point u,v.
......@@ -131,11 +115,7 @@ public:
* @param uv Array of u and v parametric coords.
* @return Array of xyz location.
*/
virtual Array<OneD, NekDouble> P (Array<OneD, NekDouble> uv)
{
ASSERTL0(false,"must be implement at derived level");
return Array<OneD, NekDouble>();
}
virtual Array<OneD, NekDouble> P (Array<OneD, NekDouble> uv) = 0;
/**
* @brief Performs a reverse look up to find u,v and x,y,z.
......@@ -143,40 +123,25 @@ public:
* @param p Array of xyz location
* @return The parametric location of xyz on this surface
*/
virtual Array<OneD, NekDouble> locuv(Array<OneD, NekDouble> p)
{
ASSERTL0(false,"must be implement at derived level");
return Array<OneD, NekDouble>();
}
virtual Array<OneD, NekDouble> locuv(Array<OneD, NekDouble> p) = 0;
/**
* @brief does unconstrained locuv to project point from anywhere
* and calculate the distance between the orthonormal projection to the surface
* and the point
*/
virtual NekDouble DistanceTo(Array<OneD, NekDouble> p)
{
ASSERTL0(false,"must be implement at derived level");
return 0.0;
}
virtual NekDouble DistanceTo(Array<OneD, NekDouble> p) = 0;
/**
* @brief takes a point from anywhere find the nearest surface point and its
* uv
*/
virtual void ProjectTo(Array<OneD, NekDouble> &tp, Array<OneD, NekDouble> &uv)
{
ASSERTL0(false,"must be implement at derived level");
}
virtual void ProjectTo(Array<OneD, NekDouble> &tp, Array<OneD, NekDouble> &uv) = 0;
/**
* @brief returns curvature at point uv
*/
virtual NekDouble Curvature(Array<OneD, NekDouble> uv)
{
ASSERTL0(false,"must be implement at derived level");
return 0.0;
}
virtual NekDouble Curvature(Array<OneD, NekDouble> uv) = 0;
/**
* @brief sets the flag to reverse the normal for this suface,
......@@ -199,10 +164,7 @@ protected:
/// normal
bool m_correctNormal;
/// Function which tests the the value of uv used is within the surface
virtual void Test(Array<OneD, NekDouble> uv)
{
ASSERTL0(false,"must be implement at derived level");
}
virtual void Test(Array<OneD, NekDouble> uv) = 0;
/// List of bounding edges in loops with orientation.
std::vector<EdgeLoop> m_edges;
};
......
......@@ -98,11 +98,7 @@ public:
*
* @return true if completed successfully
*/
virtual bool LoadCAD()
{
ASSERTL0(false,"must be implement at derived level");
return false;
}
virtual bool LoadCAD() = 0;
/**
* @brief Reports basic properties to screen.
......@@ -122,11 +118,7 @@ public:
*
* @return Array with 6 entries: xmin, xmax, ymin, ymax, zmin and zmax.
*/
virtual Array<OneD, NekDouble> GetBoundingBox()
{
ASSERTL0(false,"must be implement at derived level");
return Array<OneD, NekDouble>();
}
virtual Array<OneD, NekDouble> GetBoundingBox() = 0;
/**
* @brief Get the number of surfaces.
......
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