mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Linking to the MOAB/DAGMC libraries.
This commit is contained in:
parent
fd7368e1bd
commit
bc3a092836
2 changed files with 18 additions and 2 deletions
|
|
@ -9,6 +9,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|||
# Set module path
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
|
||||
|
||||
# Make sure Fortran module directory is included when building
|
||||
include_directories(${CMAKE_BINARY_DIR}/include)
|
||||
#===============================================================================
|
||||
# Command line options
|
||||
#===============================================================================
|
||||
|
|
@ -394,6 +396,8 @@ add_library(libopenmc SHARED
|
|||
src/tallies/tally_header.F90
|
||||
src/tallies/trigger.F90
|
||||
src/tallies/trigger_header.F90
|
||||
src/cad.h
|
||||
src/cad.cpp
|
||||
src/cell.cpp
|
||||
src/cmfd_execute.cpp
|
||||
src/distribution.cpp
|
||||
|
|
@ -490,7 +494,7 @@ target_link_libraries(libopenmc ${ldflags} ${HDF5_LIBRARIES} pugixml
|
|||
|
||||
add_executable(openmc src/main.cpp)
|
||||
target_compile_options(openmc PRIVATE ${cxxflags})
|
||||
target_link_libraries(openmc libopenmc)
|
||||
target_link_libraries(openmc ${ldflags} libopenmc ${DAGMC_LINK_LIBS})
|
||||
|
||||
#===============================================================================
|
||||
# Python package
|
||||
|
|
|
|||
14
src/cad.cpp
14
src/cad.cpp
|
|
@ -1,5 +1,17 @@
|
|||
|
||||
#include "cad.h"
|
||||
|
||||
moab::DagMC* DAGMC;
|
||||
|
||||
namespace moab {
|
||||
|
||||
DagMC* DAGMC;
|
||||
|
||||
void load_geometry() {
|
||||
if(!DAGMC) { DAGMC = new DagMC(); }
|
||||
|
||||
ErrorCode rval;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue