Commit e55bb4a5 authored by Kitware Robot's avatar Kitware Robot Committed by T.J. Corona
Browse files

moab 2017-01-20 (3c60766b)

Code extracted from:

    https://gitlab.kitware.com/third-party/moab.git

at commit 3c60766babe10d1cb7f2f3de09982e050b7ec506 (for/smtk).
parents
ANNOUNCING THE LGPL RELEASE OF MOAB
MOAB, a Mesh-Oriented datABase, is a software component for creating,
storing and accessing finite element mesh data. MOAB is being
designed in close collaboration with the SciDAC Terascale Simulation
Tools and Technologies (TSTT) Center and with the CUBIT project at
Sandia National Laboratories.
A few highlights of the capabilities in MOAB include:
* Representation of 0-3d elements in the finite element "zoo"
(including support for quadratic elements), as well as support for
polygon and polyhedron entities
* Highly efficient storage and query of structured and unstructured
mesh (e.g. a brick-shaped hex mesh requires approximately 25 and 55 MB
per million hex elements in the structured and unstructured
representations, respectively)
* Powerful data model allowing representation of various metadata in
the form of "sets" (arbitrary groupings of mesh entities and sets) and
"tags" (annotation of entities, sets, and entire mesh)
* Open source (LGPL) mesh readers/writers for Sandia ExodusII,
CUBIT .cub save/restore, VTK, and other mesh formats
* Implementation of the DOE Scidac TSTT center's mesh interface (see
www.tstt-scidac.org for more details of this interface)
MOAB is available under an LGPL license from Sandia National
Laboratories. More information, including instructions for
downloading MOAB, are located at
http://cubit.sandia.gov/MOAB/.
# SIGMA TEAM (Mar 2016)
Vijay Mahadevan <vijay.m@gmail.com>
Iulian Grindeanu <iulian@anl.gov>
Rajeev Jain <jain@anl.gov>
Navamita Ray <navamitaray@gmail.com>
Dan Wu <wuda@mcs.anl.gov>
Evan VanderZee <vanderzee@anl.gov>
# Contributors
Nico Schlömer <nico.schloemer@gmail.com>
Jacob Becker <jacob.becker@kitware.com>
Ben Boeckel <ben.boeckel@kitware.com>
David Thompson <fathom@mcs.anl.gov>
Andrew Davis <davisa@engr.wisc.edu>
Patrick Shriwise <shriwise@wisc.edu>
Paul Wilson <wilsonp@engr.wisc.edu>
Lukasz Kaczmarczyk <likask@wp.pl>
Lorenzo Botti <bottilorenzo@gmail.com>
# Past contributors
Tim Tautges <tautges@mcs.anl.gov>
Steve Jackson <fathom@mcs.anl.gov>
Jason Kraftcheck <kraftcheck@gmail.com>
Jim Porter <fathom@mcs.anl.gov>
Brandon Smith <fathom@mcs.anl.gov>
Ryan Lewis <fathom@mcs.anl.gov>
Shengyong Cai <shengyongcai@gmail.com>
Hong-Jun Kim <fathom@mcs.anl.gov>
Phillippe Pebay <fathom@mcs.anl.gov>
Xiabing Xu <fathom@mcs.anl.gov>
Robert Smith <fathom@mcs.anl.gov>
Jiangtao Hu <jiangtao_ma@yahoo.com>
Milad Fatenejad <icksa1@gmail.com>
Jane Hu <jhu7@wisc.edu>
Vitus Leung <vjleung@sandia.gov>
Alvaro Caceres <fathom@mcs.anl.gov>
Tom Hayes <fathom@mcs.anl.gov>
Fathom <fathom@mcs.anl.gov>
Ken Raffenetti <raffenet@mcs.anl.gov>
Nathan Bertram <fathom@mcs.anl.gov>
Darryl Melander <fathom@mcs.anl.gov>
Dmitry Karpeev <karpeev@mcs.anl.gov>
Brian Kiedrowski <fathom@mcs.anl.gov>
Karl Merkley <karl@elemtech.com>
Jeff Daily <jeff.daily@pnnl.gov>
cmake_minimum_required( VERSION 2.8.12 )
SET(PACKAGE_NAME "MOAB")
SET(PACKAGE_VERSION "4.9.1pre")
if (NOT WIN32 AND FALSE)
#This all breaks on windows.
SET(CMAKE_Fortran_COMPILER_INIT ${CMAKE_GENERATOR_FC})
SET(CMAKE_CXX_FLAGS_INIT "-fPIC -DPIC")
SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-O0 -g")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
SET(CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
SET(CMAKE_C_FLAGS_INIT "-fPIC -DPIC")
SET(CMAKE_C_FLAGS_DEBUG_INIT "-O0 -g")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
SET(CMAKE_C_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
SET(CMAKE_Fortran_FLAGS_INIT "-fPIC")
SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-O0 -g")
SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O2")
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_INIT "")
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS_INIT "")
endif()
project( MOAB )
include(GNUInstallDirs)
#Add our Cmake directory to the module search path
set(CMAKE_MODULE_PATH ${MOAB_SOURCE_DIR}/config ${CMAKE_MODULE_PATH})
################################################################################
# Set up version info
################################################################################
include (config/GetAcInitVersion.cmake)
get_ac_init_version()
set ( MOAB_VERSION_STRING "${PACKAGE_NAME} ${VERSION_STRING}" )
set ( MOAB_VERSION "${VERSION_STRING}" )
set ( MOAB_VERSION_MAJOR ${MAJOR_VERSION} )
set ( MOAB_VERSION_MINOR ${MINOR_VERSION} )
if ( DEFINED PATCH_VERSION )
set ( MOAB_VERSION_PATCH "${PATCH_VERSION}" )
else ( DEFINED PATCH_VERSION )
if ( MOAB_VERSION_MINOR EQUAL 99 )
set ( MOAB_VERSION_STRING "${MOAB_VERSION_STRING} (alpha)" )
else ( MOAB_VERSION_MINOR EQUAL 99 )
set ( MOAB_VERSION_STRING "${MOAB_VERSION_STRING} (beta)" )
endif ( MOAB_VERSION_MINOR EQUAL 99 )
endif ( DEFINED PATCH_VERSION )
IF(CMAKE_VERSION VERSION_EQUAL "3.0.0" OR CMAKE_VERSION VERSION_GREATER "3.0.0")
cmake_policy(SET CMP0003 NEW)
cmake_policy(SET CMP0020 NEW)
cmake_policy(SET CMP0042 OLD)
ENDIF ()
set ( abs_srcdir ${CMAKE_SOURCE_DIR} )
set ( abs_builddir ${PROJECT_BINARY_DIR} )
################################################################################
# Install Related Settings
################################################################################
get_filename_component( MOAB_ABSSRC_DIR2 moab.make.in REALPATH )
execute_process( COMMAND dirname ${MOAB_ABSSRC_DIR2}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE MOAB_ABSSRC_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
## Set the directory where the binaries will be stored
set( EXECUTABLE_OUTPUT_PATH
${PROJECT_BINARY_DIR}/bin)
## Set the directory where the libraries will be stored
set( LIBRARY_OUTPUT_PATH
${PROJECT_BINARY_DIR}/lib)
mark_as_advanced(
MOAB_ABSSRC_DIR)
include ( CheckIncludeFile )
include ( CheckFunctionExists )
include ( CheckTypeSize )
# Compiler defines... this should really be in a config file.
set( MOAB_DEFINES "" )
set( MOAB_LIBS )
set( MOAB_INSTALL_TARGETS )
################################################################################
# Options that the user controls
################################################################################
#option ( BUILD_SHARED_LIBS "Should shared or static libraries be created?" ON )
option ( ENABLE_SZIP "Should build with szip support?" OFF )
option ( ENABLE_CGM "Should build with CGM support?" OFF )
option ( ENABLE_CGNS "Should build with CGNS support?" OFF )
if ( MPI_DIR )
option ( ENABLE_MPI "Should MOAB be compiled with MPI support?" ON )
else ( MPI_DIR )
option ( ENABLE_MPI "Should MOAB be compiled with MPI support?" OFF )
endif ( MPI_DIR )
option ( ENABLE_HDF5 "Include HDF I/O interfaces in the build?" OFF )
option ( ENABLE_METIS "Include Metis partitioning interfaces in the build?" OFF )
option ( ENABLE_PARMETIS "Include parallel Metis partitioning interfaces in the build?" OFF )
option ( ENABLE_NETCDF "Include NetCDF support (ExodusII) interfaces in the build?" OFF )
option ( ENABLE_PNETCDF "Include parallel NetCDF support (ExodusII) interfaces in the build?" OFF )
option ( ENABLE_ZOLTAN "Include Zoltan support for partitioning algorithms?" OFF )
option ( ENABLE_VTK "Include VTK I/O interfaces in the build?" OFF )
option ( ENABLE_TESTING "Enable Testing" ON )
option ( MOAB_FORCE_64_BIT_HANDLES "Force MBEntityHandle to be 64 bits (uint64_t)" OFF )
option ( MOAB_FORCE_32_BIT_HANDLES "Force MBEntityHandle to be 32 bits (uint32_t)" OFF )
option ( ENABLE_IMESH "Should build IMESH?" ON )
option ( ENABLE_FBIGEOM "Should build FBIGEOM?" OFF )
option ( ENABLE_IREL "Should build IREL?" OFF )
mark_as_advanced(
MOAB_FORCE_64_BIT_HANDLES
MOAB_FORCE_32_BIT_HANDLES
)
if ( ENABLE_IMESH OR ENABLE_FBIGEOM )
include (${CMAKE_ROOT}/Modules/CMakeDetermineFortranCompiler.cmake)
endif ()
################################################################################
# Check for system include files
################################################################################
check_include_file( inttypes.h MOAB_HAVE_INTTYPES_H )
check_include_file( stdint.h MOAB_HAVE_STDINT_H )
check_include_file( stddef.h MOAB_HAVE_STDDEF_H )
check_include_file( stdlib.h MOAB_HAVE_STDLIB_H )
check_include_file( sys/types.h MOAB_HAVE_SYS_TYPES_H )
set( HAVE_SYS_TYPES_H ${MOAB_HAVE_SYS_TYPES_H} )
set( HAVE_STDDEF_H ${MOAB_HAVE_STDDEF_H} )
set( HAVE_STDINT_H ${MOAB_HAVE_STDINT_H} )
set( HAVE_INTTYPES_H ${MOAB_HAVE_INTTYPES_H} )
set( HAVE_STDLIB_H ${MOAB_HAVE_STDLIB_H} )
check_include_file( memory.h MOAB_HAVE_MEMORY_H )
#INCLUDE(TestBigEndian)
#TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
################################################################################
# Integer size Related Settings
################################################################################
if ( MOAB_FORCE_64_BIT_HANDLES AND MOAB_FORCE_32_BIT_HANDLES )
message( FATAL_ERROR
"You may not turn both MOAB_FORCE_64_BIT_HANDLES and MOAB_FORCE_32_BIT_HANDLES on. Turn one off to continue."
)
endif ( MOAB_FORCE_64_BIT_HANDLES AND MOAB_FORCE_32_BIT_HANDLES )
if ( NOT MOAB_FORCE_64_BIT_HANDLES AND NOT MOAB_FORCE_32_BIT_HANDLES )
if ( MOAB_HAVE_INTTYPES_H )
set ( CMAKE_EXTRA_INCLUDE_FILES "${CMAKE_EXTRA_INCLUDE_FILES};inttypes.h" )
endif ( MOAB_HAVE_INTTYPES_H )
if ( MOAB_HAVE_STDLIB_H )
set ( CMAKE_EXTRA_INCLUDE_FILES "${CMAKE_EXTRA_INCLUDE_FILES};stdlib.h" )
#set ( CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}\n#include <stdlib.h>\n" )
endif ( MOAB_HAVE_STDLIB_H )
check_type_size( size_t MOAB_HAVE_SIZE_T )
check_type_size( ptrdiff_t MOAB_HAVE_PTRDIFF_T )
set ( HAVE_SIZE_T ${MOAB_HAVE_SIZE_T} )
set ( HAVE_PTRDIFF_T ${MOAB_HAVE_PTRDIFF_T} )
endif ( NOT MOAB_FORCE_64_BIT_HANDLES AND NOT MOAB_FORCE_32_BIT_HANDLES )
# Check of presence of finite or isfinite macros
include (CheckFunctionExists)
CHECK_FUNCTION_EXISTS(std::isfinite MOAB_HAVE_STDISFINITE)
CHECK_FUNCTION_EXISTS(isfinite MOAB_HAVE_ISFINITE)
CHECK_FUNCTION_EXISTS(finite MOAB_HAVE_FINITE)
################################################################################
# Find packages
################################################################################
if ( BUILD_SHARED_LIBS EQUAL OFF )
#Static start
set_target_properties(MOAB PROPERTIES LINK_SEARCH_START_STATIC 1)
set_target_properties(MOAB PROPERTIES LINK_SEARCH_END_STATIC 1)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
endif ( BUILD_SHARED_LIBS EQUAL OFF )
find_package( verdict REQUIRED )
# check for MPI package
set (MOAB_HAVE_MPI 0 CACHE INTERNAL "Found necessary MPI components. Configure MOAB with it." )
if ( ENABLE_MPI )
set (MPI_C_COMPILER ${CC} )
set (MPI_CXX_COMPILER ${CXX} )
set (MPI_Fortran_COMPILER ${FC} )
find_package( MPI REQUIRED )
# CMake FindMPI script is sorely lacking:
if ( MPI_LIBRARY AND MPI_INCLUDE_PATH )
set( MPI_FOUND 1 )
endif ( MPI_LIBRARY AND MPI_INCLUDE_PATH )
if ( MPI_FOUND )
set ( MOAB_DEFINES "${MOAB_DEFINES} -DUSE_MPI" )
set(CMAKE_CXX_COMPILE_FLAGS ${CMAKE_CXX_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS})
set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ${MPI_LINK_FLAGS})
include_directories(${MPI_INCLUDE_PATH})
set( MOAB_HAVE_MPI 1 )
endif ( MPI_FOUND )
endif ( ENABLE_MPI )
#include (config/CheckCompilerFlags.cmake)
#set (MOAB_HAVE_ZLIB 0 CACHE INTERNAL "Found necessary Zlib components. Configure MOAB with it." )
if ( ENABLE_ZLIB )
find_package( ZLIB REQUIRED )
set (MOAB_HAVE_ZLIB 1)
endif (ENABLE_ZLIB)
find_package( CURL )
#set (MOAB_HAVE_HDF5 0 CACHE INTERNAL "Found necessary HDF5 components. Configure MOAB with it." )
#set (MOAB_HAVE_HDF5_PARALLEL 0 CACHE INTERNAL "Found necessary parallel HDF5 components. Configure MOAB with it." )
if ( ENABLE_HDF5 )
find_package( HDF5 COMPONENTS C REQUIRED )
set (MOAB_HAVE_HDF5 1)
if ( HDF5_IS_PARALLEL AND MOAB_HAVE_MPI )
set (MOAB_HAVE_HDF5_PARALLEL 1)
endif ( )
if ( CURL_FOUND )
set( HDF5_LIBRARIES ${HDF5_C_LIBRARIES} ${CURL_LIBRARIES} )
endif ( CURL_FOUND )
set( MOAB_LIBS ${HDF5_LIBRARIES} ${MOAB_LIBS} )
include_directories( ${HDF5_INCLUDE_DIR} src/io/mhdf/include )
endif ( ENABLE_HDF5 )
#set (MOAB_HAVE_NETCDF 0 CACHE INTERNAL "Found necessary NetCDF components. Configure MOAB with it." )
#set (MOAB_HAVE_PNETCDF 0 CACHE INTERNAL "Found necessary PNetCDF components. Configure MOAB with it." )
if ( ENABLE_NETCDF )
find_package( NetCDF REQUIRED )
# set( MOAB_DEFINES "-DNETCDF_FILE ${MOAB_DEFINES}" )
set (MOAB_HAVE_NETCDF 1)
set (MOAB_HAVE_NETCDF_H 1)
include_directories( ${NETCDF_INCLUDES} )
set( MOAB_LIBS ${NETCDF_LIBRARIES} ${MOAB_LIBS} )
#
if ( PNETCDF_FOUND )
# find_package( PNetCDF REQUIRED )
set (MOAB_HAVE_PNETCDF 1)
include_directories( ${PNETCDF_INCLUDES} )
set( MOAB_LIBS ${PNETCDF_LIBRARIES} ${MOAB_LIBS} )
endif ( PNETCDF_FOUND )
endif ( ENABLE_NETCDF )
if ( ENABLE_METIS )
find_package( Metis REQUIRED )
set (MOAB_HAVE_METIS 1)
endif (ENABLE_METIS )
if ( ENABLE_PARMETIS AND ENABLE_METIS AND METIS_FOUND )
find_package( ParMetis REQUIRED )
set (MOAB_HAVE_PARMETIS 1)
endif ( ENABLE_PARMETIS AND ENABLE_METIS AND METIS_FOUND )
#set (MOAB_HAVE_ZOLTAN 0 CACHE INTERNAL "Found necessary Zoltan components. Configure MOAB with it." )
if ( ENABLE_ZOLTAN )
find_package( Zoltan REQUIRED )
set (MOAB_HAVE_ZOLTAN 1)
endif (ENABLE_ZOLTAN )
#set (MOAB_HAVE_CGM 0 CACHE INTERNAL "Found necessary CGM components. Configure MOAB with it." )
if ( ENABLE_CGM )
find_package( CGM REQUIRED )
set( MOAB_DEFINES "${CGM_DEFINES} -DCGM ${MOAB_DEFINES}" )
set (MOAB_HAVE_CGM 1)
endif (ENABLE_CGM)
if (ENABLE_CGNS)
set( MOABIO_LIBS ${MOABIO_LIBS} ${CGNS_LIBRARIES} )
set (MOAB_HAVE_CGNS 1)
endif(ENABLE_CGNS)
################################################################################
# Add Directories
################################################################################
add_subdirectory( src )
add_subdirectory( itaps )
# add_subdirectory( tools )
################################################################################
# Testing Related Settings
################################################################################
#turn on ctest if we want testing
# if ( ENABLE_TESTING )
# enable_testing()
# add_subdirectory( test )
# endif()
###############################################################################
#
###############################################################################
#export(
# TARGETS ${MOAB_INSTALL_TARGETS}
# FILE "${PROJECT_BINARY_DIR}/MOABTargets.cmake"
# )
#install(
# EXPORT MOABTargets
# DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MOAB/
# )
# Create some custom command
# For consistency with autoconf, create a "make check" equivalent to "ctest"
ADD_CUSTOM_TARGET( check COMMAND ctest )
# For consistency with autoconf, create "make dist" and "make distcheck" targets
INCLUDE( CMakeDistCheck )
DEFINE_DISTCHECK ( )
################################################################################
# Generate the MOABConfig.cmake file
################################################################################
set(CXX ${CMAKE_CXX_COMPILER})
set(CC ${CMAKE_C_COMPILER})
set(F77 ${CMAKE_Fortran_COMPILER} )
set(FC ${CMAKE_Fortran_COMPILER})
set(CPPFLAGS "${CMAKE_CXX_FLAGS} ${MOAB_DEFINES}")
IF (CMAKE_BUILD_TYPE MATCHES "Debug")
set(CXXFLAGS ${CMAKE_CXX_FLAGS_DEBUG})
set(CFLAGS ${CMAKE_C_FLAGS_DEBUG})
set(FFLAGS ${CMAKE_Fortran_FLAGS_DEBUG})
ELSE (CMAKE_BUILD_TYPE MATCHES "Debug")
set(CXXFLAGS ${CMAKE_CXX_FLAGS_RELEASE})
set(CFLAGS ${CMAKE_C_FLAGS_RELEASE})
set(FFLAGS ${CMAKE_Fortran_FLAGS_RELEASE})
ENDIF (CMAKE_BUILD_TYPE MATCHES "Debug")
# CMake does not define uninstall target. Look at install manifest and remove
# all the files recursively.
CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/config/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY
)
#if ( ENABLE_IMESH OR ENABLE_FBIGEOM )
# enable_language(Fortran)
#
# # Include CMake's Fortran mangling evaluation macros
# include(FortranCInterface)
#
# if ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
# set(FC_CASE "NAME")
# else ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
# set(FC_CASE "name")
# endif ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
# if (NOT "${FortranCInterface_GLOBAL_SUFFIX}" STREQUAL "")
# set(FortranCInterface_GLOBAL_SUFFIX "## ${FortranCInterface_GLOBAL_SUFFIX}")
# endif (NOT "${FortranCInterface_GLOBAL_SUFFIX}" STREQUAL "")
# if (NOT "${FortranCInterface_GLOBAL__SUFFIX}" STREQUAL "")
# set(FortranCInterface_GLOBAL__SUFFIX "## ${FortranCInterface_GLOBAL__SUFFIX}")
# endif (NOT "${FortranCInterface_GLOBAL__SUFFIX}" STREQUAL "")
#
# set(MOAB_F77_FUNC "${FortranCInterface_GLOBAL_PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL_SUFFIX}")
# set(MOAB_F77_FUNC_ "${FortranCInterface_GLOBAL__PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL__SUFFIX}")
# set(MOAB_FC_FUNC "${FortranCInterface_GLOBAL_PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL_SUFFIX}")
# set(MOAB_FC_FUNC_ "${FortranCInterface_GLOBAL__PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL__SUFFIX}")
#
#endif ( ENABLE_IMESH OR ENABLE_FBIGEOM )
# Generate the CMake input header file and then pass it through configuration
## execute_process( COMMAND cat MOABConfig.h.in COMMAND sed -e "s/#undef /#cmakedefine MOAB_/g"
#execute_process( COMMAND cat MOABConfig.h.in COMMAND sed -r "s/#undef ([A-Z].*)/#cmakedefine MOAB_\\1 @MOAB_\\1@/"
# WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/config
# OUTPUT_FILE MOABConfig.cmake2.h.in
# OUTPUT_STRIP_TRAILING_WHITESPACE
# )
CONFIGURE_FILE(config/MOABConfig.cmake.h.in "${PROJECT_BINARY_DIR}/src/moab/MOABConfig.h" @ONLY)
# INSTALL(
# FILES "${PROJECT_BINARY_DIR}/src/moab/MOABConfig.h"
# DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
# )
CONFIGURE_FILE(MOABConfig.new.cmake.in "${PROJECT_BINARY_DIR}/MOABConfig.cmake" @ONLY)
#CONFIGURE_FILE(moab.make.in "${PROJECT_BINARY_DIR}/lib/moab.make" @ONLY)
if ( MOAB_HAVE_FBIGEOM )
CONFIGURE_FILE(itaps/fbigeom/FBiGeom-Defs.inc.in "${PROJECT_BINARY_DIR}/lib/FBiGeom-Defs.inc" @ONLY)
install(
FILES "${PROJECT_BINARY_DIR}/lib/FBiGeom-Defs.inc"
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif ( MOAB_HAVE_FBIGEOM )
if ( MOAB_HAVE_IMESH )
CONFIGURE_FILE(itaps/imesh/iMesh-Defs.inc.in "${PROJECT_BINARY_DIR}/lib/iMesh-Defs.inc" @ONLY)
INSTALL(
FILES "${PROJECT_BINARY_DIR}/lib/iMesh-Defs.inc"
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif ( MOAB_HAVE_IMESH )
INSTALL(
FILES "${PROJECT_BINARY_DIR}/MOABConfig.cmake"
# "${PROJECT_BINARY_DIR}/lib/moab.make"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MOAB/
)
#ADD_CUSTOM_TARGET(
# uninstall
# COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
# )
# All done.
This is a list of the known issues with MOAB v4. For more details please see
the online ticket system at the MOAB website:
https://trac.mcs.anl.gov/projects/ITAPS/wiki
# Severity Summary/Details
=== ======== ===================================================================
#161 enhancement Need better MBCN test
#170 enhancement get_connectivity should optionally return an offset list
#29 enhancement Specifying sets not to write
#32 enhancement support writing compressed (szip) HDF5 files
#138 enhancement Error handlers
#141 enhancement reader/writer file set
#172 enhancement environmental variables
#174 enhancement Mechanism for leaving readers instantiated
#26 enhancement pipelining utilities
MOAB, a Mesh-Oriented datABase, is a software component for creating,
storing and accessing finite element mesh data.
Copyright 2004 Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Coroporation, the U.S. Government
retains certain rights in this software.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. A copy of the full
GNU Lesser General Public License can be found at
http://www.gnu.org/copyleft/lesser.html.
For more information, contact the authors of this software at
moab@sandia.gov.
# Config file for MOAB; use the CMake find_package() function to pull this into
# your own CMakeLists.txt file.
#
# This file defines the following variables:
# MOAB_FOUND - boolean indicating that MOAB is found
# MOAB_INCLUDE_DIRS - include directories from which to pick up MOAB includes
# MOAB_LIBRARIES - libraries need to link to MOAB; use this in target_link_libraries for MOAB-dependent targets
# MOAB_CXX, MOAB_CC, MOAB_F77, MOAB_FC - compilers used to compile MOAB
# MOAB_CXXFLAGS, MOAB_CCFLAGS, MOAB_FFLAGS, MOAB_FCFLAGS - compiler flags used to compile MOAB; possibly need to use these in add_definitions or CMAKE_<LANG>_FLAGS_<MODE>
set(MOAB_FOUND 1)
set(MOAB_CXX @CXX@)
set(MOAB_CC @CC@)
set(MOAB_FC @FC@)
set(MOAB_F77 @F77@)
set(MOAB_BUILT_SHARED @BUILD_SHARED_LIBS@)
set(MOAB_USE_MPI @MOAB_USE_MPI@)
set(MPI_DIR "@MPI_DIR@")
set(MOAB_USE_HDF @MOAB_USE_HDF@)
set(HDF5_DIR "@HDF5_DIR@")
set(MOAB_USE_SZIP @MOAB_USE_SZIP@)
set(SZIP_DIR "@SZIP_DIR@")
set(MOAB_USE_NETCDF @MOAB_USE_NETCDF@)
set(NetCDF_DIR "@NetCDF_DIR@")
set(MOAB_USE_PNETCDF @MOAB_USE_PNETCDF@)
set(PNetCDF_DIR "@PNetCDF_DIR@")
set(MOAB_USE_ZOLTAN @MOAB_USE_ZOLTAN@)
set(Zoltan_DIR "@Zoltan_DIR@")
set(ENABLE_IMESH @ENABLE_IMESH@)
set(ENABLE_IGEOM @ENABLE_IGEOM@)
# Compiler flags used by MOAB
set(MOAB_CFLAGS "@CFLAGS@ @AM_CFLAGS@")
set(MOAB_CXXFLAGS "@CXXFLAGS@ @AM_CXXFLAGS@")
set(MOAB_FCFLAGS "@FCFLAGS@ @AM_FCLAGS@")
set(MOAB_FFLAGS "@FFLAGS@ @AM_FFLAGS@")
# Library and include defs
get_filename_component(MOAB_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
if(NOT TARGET MOAB AND NOT MOAB_BINARY_DIR)
include("${MOAB_CMAKE_DIR}/MOABTargets.cmake")
endif()
# Target information
set(MOAB_HAS_FBIGEOM "@ENABLE_IGEOM@")
set(MOAB_HAS_IMESH "@ENABLE_IMESH@")
set(MOAB_HAS_MPI "@MOAB_HAS_MPI@")
if(MOAB_USE_HDF)
if(EXISTS "@HDF5_DIR@/share/cmake/hdf5/hdf5-config.cmake")
include(@HDF5_DIR@/share/cmake/hdf5/hdf5-config.cmake)
endif()
endif()
set(MOAB_LIBRARY_DIRS, "@CMAKE_INSTALL_PREFIX@/lib")
set(MOAB_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include")
set(MOAB_LIBRARIES MOAB)
set(MOAB_LIBS @LIBS@)
# MOAB: Mesh-Oriented datABase
MOAB is a component for representing and evaluating mesh data. MOAB can store structured and unstructured mesh, consisting of elements in the finite element "zoo". The functional interface to MOAB is simple yet powerful, allowing the representation of many types of metadata commonly found on the mesh. MOAB is optimized for efficiency in space and time, based on access to mesh in chunks rather than through individual entities, while also versatile enough to support individual entity access. MOAB can be used in several ways:
* As the underlying mesh data representation for applications
- Several computational solvers in various scientific domains (nuclear engineering, nonlinear thermo-mechanics, CFD, etc)
- VERDE mesh verification code
- Mesh quality computation
* As a mesh input mechanism (using mesh readers included with MOAB),
* As as a translator between mesh formats (using readers and writers included with MOAB).
MOAB was developed originally as part of the CUBIT project at Sandia National Laboratories, and has been partially funded by the DOE SciDAC program (TSTT, ITAPS, FASTMath) and DOE-NE (NEAMS program).
# Dependencies
- **MPI**: MOAB supports usage of MPICH and OpenMPI libraries configured externally in order to enable scalable mesh manipulation algorithms.
- **HDF5**: In order to manage the data dependencies and to natively support parallel I/O, MOAB uses a custom file format that can represent the entire MOAB data model in a native HDF5-based file format. Support for this file format requires version 5 of the HDF library, which can be obtained at [HDF5].
- **NetCDF**: MOAB library optionally depends on the NetCDF libraries (C and C++) to compile the ExodusII reader/writer. To get netcdf, go to [NetCDF].
- **Metis**: MOAB can use the Metis library for partitioning mesh files in serial
- **Zoltan**: Support for online partitioning through Zoltan (and its dependencies on Scotch, Parmetis etc) can be utilized through the partitioner tool
# Configuration and Build
- Unpack the source code in a local directory.
- Run `autoreconf -fi` to generate the configure script
- Run the `configure --help` script in the top source directory to see a list of available configure options.
- Use `--prefix=INSTALL_DIR` to specify installation directory
- Override default compilers with environment or user options: `CC, CXX, FC, F77`
- If you have **MPI** installed, use `--with-mpi=$MPI_DIR`
- If you have **HDF5** and **NetCDF** installed, use `--with-hdf5=$HDF5_DIR` and `--with-netcdf=$NETCDF_DIR` to specify external dependencies.
- **Auto-Download options**: MOAB now supports automatic dependency download and configuration that has been tested on various platforms and architectures.
- *HDF5*: Use `--download-hdf5` OR `--download-hdf5=TARBALL_PATH`
- *NetCDF*: Use `--download-netcdf` OR `--download-netcdf=TARBALL_PATH`
- *Metis*: Use `--download-metis` OR `--download-metis=TARBALL_PATH`
- Now run the `configure` script with desired configuration options either in-source or out-of-source (build) directory.
- In the build directory, run the following:
- Compile MOAB library and supported tools: `make -j4`.
- Verify configuration and build setup: `make check`.
- To install the compiled libraries, headers and tools, run `make install`.
- You can now use the `makefile` generated under the `build/examples` folder and modify it to compile user code dependent on MOAB libraries
# Continuous Integration
There are several hooks to online continuous integration systems, nightly and commit-based Buildbot/Bitbucket builds that are constantly run during a development day to check the integrity and robustness of the MOAB library.