Skip to content
Snippets Groups Projects
Commit 9823b464 authored by Stefan Girke's avatar Stefan Girke
Browse files

new test structure to make "make test" work correctly

parent 483c20e9
No related branches found
No related tags found
No related merge requests found
Showing
with 33 additions and 27 deletions
......@@ -22,5 +22,9 @@ include(DuneMPI)
#add sub directories
dune_add_subdirs( dune m4 lib doc cmake/modules )
#add fem-dg test, i.e. tests which are not included in a directory called "test"
#set( _dirnew dune/fem-dg/examples/advdiff_test )
#set_property(DIRECTORY ${_dirnew} PROPERTY TEST_INCLUDE_FILE ${CMAKE_BINARY_DIR}/${_dirnew}/BuildTests.cmake)
# finalize the dune project, e.g., generate config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
set(SUBDIRS fem-dg)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
foreach(i ${SUBDIRS})
if(${i} STREQUAL "test")
set(opt EXCLUDE_FROM_ALL)
endif(${i} STREQUAL "test")
add_subdirectory(${i} ${opt})
unset(opt)
endforeach(i ${SUBDIRS})
dune_add_subdirs(fem-dg)
dune_add_subdirs( algorithm assemble main misc models operator pass solver test)
dune_add_subdirs( algorithm assemble main misc models operator pass solver examples)
SUBDIRS = dataio advdiff euler navierstokes poisson stokes
include $(top_srcdir)/am/global-rules
testdir = $(includedir)/dune/fem-dg/test
......
dune_install( main.cc models.hh problemcreator.hh problems.hh)
dune_add_subdirs( test )
dune_install( models.hh problemcreator.hh steppertraits.hh)
include_directories("${CMAKE_SOURCE_DIR}/dune/fem-dg/test/advdiff/")
include_directories("${CMAKE_SOURCE_DIR}/dune/fem-dg/examples/advdiff/")
if(GENERATE_FEMDG_PARAMETER_FILE)
configure_file(parameter.in ${CMAKE_CURRENT_BINARY_DIR}/parameter)
endif()
......@@ -8,23 +6,22 @@ endif()
add_definitions( "-DYASPGRID" )
add_definitions( "-DGRIDDIM=2" )
add_definitions( "-DDIMRANGE=1" )
add_definitions( "-DFLUX=1" )
add_definitions( "-DPRIMALDG" )
if( DUNE_FEM_DG_VERSION VERSION_LESS "2.4.1" )
message( STATUS "Using old test build system (2.4 compability mode) " )
add_executable( advdiff main.cc )
add_executable( advdiffall main.cc )
set_property(TARGET advdiffall APPEND PROPERTY
add_executable( advdiff ../main.cc )
add_executable( advdiffall ../main.cc )
set_property(TARGET advdiff APPEND PROPERTY
COMPILE_DEFINITIONS "POLORDER=2" )
dune_target_enable_all_packages( advdiff advdiffall )
dune_add_test( advdiff advdiffall )
else()
dune_add_test( NAME advdiff
SOURCES main.cc
SOURCES ../main.cc
COMPILE_DEFINITIONS POLORDER=2 )
dune_add_test( NAME advdiffall
SOURCES main.cc )
SOURCES ../main.cc )
endif()
add_code_generate_targets( advdiff advdiffall )
......@@ -2,7 +2,7 @@
# (-1: off, p: process p is verbose, in general 0 is a good choice)
fem.verboserank: 0
fem.prefix: /home/stefan/dune-super-fem-blood/dune-fem-dg/dune/fem-dg/test/euler/data # specify directory for data output (is created if not exists)
fem.prefix.input: /home/stefan/dune-super-fem-blood/dune-fem-dg/dune/fem-dg/test/euler
fem.prefix: ${CMAKE_CURRENT_SOURCE_DIR}/data_nonlinear # specify directory for data output (is created if not exists)
fem.prefix.input: ${CMAKE_CURRENT_SOURCE_DIR}/parameter_nonlinear
paramfile: parameter_cmake
......@@ -15,7 +15,7 @@ gridsol.filename: heat-checkpoint
# GENERAL
#--------
paramfile: ../parameter/paramBase
paramfile: ../../parameter/paramBase
# PROBLEM SETUP
......@@ -37,13 +37,13 @@ zvelocity: 0. # the only advection part for the linear heat eqn
# DOMAIN
#-------
fem.io.macroGridFile_1d: ../grids/unitcube1.dgf
fem.io.macroGridFile_2d: ../grids/unitcube2.dgf
fem.io.macroGridFile_3d: ../grids/unitcube3.dgf
fem.io.macroGridFile_1d: ../../grids/unitcube1.dgf
fem.io.macroGridFile_2d: ../../grids/unitcube2.dgf
fem.io.macroGridFile_3d: ../../grids/unitcube3.dgf
# SOLVER
#-------
dgdiffusionflux.upwind: -1 -0.001
femdg.stepper.maxtimestep: 0.5
paramfile: ../parameter/paramSolver
paramfile: ../../parameter/paramSolver
dune_install( checkedcheckpointhandler.hh checkpointing.hh models.hh problemcreator.hh problem.hh )
dune_add_subdirs( test )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment