Commit 07824879 authored by Kilian Lackhove's avatar Kilian Lackhove
Browse files

Interpolator: Port Nekmesh after merge from master

parent 184bdfcb
......@@ -72,7 +72,7 @@ ENDIF (NEKTAR_USE_MESHGEN)
# LocalRegions.
ADD_EXECUTABLE(NekMesh ${NekMeshSources})
SET_COMMON_PROPERTIES(NekMesh)
TARGET_LINK_LIBRARIES(NekMesh NekMeshUtils LocalRegions)
TARGET_LINK_LIBRARIES(NekMesh NekMeshUtils LocalRegions SolverUtils)
SET_PROPERTY(TARGET NekMesh PROPERTY FOLDER util)
INSTALL(TARGETS NekMesh
RUNTIME DESTINATION ${NEKTAR_BIN_DIR} COMPONENT util)
......
......@@ -41,6 +41,8 @@
#include <LibUtilities/BasicUtils/SharedArray.hpp>
#include <LibUtilities/BasicUtils/PtsIO.h>
#include <SolverUtils/Interpolator.h>
#include <NekMeshUtils/MeshElements/Element.h>
#include "ProcessCurve.h"
......@@ -209,13 +211,17 @@ NekDouble ProcessCurve::EvaluateCoordinate(NekDouble xCoord)
{
if (m_fromFile)
{
Array<OneD, Array<OneD, NekDouble> > physCoords(1);
physCoords[0] = Array<OneD, NekDouble>(1,xCoord);
Array<OneD, Array<OneD, NekDouble> > intFields;
Array<OneD, Array<OneD, NekDouble> > tmp(2);
tmp[0] = Array<OneD, NekDouble>(1, xCoord);
tmp[1] = Array<OneD, NekDouble>(1, 0.0);
LibUtilities::PtsFieldSharedPtr toPts =
MemoryManager<LibUtilities::PtsField>::AllocateSharedPtr(1, tmp);
m_fieldPts->Interpolate(physCoords, intFields);
SolverUtils::Interpolator interp;
interp.Interpolate(m_fieldPts, toPts);
return intFields[0][0];
return tmp[1][0];
}
else
{
......
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