Commit d08d6f3b authored by Michael Turner's avatar Michael Turner
Browse files

merge master and small fixes

parent 31158810
......@@ -96,13 +96,8 @@ MARK_AS_ADVANCED(NEKTAR_BUILD_PACKAGES)
OPTION(NEKTAR_TEST_ALL "Include full set of regression tests to this build." OFF)
# meshing and cad options
OPTION(NEKTAR_USE_OCC "Use opencascade for geometry interface." OFF)
# meshing
OPTION(NEKTAR_USE_MESH "Build meshing utilities." OFF)
# if meshing is selected hard set the occ option
IF( NEKTAR_USE_MESH )
SET(NEKTAR_USE_OCC ON CACHE BOOL "Use opencascade for geometry interface." FORCE)
ENDIF()
# Build options
OPTION(NEKTAR_FULL_DEBUG "Enable Full Debugging." OFF)
......
......@@ -6,70 +6,70 @@
#
########################################################################
IF(NEKTAR_USE_OCC)
SET(BUILD_OCC ON)
IF(NEKTAR_USE_MESH)
SET(BUILD_OCC ON)
OPTION(THIRDPARTY_DOWNLOAD_OCC
"Get OpenCascade from ThirdParty." ${BUILD_OCC})
OPTION(THIRDPARTY_DOWNLOAD_OCC
"Get OpenCascade from ThirdParty." ${BUILD_OCC})
IF (THIRDPARTY_DOWNLOAD_OCC)
IF(WIN32)
MESSAGE(SEND_ERROR "Cannot use OpenCascade with Nektar++ on Windows")
ELSEIF(APPLE)
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
opencascade-6.8
PREFIX ${TPSRC}
URL ${TPURL}/OCC680osx64.tgz
URL_MD5 626292523b0691304f0fa271989fbc44
STAMP_DIR ${TPBUILD}/stamp
BINARY_DIR ${TPBUILD}/opencascade-6.8
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/opencascade-6.8
INSTALL_DIR ${TPDIST}
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND cp -a ${TPSRC}/opencascade-6.8/i686/lib/. ${TPDIST}/lib/ COMMAND cp -a ${TPSRC}/opencascade-6.8/i686/inc/. ${TPDIST}/include/
)
LINK_DIRECTORIES(${TPDIST}/lib)
INCLUDE_DIRECTORIES(SYSTEM ${TPDIST}/include)
IF (THIRDPARTY_DOWNLOAD_OCC)
IF(WIN32)
MESSAGE(SEND_ERROR "Cannot use OpenCascade with Nektar++ on Windows")
ELSEIF(APPLE)
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
opencascade-6.8
PREFIX ${TPSRC}
URL ${TPURL}/OCC680osx64.tgz
URL_MD5 626292523b0691304f0fa271989fbc44
STAMP_DIR ${TPBUILD}/stamp
BINARY_DIR ${TPBUILD}/opencascade-6.8
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/opencascade-6.8
INSTALL_DIR ${TPDIST}
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND cp -a ${TPSRC}/opencascade-6.8/i686/lib/. ${TPDIST}/lib/ COMMAND cp -a ${TPSRC}/opencascade-6.8/i686/inc/. ${TPDIST}/include/
)
LINK_DIRECTORIES(${TPDIST}/lib)
INCLUDE_DIRECTORIES(SYSTEM ${TPDIST}/include)
EXTERNALPROJECT_ADD_STEP(opencascade-6.8 patch-install-path
COMMAND bash ${CMAKE_SOURCE_DIR}/cmake/scripts/patch-occ.sh ${TPSRC}/opencascade-6.8/i686/lib ${CMAKE_INSTALL_PREFIX}/${NEKTAR_LIB_DIR}
DEPENDEES build
DEPENDERS install)
EXTERNALPROJECT_ADD_STEP(opencascade-6.8 patch-install-path
COMMAND bash ${CMAKE_SOURCE_DIR}/cmake/scripts/patch-occ.sh ${TPSRC}/opencascade-6.8/i686/lib ${CMAKE_INSTALL_PREFIX}/${NEKTAR_LIB_DIR}
DEPENDEES build
DEPENDERS install)
SET(OCC_LIBS PTKernel TKernel TKMath TKBRep TKIGES TKSTEP TKSTEPAttr
TKSTEP209 TKSTEPBase TKShapeSchema TKGeomBase TKGeomAlgo TKG3d TKG2d
TKXSBase TKPShape TKTopAlgo)
SET(OCC_LIBS PTKernel TKernel TKMath TKBRep TKIGES TKSTEP TKSTEPAttr
TKSTEP209 TKSTEPBase TKShapeSchema TKGeomBase TKGeomAlgo TKG3d TKG2d
TKXSBase TKPShape TKTopAlgo)
ELSE()
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
opencascade-6.8
PREFIX ${TPSRC}
URL ${TPURL}/OCC680lin64.tgz
URL_MD5 d655b6f50998bb9600e081907c247793
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/opencascade-6.8
INSTALL_DIR ${TPDIST}
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND cp -a ${TPSRC}/opencascade-6.8/lib/. ${TPDIST}/lib/ COMMAND cp -a ${TPSRC}/opencascade-6.8/inc/. ${TPDIST}/include/
)
LINK_DIRECTORIES(${TPDIST}/lib)
INCLUDE_DIRECTORIES(SYSTEM ${TPDIST}/include)
ELSE()
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
opencascade-6.8
PREFIX ${TPSRC}
URL ${TPURL}/OCC680lin64.tgz
URL_MD5 d655b6f50998bb9600e081907c247793
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/opencascade-6.8
INSTALL_DIR ${TPDIST}
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND cp -a ${TPSRC}/opencascade-6.8/lib/. ${TPDIST}/lib/ COMMAND cp -a ${TPSRC}/opencascade-6.8/inc/. ${TPDIST}/include/
)
LINK_DIRECTORIES(${TPDIST}/lib)
INCLUDE_DIRECTORIES(SYSTEM ${TPDIST}/include)
SET(OCC_LIBS PTKernel TKernel TKMath TKBRep TKIGES TKSTEP TKSTEPAttr
TKSTEP209 TKSTEPBase TKShapeSchema TKGeomBase TKGeomAlgo TKG3d TKG2d
TKXSBase TKPShape TKTopAlgo)
SET(OCC_LIBS PTKernel TKernel TKMath TKBRep TKIGES TKSTEP TKSTEPAttr
TKSTEP209 TKSTEPBase TKShapeSchema TKGeomBase TKGeomAlgo TKG3d TKG2d
TKXSBase TKPShape TKTopAlgo)
MESSAGE(STATUS "Link to OCC: ${OCC_LIBS}.so")
ENDIF()
ENDIF()
ENDIF (THIRDPARTY_DOWNLOAD_OCC)
ENDIF(NEKTAR_USE_OCC)
ENDIF (THIRDPARTY_DOWNLOAD_OCC)
ENDIF(NEKTAR_USE_MESH)
......@@ -25,6 +25,9 @@ IF(NEKTAR_USE_MESH)
ExtLibInterface/TetGenInterface.cpp
TetMeshing/TetMesh.cpp
BLMeshing/BLMesh.cpp
CADSystem/CADSystem.cpp
CADSystem/CADCurve.cpp
CADSystem/CADSurf.cpp
)
ENDIF()
......@@ -57,25 +60,13 @@ IF(NEKTAR_USE_MESH)
ExtLibInterface/TetGenInterface.h
TetMeshing/TetMesh.h
BLMeshing/BLMesh.h
)
ENDIF()
IF(NEKTAR_USE_OCC)
SET(NEKMESHUTILS_SOURCES ${NEKMESHUTILS_SOURCES}
CADSystem/CADSystem.cpp
CADSystem/CADCurve.cpp
CADSystem/CADSurf.cpp
)
SET(NEKMESHUTILS_HEADERS ${NEKMESHUTILS_HEADERS}
CADSystem/CADSystem.h
CADSystem/CADVert.h
CADSystem/CADCurve.h
CADSystem/CADSurf.h
CADSystem/OpenCascade.h
)
ENDIF(NEKTAR_USE_OCC)
)
ENDIF()
ADD_NEKTAR_LIBRARY(NekMeshUtils lib ${NEKTAR_LIBRARY_TYPE}
${NEKMESHUTILS_SOURCES} ${NEKMESHUTILS_HEADERS})
......@@ -86,12 +77,12 @@ IF(NEKTAR_USE_MESH)
TARGET_LINK_LIBRARIES(NekMeshUtils LINK_PRIVATE ${TETGEN_LIBRARY})
ENDIF()
IF(NEKTAR_USE_OCC)
IF(NEKTAR_USE_MESH)
SET(OCC_DEF LIN LININTEL HAVE_WOK_CONFIG_H HAVE_CONFIG_H CSFDB)
SET_TARGET_PROPERTIES(NekMeshUtils PROPERTIES COMPILE_DEFINITIONS "${OCC_DEF}")
TARGET_LINK_LIBRARIES(NekMeshUtils LINK_PUBLIC ${OCC_LIBS})
ADD_DEPENDENCIES(NekMeshUtils opencascade-6.8)
ENDIF(NEKTAR_USE_OCC)
ENDIF(NEKTAR_USE_MESH)
IF (NEKTAR_USE_MESH)
SET_TARGET_PROPERTIES(NekMeshUtils PROPERTIES COMPILE_DEFINITIONS "MESHGEN")
......
......@@ -125,16 +125,18 @@ void ProcessQualityMetric::Process(po::variables_map &vm)
inline DNekMat MappingIdealToRef(SpatialDomains::GeometrySharedPtr geom)
{
int n = geom->GetNumVerts(), i, j, dim = geom->GetShapeDim();
cout << n << endl;
DNekMat map (n, n, 1.0, eFULL);
DNekMat mapref(n, n, 1.0, eFULL);
// Extract coordinate information.
for (i = 0; i < n; ++i)
{
Array<OneD, NekDouble> loc(dim);
geom->GetVertex(i)->GetCoords(loc);
for (j = 0; j < dim; ++j)
{
map(j,i) = (*geom->GetVertex(i))[j];
map(j,i) = loc[j];
}
}
......
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