Commit a7c54f92 authored by Chris Cantwell's avatar Chris Cantwell

Clean up changes.

parent fbcd29af
......@@ -6,7 +6,6 @@ RelWithDebInfo MinSizeRel.")
PROJECT(Nektar++ C CXX)
CMAKE_POLICY(SET CMP0022 NEW)
#CMAKE_POLICY(SET CMP0074 NEW)
# Nektar++ requires C++11. Try to infer this for older CMake versions (less than
# 3.1.0)
IF ("${CMAKE_VERSION}" VERSION_LESS "3.1")
......
......@@ -288,4 +288,4 @@ MACRO(ADD_NEKPY_EXECUTABLE name source)
INSTALL(FILES ${source} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
FILE(COPY ${source} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
ADD_CUSTOM_TARGET(${name} SOURCES ${source})
ENDMACRO()
ENDMACRO()
\ No newline at end of file
Subproject commit 0724faa50ed893acb7ca256b1582d288396bb5d4
Subproject commit b1461b45abb08c48397fe6d046249703c4f8f160
......@@ -1456,13 +1456,12 @@ namespace Nektar
}
int ExpList::GetExpIndex(const Array<OneD, const NekDouble> &gloCoords,
Array<OneD, NekDouble> &locCoords,
NekDouble tol,
bool returnNearestElmt)
int ExpList::GetExpIndex(
const Array<OneD, const NekDouble> &gloCoords,
Array<OneD, NekDouble> &locCoords,
NekDouble tol,
bool returnNearestElmt)
{
NekDouble nearpt = 1e6;
if (GetNumElmts() == 0)
{
return -1;
......@@ -1476,13 +1475,17 @@ namespace Nektar
= MemoryManager<SpatialDomains::PointGeom>::AllocateSharedPtr(
GetExp(0)->GetCoordim(), -1, x, y, z);
// Get the list of elements whose bounding box contains the desired
// point.
std::vector<SpatialDomains::BgRtreeValue> elmts =
m_graph->GetElementsContainingPoint(p);
int min_id = 0;
NekDouble nearpt = 1e6;
NekDouble nearpt_min = 1e6;
int min_id = 0;
Array<OneD, NekDouble> savLocCoords(locCoords.num_elements());
// Check each element in turn to see if point lies within it.
for (int i = 0; i < elmts.size(); ++i)
{
if ((*m_exp)[m_elmtToExpId[elmts[i].second]]->
......@@ -1494,6 +1497,8 @@ namespace Nektar
}
else
{
// If it does not lie within, keep track of which element
// is nearest.
if(nearpt < nearpt_min)
{
min_id = m_elmtToExpId[elmts[i].second];
......@@ -1503,6 +1508,9 @@ namespace Nektar
}
}
}
// If the calling function is with just the nearest element, return
// that. Otherwise return -1 to indicate no matching elemenet found.
if(returnNearestElmt)
{
......
......@@ -131,9 +131,6 @@ namespace SpatialDomains
/// Computes a hash of this GeomFactors element.
inline size_t GetHash();
/// Return the Xmap;
inline StdRegions::StdExpansionSharedPtr &GetXmap();
protected:
/// Type of geometry (e.g. eRegular, eDeformed, eMovingRegular).
GeomType m_type;
......@@ -157,6 +154,8 @@ namespace SpatialDomains
/// DerivFactors vector cache
std::map<LibUtilities::PointsKeyVector, Array<TwoD, NekDouble> >
m_derivFactorCache;
/// Return the Xmap;
inline StdRegions::StdExpansionSharedPtr &GetXmap();
private:
/// Tests if the element is valid and not self-intersecting.
......
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