[MOAB-dev] commit/MOAB: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Tue Jul 16 11:33:19 CDT 2013
2 new commits in MOAB:
https://bitbucket.org/fathomteam/moab/commits/d018f20ee08f/
Changeset: d018f20ee08f
Branch: None
User: danwu
Date: 2013-07-16 18:23:26
Summary: In convert_variable(), the old code calculated the variable size for HOMME with numLev * localGid.size(). This is wrong for variables that are not (time, lev, ncol) so it was revised to use multiplication of each dimension's readCount. For readCount of ncol, the initial value is the localGid size. However, it will be modified for each subrange of localGid in a loop to read non-set variables. In convert_variable(), this readCount will be the size of the last subrange, and the conversion from float to double will be incorrect. This bug has caused a ParGAL test case for HOMME fail. To fix it, we reuse the existing VarData::sz to store the non-set variable size, and let convert_variable() refer to it. We apply this fix to MPAS as well (although there is no float to double conversion for now to reproduce the bug). It is also noticed that current VarData::readDims and VarData::readCounts can be refactored (will do it later)
Affected #: 3 files
diff --git a/src/io/NCHelper.cpp b/src/io/NCHelper.cpp
index 87cc690..7b6216c 100644
--- a/src/io/NCHelper.cpp
+++ b/src/io/NCHelper.cpp
@@ -238,9 +238,8 @@ ErrorCode NCHelper::convert_variable(ReadNC::VarData& var_data, int tstep_num)
// Get ptr to tag space
void* data = var_data.varDatas[tstep_num];
- std::size_t sz = 1;
- for (std::size_t idx = 0; idx != var_data.readCounts[tstep_num].size(); idx++)
- sz *= var_data.readCounts[tstep_num][idx];
+ // Get variable size
+ std::size_t sz = var_data.sz;
// Finally, read into that space
int success = 0;
diff --git a/src/io/NCHelperHOMME.cpp b/src/io/NCHelperHOMME.cpp
index e963564..95605fe 100644
--- a/src/io/NCHelperHOMME.cpp
+++ b/src/io/NCHelperHOMME.cpp
@@ -690,11 +690,8 @@ ErrorCode NCHelperHOMME::read_ucd_variable_to_nonset_allocate(EntityHandle file_
assert(vdatas[i].readDims[t].size() == vdatas[i].varDims.size());
range = &verts;
break;
- case ReadNC::ENTLOCSET:
- // set
- break;
default:
- ERRORR(MB_FAILURE, "Unrecognized entity location type.");
+ ERRORR(MB_FAILURE, "Unexpected entity location type for HOMME non-set variable.");
break;
}
@@ -706,6 +703,12 @@ ErrorCode NCHelperHOMME::read_ucd_variable_to_nonset_allocate(EntityHandle file_
assert((unsigned)count == range->size());
vdatas[i].varDatas[t] = data;
}
+
+ // Calculate variable size
+ std::size_t sz = 1;
+ for (std::size_t idx = 0; idx != vdatas[i].readCounts[0].size(); idx++)
+ sz *= vdatas[i].readCounts[0][idx];
+ vdatas[i].sz = sz;
}
return rval;
diff --git a/src/io/NCHelperMPAS.cpp b/src/io/NCHelperMPAS.cpp
index 9c1f075..d7f61af 100644
--- a/src/io/NCHelperMPAS.cpp
+++ b/src/io/NCHelperMPAS.cpp
@@ -668,9 +668,6 @@ ErrorCode NCHelperMPAS::read_ucd_variable_to_nonset_allocate(EntityHandle file_s
vdatas[i].readCounts[t].push_back(nLocalCells);
range = &facesOwned;
break;
- case ReadNC::ENTLOCSET:
- // set
- break;
case ReadNC::ENTLOCEDGE:
// edges
vdatas[i].readDims[t].push_back(localGidEdges[0] - 1);
@@ -678,7 +675,7 @@ ErrorCode NCHelperMPAS::read_ucd_variable_to_nonset_allocate(EntityHandle file_s
range = &edges;
break;
default:
- ERRORR(MB_FAILURE, "Unrecognized entity location type.");
+ ERRORR(MB_FAILURE, "Unexpected entity location type for MPAS non-set variable.");
break;
}
@@ -700,6 +697,12 @@ ErrorCode NCHelperMPAS::read_ucd_variable_to_nonset_allocate(EntityHandle file_s
vdatas[i].varDatas[t] = data;
}
}
+
+ // Calculate variable size
+ std::size_t sz = 1;
+ for (std::size_t idx = 0; idx != vdatas[i].readCounts[0].size(); idx++)
+ sz *= vdatas[i].readCounts[0][idx];
+ vdatas[i].sz = sz;
}
return rval;
https://bitbucket.org/fathomteam/moab/commits/337dce0f5b6c/
Changeset: 337dce0f5b6c
Branch: master
User: danwu
Date: 2013-07-16 18:33:00
Summary: Merge branch 'master' of https://bitbucket.org/fathomteam/moab
Affected #: 9 files
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3774046..007d501 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -100,7 +100,30 @@ project( MOAB )
# iMesh
option ( MOAB_BUILD_IMESH "Build the iMesh interface?" ON )
+ # check for MPI package
+ if ( MOAB_USE_MPI )
+ find_package( MPI )
+ # 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" )
+ endif ( MPI_FOUND )
+ endif ( MOAB_USE_MPI )
+
+ if ( MOAB_USE_NETCDF )
+ find_package( NetCDF )
+ endif ( MOAB_USE_NETCDF )
+
+ if ( MOAB_USE_HDF )
+ # HDF5
+ find_package( HDF5 )
+ endif ( MOAB_USE_HDF )
+
add_subdirectory( src )
+ add_subdirectory( itaps/imesh )
add_subdirectory( tools )
add_subdirectory( test )
-
+
diff --git a/examples/DirectAccessNoHoles.cpp b/examples/DirectAccessNoHoles.cpp
index 340efae..55ab279 100644
--- a/examples/DirectAccessNoHoles.cpp
+++ b/examples/DirectAccessNoHoles.cpp
@@ -7,13 +7,13 @@
* and vertex to quad adjacency lists. This allows applications to access this data directly
* without going through MOAB's API. In cases where the mesh is not changing (or only mesh
* vertices are moving), this can save significant execution time in applications.
- *
+ * \verbatim
* ----------------------
* | | | |
* | | | | ...
* | | | |
* ----------------------
- *
+ * \endverbatim
* -# Initialize MOAB \n
* -# Create a quad mesh, as depicted above
* -# Create 2 dense tags (tag1, tag2) for avg position to assign to quads, and # verts per quad (tag3)
diff --git a/examples/DirectAccessWithHoles.cpp b/examples/DirectAccessWithHoles.cpp
index 524c30f..1917b09 100644
--- a/examples/DirectAccessWithHoles.cpp
+++ b/examples/DirectAccessWithHoles.cpp
@@ -1,14 +1,14 @@
-/** @example DirectAccess.cpp \n
+/** @example DirectAccessWithHoles.cpp \n
* \brief Use direct access to MOAB data to avoid calling through API \n
*
* This example creates a 1d row of quad elements, with a user-specified number of "holes" (missing quads) in the row:
- *
+ * \verbatim
* ---------------------- ---------------------- --------
* | | | | | | | | | |
* | | | |(hole)| | | |(hole)| | ...
* | | | | | | | | | |
* ---------------------- ---------------------- --------
- *
+ * \endverbatim
* This makes (nholes+1) contiguous runs of quad handles in the handle space
* This example shows how to use the xxx_iterate functions in MOAB (xxx = coords, connect, tag, adjacencies) to get
* direct pointer access to MOAB internal storage, which can be used without calling through the MOAB API.
diff --git a/itaps/imesh/CMakeLists.txt b/itaps/imesh/CMakeLists.txt
index a258e9f..5bba3f0 100644
--- a/itaps/imesh/CMakeLists.txt
+++ b/itaps/imesh/CMakeLists.txt
@@ -1,60 +1,61 @@
# Generate Fortran name mangling headers
-ADD_CUSTOM_COMMAND(
+ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/iMesh_protos.h
- COMMAND ${CMAKE_COMMAND}
- -Dinput_file:STRING=${CMAKE_CURRENT_SOURCE_DIR}/iMesh.h
- -Doutput_file:STRING=${CMAKE_CURRENT_BINARY_DIR}/iMesh_protos.h
- -Dprefix:STRING=iMesh
- -P ${CMAKE_SOURCE_DIR}/cmake/ITAPSFortranMangling.cmake
+ COMMAND ${CMAKE_COMMAND}
+ -Dinput_file:STRING=${CMAKE_CURRENT_SOURCE_DIR}/iMesh.h
+ -Doutput_file:STRING=${CMAKE_CURRENT_BINARY_DIR}/iMesh_protos.h
+ -Dprefix:STRING=iMesh
+ -P ${CMAKE_SOURCE_DIR}/config/ITAPSFortranMangling.cmake
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/iMesh.h
)
-ADD_CUSTOM_COMMAND(
+ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/iMesh_extensions_protos.h
- COMMAND ${CMAKE_COMMAND}
- -Dinput_file:STRING=${CMAKE_CURRENT_SOURCE_DIR}/iMesh_extensions.h
- -Doutput_file:STRING=${CMAKE_CURRENT_BINARY_DIR}/iMesh_extensions_protos.h
- -Dprefix:STRING=iMesh
- -P ${CMAKE_SOURCE_DIR}/cmake/ITAPSFortranMangling.cmake
+ COMMAND ${CMAKE_COMMAND}
+ -Dinput_file:STRING=${CMAKE_CURRENT_SOURCE_DIR}/iMesh_extensions.h
+ -Doutput_file:STRING=${CMAKE_CURRENT_BINARY_DIR}/iMesh_extensions_protos.h
+ -Dprefix:STRING=iMesh
+ -P ${CMAKE_SOURCE_DIR}/config/ITAPSFortranMangling.cmake
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/iMesh_extensions.h
)
-ADD_CUSTOM_COMMAND(
+ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/iMeshP_protos.h
- COMMAND ${CMAKE_COMMAND}
- -Dinput_file:STRING=${CMAKE_CURRENT_SOURCE_DIR}/iMeshP.h
- -Doutput_file:STRING=${CMAKE_CURRENT_BINARY_DIR}/iMeshP_protos.h
- -Dprefix:STRING=iMeshP
- -P ${CMAKE_SOURCE_DIR}/cmake/ITAPSFortranMangling.cmake
+ COMMAND ${CMAKE_COMMAND}
+ -Dinput_file:STRING=${CMAKE_CURRENT_SOURCE_DIR}/iMeshP.h
+ -Doutput_file:STRING=${CMAKE_CURRENT_BINARY_DIR}/iMeshP_protos.h
+ -Dprefix:STRING=iMeshP
+ -P ${CMAKE_SOURCE_DIR}/config/ITAPSFortranMangling.cmake
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/iMeshP.h
)
-set ( MOAB_IMESH_SRCS
+set ( MOAB_IMESH_SRCS
iMesh_MOAB.cpp
${CMAKE_CURRENT_BINARY_DIR}/iMesh_protos.h
${CMAKE_CURRENT_BINARY_DIR}/iMesh_extensions_protos.h
${CMAKE_CURRENT_BINARY_DIR}/iMeshP_protos.h )
+include_directories(
+ ${MOAB_SOURCE_DIR}/src
+ ${MOAB_SOURCE_DIR}/itaps
+ ${MOAB_SOURCE_DIR}/itaps/imesh
+ )
+
if ( MOAB_USE_MPI AND MPI_FOUND )
- LIST ( APPEND MOAB_IMESH_SRCS
+ LIST ( APPEND MOAB_IMESH_SRCS
iMeshP_MOAB.cpp
${CMAKE_CURRENT_BINARY_DIR}/iMeshP_protos.h )
+
+ include_directories(
+ ${MOAB_SOURCE_DIR}/src/parallel
+ )
endif ( MOAB_USE_MPI AND MPI_FOUND )
-
-
-include_directories( ${CMAKE_SOURCE_DIR}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_SOURCE_DIR}/parallel
- ${CMAKE_BINARY_DIR}/parallel
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}
- )
-
-
-set_source_files_properties(
- ${MOAB_IMESH_SRCS}
+
+set_source_files_properties( ${MOAB_IMESH_SRCS}
COMPILE_FLAGS "${MOAB_DEFINES}"
)
add_library( iMesh
${MOAB_IMESH_SRCS}
)
+
+target_link_libraries( iMesh MOAB )
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 65862a8..c5467e6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,6 +1,6 @@
# MOAB Library
- set ( MOAB_LIB_SRCS
+ set ( MOABCORE_LIB_SRCS
AdaptiveKDTree.cpp
AEntityFactory.cpp
AffineXform.cpp
@@ -31,7 +31,6 @@
PolyElementSeq.cpp
Range.cpp
RangeSeqIntersectIter.cpp
- ReaderWriterSet.cpp
ReadUtil.cpp
ScdElementData.cpp
ScdInterface.cpp
@@ -57,6 +56,13 @@
WriteUtil.cpp
)
+ set ( MOABPTLOC_LIB_SRCS
+ lotte/findpt.c
+ lotte/errmem.c
+ lotte/poly.c
+ lotte/tensor.c
+ )
+
set ( MOABIO_LIB_SRCS
io/IODebugTrack.cpp
io/ExoIIUtil.cpp
@@ -64,6 +70,7 @@
io/GmshUtil.cpp
io/ReadABAQUS.cpp
io/ReadGmsh.cpp
+ io/ReadGCRM.cpp
io/ReadIDEAS.cpp
io/ReadMCNP5.cpp
io/ReadNASTRAN.cpp
@@ -84,87 +91,61 @@
io/WriteSmf.cpp
io/WriteTemplate.cpp
io/WriteVtk.cpp
+ ReaderWriterSet.cpp
)
include_directories(
${MOAB_SOURCE_DIR}/src
${MOAB_SOURCE_DIR}/src/io
${MOAB_SOURCE_DIR}/src/parallel
+ ${MOAB_SOURCE_DIR}/src/moab/point_locater/lotte
)
- if ( MOAB_USE_MPI )
- find_package( MPI )
- # 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" )
- include_directories(
- ${MPI_INCLUDE_PATH}
- ${MOAB_SOURCE_DIR}/parallel
- )
- endif ( MPI_FOUND )
- endif ( MOAB_USE_MPI )
+ if ( NetCDF_FOUND )
+ set ( MOAB_DEFINES "${MOAB_DEFINES} -DNETCDF_FILE" )
+ set ( MOABIO_LIB_SRCS
+ ${MOABIO_LIB_SRCS}
+ io/ReadNC.cpp
+ io/ReadNCDF.cpp
+ io/WriteNCDF.cpp
+ io/WriteSLAC.cpp
+ io/NCHelper.cpp
+ io/NCHelperEuler.cpp
+ io/NCHelperFV.cpp
+ io/NCHelperHOMME.cpp
+ SpectralMeshTool.cpp
+ )
+ include_directories(
+ ${NetCDF_INCLUDE_DIRECTORIES}
+ )
+ endif ( NetCDF_FOUND )
+
+ if ( HDF5_FOUND )
+ set ( MOAB_DEFINES "${MOAB_DEFINES} -DHDF5_FILE" )
+ check_function_exists( H5Pset_fapl_mpio MOAB_HDF_HAVE_PARALLEL )
+ set ( MOABIO_LIB_SRCS
+ ${MOABIO_LIB_SRCS}
+ io/HDF5Common.cpp
+ io/ReadHDF5.cpp
+ io/ReadHDF5Dataset.cpp
+ io/ReadHDF5VarLen.cpp
+ io/WriteHDF5.cpp
+ )
+
+ include_directories(
+ ${HDF5_INCLUDE_DIRECTORIES}
+ io/mhdf/include
+ )
+ add_subdirectory( io/mhdf )
+ endif ( HDF5_FOUND )
+
+
+ SET(MOAB_LIB_SRCS ${MOABCORE_LIB_SRCS} ${MOABPTLOC_LIB_SRCS} ${MOABIO_LIB_SRCS})
set_source_files_properties( ${MOAB_LIB_SRCS}
COMPILE_FLAGS "-DIS_BUILDING_MB ${MOAB_DEFINES}"
)
-
-# target_link_libraries( MOAB moabio )
- if ( MOAB_USE_NETCDF )
- find_package( NetCDF )
- if ( NetCDF_FOUND )
- set ( MOAB_DEFINES "${MOAB_DEFINES} -DNETCDF_FILE" )
- set ( MOABIO_LIB_SRCS
- ${MOABIO_LIB_SRCS}
- io/ReadNCDF.cpp
- io/WriteNCDF.cpp
- io/WriteSLAC.cpp
- )
- include_directories(
- ${NetCDF_INCLUDE_DIRECTORIES}
- )
- endif ( NetCDF_FOUND )
- endif ( MOAB_USE_NETCDF )
-
- if ( MOAB_USE_HDF )
- # HDF5
- find_package( HDF5 )
- if ( HDF5_FOUND )
- set ( MOAB_DEFINES "${MOAB_DEFINES} -DHDF5_FILE" )
- check_function_exists( H5Pset_fapl_mpio MOAB_HDF_HAVE_PARALLEL )
- set ( MOABIO_LIB_SRCS
- ${MOABIO_LIB_SRCS}
- io/HDF5Common.cpp
- io/ReadHDF5.cpp
- io/ReadHDF5Dataset.cpp
- io/ReadHDF5VarLen.cpp
- io/WriteHDF5.cpp
- )
-
-# if ( MOAB_USE_MPI AND MPI_FOUND )
-# set ( MOABIO_LIB_SRCS
-# ${MOABIO_LIB_SRCS}
-# src/parallel/WriteHDF5Parallel.cpp
-# )
-# endif (MOAB_USE_MPI AND MPI_FOUND)
-
- include_directories(
- ${HDF5_INCLUDE_DIRECTORIES}
- io/mhdf/include
- )
- add_subdirectory( io/mhdf )
- endif ( HDF5_FOUND )
- endif ( MOAB_USE_HDF )
-
- set_source_files_properties( ${MOABIO_LIB_SRCS}
- COMPILE_FLAGS "-DIS_BUILDING_MB ${MOAB_DEFINES}"
- )
-
add_library( MOAB
${MOAB_LIB_SRCS}
- ${MOABIO_LIB_SRCS}
)
if ( MOAB_USE_NETCDF AND NetCDF_FOUND )
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 3b1d28d..e6c2d94 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -43,9 +43,9 @@
if ( MOAB_USE_MPI AND MPI_FOUND )
- add_executable ( mbparallelcomm_test mbparallelcomm_test.cpp )
+ add_executable ( mbparallelcomm_test parallel/mbparallelcomm_test.cpp )
target_link_libraries( mbparallelcomm_test MOAB )
- set_source_files_properties( mbparallelcomm_test.cpp
+ set_source_files_properties( parallel/mbparallelcomm_test.cpp
COMPILE_FLAGS "-DIS_BUILDING_MB ${MOAB_DEFINES}" )
add_test( TestParallelComm-BcastDelete
${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS}
@@ -61,19 +61,22 @@ if ( MOAB_USE_MPI AND MPI_FOUND )
${EXECUTABLE_OUTPUT_PATH}/mbparallelcomm_test ${MPIEXEC_POSTFLAGS} -3 ${MOAB_SOURCE_DIR}/parallel/ptest.cub )
if ( MOAB_USE_HDF )
- add_executable( mhdf_parallel mhdf_parallel.c )
+ add_executable( mhdf_parallel parallel/mhdf_parallel.c )
+ include_directories(
+ ${MOAB_SOURCE_DIR}/src/io/mhdf/include
+ )
target_link_libraries( mhdf_parallel MOAB MOABpar mhdf )
add_test( TestMHDFParallel ${EXECUTABLE_OUTPUT_PATH}/mhdf_parallel )
- set_source_files_properties( mhdf_parallel.c
+ set_source_files_properties( parallel/mhdf_parallel.c
COMPILE_FLAGS "-DIS_BUILDING_MB ${MOAB_DEFINES}" )
endif ( MOAB_USE_HDF )
- add_executable ( parallel_unit_tests parallel_unit_tests.cpp )
+ add_executable ( parallel_unit_tests parallel/parallel_unit_tests.cpp )
target_link_libraries( parallel_unit_tests MOAB )
add_test( TestParallel
${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS}
${EXECUTABLE_OUTPUT_PATH}/parallel_unit_tests ${MPIEXEC_POSTFLAGS} ${MOAB_SOURCE_DIR}/parallel/ptest.cub )
- set_source_files_properties( parallel_unit_tests.cpp
+ set_source_files_properties( parallel/parallel_unit_tests.cpp
COMPILE_FLAGS "-DIS_BUILDING_MB ${MOAB_DEFINES}" )
endif ( MOAB_USE_MPI AND MPI_FOUND )
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 1f30dcf..56e115c 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -1,4 +1,4 @@
-
+
# Documentation
# Optional tools
option ( MOAB_BUILD_MBCONVERT "Build the MOAB mesh converter tool?" ON )
@@ -17,8 +17,8 @@
if ( MOAB_USE_MPI AND MPI_FOUND )
add_subdirectory( refiner )
- include_directories( ${MOAB_SOURCE_DIR}/refiner )
- target_link_libraries( MOAB MOABrefiner )
+# include_directories( ${MOAB_SOURCE_DIR}/refiner )
+# target_link_libraries( MOAB MOABrefiner )
endif ( MOAB_USE_MPI AND MPI_FOUND )
@@ -37,5 +37,6 @@
# MBCoupler
if ( MOAB_USE_MPI AND MPI_FOUND AND MOAB_BUILD_MBCOUPLER )
+# if ( MOAB_BUILD_MBCOUPLER )
add_subdirectory( mbcoupler )
endif ( MOAB_USE_MPI AND MPI_FOUND AND MOAB_BUILD_MBCOUPLER )
diff --git a/tools/mbcoupler/CMakeLists.txt b/tools/mbcoupler/CMakeLists.txt
index 93e97d1..9c4279d 100644
--- a/tools/mbcoupler/CMakeLists.txt
+++ b/tools/mbcoupler/CMakeLists.txt
@@ -1,26 +1,29 @@
include_directories(
- ${CMAKE_CURRENT_SOURCE_DIRECTORY}
+ ${MOAB_SOURCE_DIR}/src
+ ${MOAB_SOURCE_DIR}/src/parallel
+ ${MOAB_SOURCE_DIR}/src/moab/point_locater/lotte
+ ${MOAB_SOURCE_DIR}/itaps
+ ${MOAB_SOURCE_DIR}/itaps/imesh
+ ${MOAB_SOURCE_DIR}/tools/mbcoupler
)
set( MBCOUPLER_SRCS
Coupler.cpp
ElemUtil.cpp
- errmem.cpp
- findpt.c
- poly.c
- tensor.c
+)
+
+set_source_files_properties( ${MBCOUPLER_SRCS}
+ COMPILE_FLAGS "${MOAB_DEFINES}"
)
add_library( mbcoupler
${MBCOUPLER_SRCS}
)
-target_link_libraries( mbcoupler MOAB )
+
+target_link_libraries( mbcoupler MOAB iMesh )
if ( MOAB_USE_MPI )
target_link_libraries( mbcoupler MOABpar )
endif ( MOAB_USE_MPI )
-set_source_files_properties( ${MBCOUPLER_SRCS}
- COMPILE_FLAGS "${MOAB_DEFINES}"
-)
enable_testing()
@@ -39,4 +42,10 @@ if ( MOAB_USE_MPI )
COMPILE_FLAGS "${MOAB_DEFINES}" )
target_link_libraries( mbcoupler_test mbcoupler MOAB MOABpar )
add_test( TestMBCoupler ${EXECUTABLE_OUTPUT_PATH}/mbcoupler_test )
+
+ add_executable( ssn_test ssn_test.cpp )
+ set_source_files_properties( ssn_test.cpp
+ COMPILE_FLAGS "${MOAB_DEFINES}" )
+ target_link_libraries( ssn_test mbcoupler MOAB MOABpar )
+ add_test( TestMBCoupler ${EXECUTABLE_OUTPUT_PATH}/ssn_test )
endif ( MOAB_USE_MPI )
diff --git a/tools/refiner/CMakeLists.txt b/tools/refiner/CMakeLists.txt
index 5c41c27..230b34c 100644
--- a/tools/refiner/CMakeLists.txt
+++ b/tools/refiner/CMakeLists.txt
@@ -1,4 +1,4 @@
-set ( MOAB_REFINER_SRCS
+set ( MOAB_REFINER_SRCS
EdgeSizeEvaluator.cpp
EdgeSizeSimpleImplicit.cpp
EntityRefiner.cpp
@@ -11,6 +11,11 @@ set ( MOAB_REFINER_SRCS
SplitVertices.cpp
)
+include_directories(
+ ${MOAB_SOURCE_DIR}/src
+ ${MOAB_SOURCE_DIR}/src/parallel
+)
+
set_source_files_properties(
${MOAB_REFINER_SRCS}
COMPILE_FLAGS "${MOAB_DEFINES}"
@@ -19,6 +24,10 @@ set_source_files_properties(
add_library( MOABrefiner
${MOAB_REFINER_SRCS}
)
+target_link_libraries( MOABrefiner MOAB )
+if ( MOAB_USE_MPI )
+ target_link_libraries( MOABrefiner MOABpar )
+endif ( MOAB_USE_MPI )
enable_testing()
@@ -26,6 +35,7 @@ add_executable( test_mesh_refiner test_mesh_refiner.cpp )
set_source_files_properties( test_mesh_refiner.cpp
COMPILE_FLAGS "-DTEST ${MOAB_DEFINES}" )
target_link_libraries( test_mesh_refiner MOAB MOABrefiner )
+
add_test( TestMeshRefiner
${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4 ${MPIEXEC_PREFLAGS}
${EXECUTABLE_OUTPUT_PATH}/test_mesh_refiner ${MPIEXEC_POSTFLAGS}
Repository URL: https://bitbucket.org/fathomteam/moab/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the moab-dev
mailing list