added: conditionally compile elasticity code

only compiled with dune-istl >= 2.3
This commit is contained in:
Arne Morten Kvarving 2014-06-03 14:44:58 +02:00
parent cc82e9a4bd
commit 9edfe8a8e3
4 changed files with 53 additions and 37 deletions

View File

@ -61,6 +61,50 @@ endmacro (prereqs_hook)
macro (sources_hook)
endmacro (sources_hook)
macro (files_hook)
find_dune_version ("dune" "istl")
if((DUNE_ISTL_VERSION_MAJOR GREATER 2) OR
(DUNE_ISTL_VERSION_MAJOR EQUAL 2 AND DUNE_ISTL_VERSION_MINOR GREATER 2))
list (APPEND MAIN_SOURCE_FILES
opm/elasticity/boundarygrid.cpp
opm/elasticity/elasticity_preconditioners.cpp
opm/elasticity/material.cpp
opm/elasticity/materials.cpp
opm/elasticity/matrixops.cpp
opm/elasticity/meshcolorizer.cpp
opm/elasticity/mpc.cpp
)
list(APPEND PROGRAM_SOURCE_FILES examples/upscale_elasticity.cpp)
list (APPEND EXAMPLE_SOURCE_FILES examples/upscale_elasticity.cpp)
list (APPEND TEST_DATA_FILES
tests/input_data/reference_solutions/upscale_elasticity_mpc_EightCells.txt
tests/input_data/reference_solutions/upscale_elasticity_mortar_EightCells.txt
)
list (APPEND PUBLIC_HEADER_FILES
opm/elasticity/applier.hpp
opm/elasticity/asmhandler.hpp
opm/elasticity/asmhandler_impl.hpp
opm/elasticity/boundarygrid.hh
opm/elasticity/elasticity.hpp
opm/elasticity/elasticity_impl.hpp
opm/elasticity/elasticity_preconditioners.hpp
opm/elasticity/elasticity_upscale.hpp
opm/elasticity/elasticity_upscale_impl.hpp
opm/elasticity/logutils.hpp
opm/elasticity/material.hh
opm/elasticity/materials.hh
opm/elasticity/matrixops.hpp
opm/elasticity/mortar_evaluator.hpp
opm/elasticity/mortar_schur.hpp
opm/elasticity/mortar_schur_precond.hpp
opm/elasticity/mortar_utils.hpp
opm/elasticity/mpc.hh
opm/elasticity/shapefunctions.hpp
opm/elasticity/uzawa_solver.hpp
)
endif()
endmacro (files_hook)
macro (fortran_hook)
# interface requires a variable to inspect, a value won't suffice
set (UNCONDITIONALLY TRUE)

View File

@ -26,18 +26,6 @@
# ATTIC_FILES Unmaintained files. This for the projects developers
# only. Don't expect these files to build.
# originally generated with the command:
# find opm -name '*.c*' -printf '\t%p\n' | sort
list (APPEND MAIN_SOURCE_FILES
opm/elasticity/boundarygrid.cpp
opm/elasticity/elasticity_preconditioners.cpp
opm/elasticity/material.cpp
opm/elasticity/materials.cpp
opm/elasticity/matrixops.cpp
opm/elasticity/meshcolorizer.cpp
opm/elasticity/mpc.cpp
)
# originally generated with the command:
# find tests -name '*.cpp' -a ! -wholename '*/not-unit/*' -printf '\t%p\n' | sort
list (APPEND TEST_SOURCE_FILES
@ -72,7 +60,6 @@ list (APPEND EXAMPLE_SOURCE_FILES
examples/upscale_avg.cpp
examples/upscale_cap.cpp
examples/upscale_cond.cpp
examples/upscale_elasticity.cpp
examples/upscale_perm.cpp
examples/upscale_relperm.cpp
examples/upscale_relpermvisc.cpp
@ -102,7 +89,6 @@ list (APPEND PROGRAM_SOURCE_FILES
examples/upscale_avg.cpp
examples/upscale_cap.cpp
examples/upscale_cond.cpp
examples/upscale_elasticity.cpp
examples/upscale_perm.cpp
examples/upscale_relperm.cpp
examples/upscale_relpermvisc.cpp
@ -113,26 +99,6 @@ list (APPEND PROGRAM_SOURCE_FILES
# originally generated with the command:
# find opm -name '*.h*' -a ! -name '*-pch.hpp' -printf '\t%p\n' | sort
list (APPEND PUBLIC_HEADER_FILES
opm/elasticity/applier.hpp
opm/elasticity/asmhandler.hpp
opm/elasticity/asmhandler_impl.hpp
opm/elasticity/boundarygrid.hh
opm/elasticity/elasticity.hpp
opm/elasticity/elasticity_impl.hpp
opm/elasticity/elasticity_preconditioners.hpp
opm/elasticity/elasticity_upscale.hpp
opm/elasticity/elasticity_upscale_impl.hpp
opm/elasticity/logutils.hpp
opm/elasticity/material.hh
opm/elasticity/materials.hh
opm/elasticity/matrixops.hpp
opm/elasticity/mortar_evaluator.hpp
opm/elasticity/mortar_schur.hpp
opm/elasticity/mortar_schur_precond.hpp
opm/elasticity/mortar_utils.hpp
opm/elasticity/mpc.hh
opm/elasticity/shapefunctions.hpp
opm/elasticity/uzawa_solver.hpp
opm/upscaling/ParserAdditions.hpp
opm/upscaling/SinglePhaseUpscaler.hpp
opm/upscaling/SteadyStateUpscaler.hpp

View File

@ -95,7 +95,6 @@ endmacro (add_test_upscale_elasticity gridname method rows)
# (the "tests" target is setup in OpmLibMain.cmake)
add_dependencies (tests upscale_perm)
add_dependencies (tests compare_upscaling_results)
add_dependencies (tests upscale_elasticity)
# Add tests for different models
add_test_upscale_perm(PeriodicTilted p 3)
@ -104,5 +103,9 @@ add_test_upscale_perm(27cellsIso flp 9)
add_test_upscale_perm(EightCells fl 6)
add_test_upscale_perm(Hummocky flp 9)
add_test_upscale_elasticity(EightCells mpc)
add_test_upscale_elasticity(EightCells mortar)
if((DUNE_ISTL_VERSION_MAJOR GREATER 2) OR
(DUNE_ISTL_VERSION_MAJOR EQUAL 2 AND DUNE_ISTL_VERSION_MINOR GREATER 2))
add_dependencies (tests upscale_elasticity)
add_test_upscale_elasticity(EightCells mpc)
add_test_upscale_elasticity(EightCells mortar)
endif()

View File

@ -108,6 +108,9 @@ include (UseDynamicBoost)
# needed for Debian installation scheme
include (UseMultiArch)
# Run conditional file hook
files_hook()
# this module contains code to figure out which files is where
include (OpmFiles)
opm_auto_dirs ()