mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
caf::HexInterpolator: Add a method to access vertex weights
Add a Cmake file to make it a library
This commit is contained in:
parent
0d6c93d96f
commit
cd6860b70f
21
Fwk/AppFwk/cafHexInterpolator/CMakeLists.txt
Normal file
21
Fwk/AppFwk/cafHexInterpolator/CMakeLists.txt
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
cmake_minimum_required (VERSION 2.8.12)
|
||||||
|
|
||||||
|
project (cafHexInterpolator)
|
||||||
|
|
||||||
|
set( PROJECT_FILES
|
||||||
|
cafHexInterpolator.h
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
add_library( ${PROJECT_NAME}
|
||||||
|
${PROJECT_FILES}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PUBLIC
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries( ${PROJECT_NAME} LibCore )
|
||||||
|
|
||||||
|
source_group("" FILES ${PROJECT_FILES})
|
@ -213,6 +213,13 @@ public:
|
|||||||
return interpolateInNormElm( pointInNormElm, values);
|
return interpolateInNormElm( pointInNormElm, values);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static std::array<double, 8> vertexWeights(const std::array<cvf::Vec3d, 8>& hexCorners,
|
||||||
|
const cvf::Vec3d& point )
|
||||||
|
{
|
||||||
|
cvf::Vec3d pointInNormElm = findNormalizedCoords(hexCorners, point);
|
||||||
|
return interpolationCoeffs(pointInNormElm);
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
static double interpolateInNormElm( const cvf::Vec3d & pointInNormElm, const std::array<double, 8>& values)
|
static double interpolateInNormElm( const cvf::Vec3d & pointInNormElm, const std::array<double, 8>& values)
|
||||||
|
Loading…
Reference in New Issue
Block a user