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

[cmake] added CMakeLists.txt

Conflicts:
	dune/fem-dg/main/main_pol.cc
parent 94317b52
No related branches found
No related tags found
No related merge requests found
/* begin dune-fem */
/* begin dune-fem-dg */
/* Define to the version of dune-fem */
/* Define to the version of dune-fem-dg */
#define DUNE_FEM_DG_VERSION "${DUNE_FEM_DG_VERSION}"
/* Define to the major version of dune-fem */
/* Define to the major version of dune-fem-dg */
#define DUNE_FEM_DG_VERSION_MAJOR ${DUNE_FEM_DG_VERSION_MAJOR}
/* Define to the minor version of dune-fem */
/* Define to the minor version of dune-fem-dg */
#define DUNE_FEM_DG_VERSION_MINOR ${DUNE_FEM_DG_VERSION_MINOR}
/* Define to the revision of dune-fem */
/* Define to the revision of dune-fem-dg */
#define DUNE_FEM_DG_VERSION_REVISION ${DUNE_FEM_DG_VERSION_REVISION}
/* Define if BGQ_L!PREFETCH found */
#cmakedefine HAVE_BGQ_L1PREFETCH 1
/* end dune-fem */
/* end dune-fem-dg */
......@@ -10,10 +10,10 @@
#define DUNE_DEVEL_MODE
#endif
// -1 means higher order FV
#if POLORDER == -1
#define HIGHER_ORDER_FV
#undef POLORDER
// -1 means higher order FV
#if POLORDER == -1
#define HIGHER_ORDER_FV
#undef POLORDER
#define POLORDER 0
#endif
......@@ -25,11 +25,11 @@
#include "main.hh"
#include <dune/fem-dg/pass/threadhandle.hh>
#if defined USE_SMP_PARALLEL
#if defined USE_SMP_PARALLEL
#include <dune/fem/misc/threads/threadmanager.hh>
#include <dune/fem-dg/pass/threadpass.hh>
#if HAVE_DUNE_FEM_DG
#if HAVE_DUNE_FEM_DG
#define NSMOD_USE_SMP_PARALLEL
#endif
#endif
......@@ -62,31 +62,31 @@
#if POLORDER == 0
#define LOOPSPACE DG_P0
#elif POLORDER == 1
#define LOOPSPACE DG_P1
#elif POLORDER == 2
#define LOOPSPACE DG_P2
#elif POLORDER == 3
#define LOOPSPACE DG_P3
#elif POLORDER == 4
#define LOOPSPACE DG_P4
#elif POLORDER == 5
#define LOOPSPACE DG_P5
#elif POLORDER == 6
#define LOOPSPACE DG_P6
#elif POLORDER == 7
#define LOOPSPACE DG_P7
#elif POLORDER == 8
#define LOOPSPACE DG_P8
#elif POLORDER == 1
#define LOOPSPACE DG_P1
#elif POLORDER == 2
#define LOOPSPACE DG_P2
#elif POLORDER == 3
#define LOOPSPACE DG_P3
#elif POLORDER == 4
#define LOOPSPACE DG_P4
#elif POLORDER == 5
#define LOOPSPACE DG_P5
#elif POLORDER == 6
#define LOOPSPACE DG_P6
#elif POLORDER == 7
#define LOOPSPACE DG_P7
#elif POLORDER == 8
#define LOOPSPACE DG_P8
#endif
namespace LOOPSPACE {
namespace LOOPSPACE {
struct FlopStartObject
{
FlopStartObject()
FlopStartObject()
{
// initialize counters for master thread before all others
// initialize counters for master thread before all others
runThread() ;
}
void runThread() const
......@@ -110,8 +110,8 @@ namespace LOOPSPACE {
const bool countFlops = Dune::Fem::Parameter::getValue< bool >("femdg.flopcounter", false );
// if flop count is enabled count floating point operations (PAPI needed)
// start flop counters for all threads
if( countFlops )
// start flop counters for all threads
if( countFlops )
{
FlopStartObject startObj ;
Dune::Fem::ThreadHandle::run( startObj );
......@@ -157,6 +157,6 @@ namespace LOOPSPACE {
// print results
Dune::Fem::FlopCounter::print( std::cout );
}
}
}
} // end namespace LOOPSPACE
# install these headers
set(advdiffdir ${CMAKE_INSTALL_INCLUDEDIR}/test/advdiff)
set(advdiff_HEADERS models.hh problemcreator.hh steppertraits.hh)
set(LDADD ${ALL_PKG_LDFLAGS} ${ALL_PKG_LIBS} ${LOCAL_LIBS} ${DUNEMPILDFLAGS} ${DUNEMPILIBS})
set(advdiff_HEADERS models.hh
problemcreator.hh
steppertraits.hh)
#set(LDADD ${ALL_PKG_LDFLAGS} ${ALL_PKG_LIBS} ${LOCAL_LIBS} ${DUNEMPILDFLAGS} ${DUNEMPILIBS})
set(BASEDIR ../../main)
#GRIDTYPE = ALUGRID_SIMPLEX
#GRIDTYPE = YASPGRID
#GRIDTYPE=PARALLELGRID_ALUGRID_SIMPLEX
#GRIDTYPE=CARTESIANGRID_ALUGRID_CUBE
set(GRIDTYPE SPGRID)
set(GRIDTYPE YASPGRID)
set(POLORDER 2)
set(GRIDDIM 2)
set(DIMRANGE 1)
install(FILES ${advdiff_HEADERS} DESTINATION ${advdiffdir})
\ No newline at end of file
set(FLUX 1) #2
set(TESTS advdiff
advdiffonep)
add_definitions( "-D${GRIDTYPE}" )
add_definitions( "-DGRIDDIM=${GRIDDIM}" )
add_definitions( "-DDIMRANGE=${DIMRANGE}" )
add_definitions( "-DFLUX=${FLUX}" )
add_definitions( "-DPRIMALDG" )
add_definitions( "-DUSE_ASSERT_THROW" )
include_directories("${CMAKE_SOURCE_DIR}/dune/fem-dg/test/advdiff")
add_executable( advdiff ${BASEDIR}/main.cc ${BASEDIR}/main_0.cc ${BASEDIR}/main_1.cc ${BASEDIR}/main_2.cc ${BASEDIR}/main_3.cc )
dune_target_link_libraries(advdiff ${DUNE_LIBS})
add_executable( advdiffonep ${BASEDIR}/main.cc ${BASEDIR}/main_0.cc ${BASEDIR}/main_1.cc )
dune_target_link_libraries(advdiffonep ${DUNE_LIBS})
set_property(TARGET advdiffonep APPEND PROPERTY
COMPILE_DEFINITIONS "ONLY_ONE_P;POLORDER=${POLORDER}")
# We do not want want to build the tests during make all
# but just build them on demand
install(FILES ${advdiff_HEADERS} DESTINATION ${advdiffdir})
foreach(i ${TESTS})
add_test(${i} ${i})
endforeach(i ${TESTS})
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${TESTS} ${COMPILE_XFAIL_TESTS})
# install these headers
set(eulerdir ${CMAKE_INSTALL_INCLUDEDIR}/dune/fem-dg/test/euler)
set(euler_HEADERS eulermodel.hh problems.hh problemcreator.hh
chorjo.hh chorjo.cc passtraits.hh)
set(LDADD ${ALL_PKG_LDFLAGS} ${ALL_PKG_LIBS} ${LOCAL_LIBS} ${DUNEMPILDFLAGS} ${DUNEMPILIBS})
set(euler_HEADERS eulermodel.hh
problems.hh
problemcreator.hh
chorjo.hh
chorjo.cc
passtraits.hh)
set(BASEDIR ../../main)
# helper variables
set(SOURCEBASE ${BASEDIR}/main.cc chorjo.cc)
set(SOURCES ${SOURCEBASE} ${BASEDIR}/main_0.cc ${BASEDIR}/main_1.cc
${BASEDIR}/main_2.cc ${BASEDIR}/main_3.cc)
set(SOURCES12 ${SOURCEBASE} ${BASEDIR}/main_1.cc ${BASEDIR}/main_2.cc)
set(SOURCEONEP ${SOURCEBASE} ${BASEDIR}/main_pol.cc)
# INFO FLUX
# set FLUX to 1 for LLF
# set FLUX to 2 for HLL (not tested!)
# INFO TRACK LIFTING:
# define LOCALDEBUG to calculate \sum_e\int_Omega(r_e*l_e) and
# \sum_e\int_Omega(r_e*l_e). They will be output to std::cout from the Stepper
# INFO LIMITER
# define LIMITER to apply limiting of the numerical solution (not tested!)
# INFO WELL-BALANCING
# define WELLBALANCE to apply well-balance of the numerical solution (not tested!)
# INFO DIFFFLUXTYPE
# define PRIMALDG to use the BR2, IP, CDG, CDG2, BO methods
# define DUALDG to use the LDG method
#GRIDTYPE = ALUGRID_CONFORM
#GRIDTYPE = ALUGRID_SIMPLEX
#GRIDTYPE = ALBERTAGRID
#GRIDTYPE = YASPGRID
#GRIDTYPE = SPGRID
set(GRIDTYPE ALUGRID_CUBE)
set(GRIDTYPE YASPGRID)
set(GRIDDIM 2)
install(FILES ${euler_HEADERS} DESTINATION ${eulerdir})
\ No newline at end of file
set(FLUX 1)
set(DIFFFLUXTYPE PRIMALDG)
set(TESTS euler
euler12
euleronep)
add_definitions( "-D${GRIDTYPE}" )
add_definitions( "-DGRIDDIM=${GRIDDIM}" )
add_definitions( "-DFLUX=${FLUX}" )
add_definitions( "-D${DIFFFLUXTYPE}" )
add_definitions( "-DWANT_CACHED_COMM_MANAGER=0" )
include_directories("${CMAKE_SOURCE_DIR}/dune/fem-dg/test/euler")
add_executable( euler ${BASEDIR}/main.cc ${BASEDIR}/main_0.cc ${BASEDIR}/main_1.cc ${BASEDIR}/main_2.cc ${BASEDIR}/main_3.cc )
dune_target_link_libraries(euler ${DUNE_LIBS})
set_property(TARGET euler APPEND PROPERTY
COMPILE_DEFINITIONS "LIMITER")
add_executable( euler12 ${BASEDIR}/main.cc ${BASEDIR}/main_0.cc ${BASEDIR}/main_1.cc )
dune_target_link_libraries(euler12 ${DUNE_LIBS})
set_property(TARGET euler12 APPEND PROPERTY
COMPILE_DEFINITIONS "ONLY_P1_P2")
add_executable( euleronep ${BASEDIR}/main_pol.cc )
dune_target_link_libraries(euleronep ${DUNE_LIBS})
set_property(TARGET euleronep APPEND PROPERTY
COMPILE_DEFINITIONS "ONLY_ONE_P;POLORDER=${POLORDER}")
# We do not want want to build the tests during make all
# but just build them on demand
install(FILES ${euler_HEADERS} DESTINATION ${eulerdir})
foreach(i ${TESTS})
add_dune_alugrid_flags(${i})
add_test(${i} ${i})
endforeach(i ${TESTS})
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${TESTS} ${COMPILE_XFAIL_TESTS})
# install these headers
set(nseqdir ${CMAKE_INSTALL_INCLUDEDIR}/dune/fem-dg/test/navierstokes)
set(nseq_HEADERS ns_model.hh problemcreator.hh nswaves.hh
ns_model_spec.hh nssmooth.hh thermodynamics.hh passtraits.hh)
#USE_OMP=-fopenmp
#USE_OMP=-DUSE_PTHREADS=1
set(LDADD ${ALL_PKG_LDFLAGS} ${ALL_PKG_LIBS} ${LOCAL_LIBS} ${DUNEMPILDFLAGS} ${DUNEMPILIBS})
set(nseq_HEADERS ns_model.hh
problemcreator.hh
nswaves.hh
ns_model_spec.hh
nssmooth.hh
thermodynamics.hh
passtraits.hh)
set(BASEDIR ../../main)
set(SOURCESONEP ${BASEDIR}/main.cc ${BASEDIR}/main_pol.cc)
set(SOURCES ${BASEDIR}/main.cc ${BASEDIR}/main_0.cc ${BASEDIR}/main_1.cc
${BASEDIR}/main_2.cc ${BASEDIR}/main_3.cc ${BASEDIR}/main_4.cc)
set(SOURCES12 ${BASEDIR}/main.cc ${BASEDIR}/main_1.cc ${BASEDIR}/main_2.cc)
#GRIDTYPE = ALUGRID_SIMPLEX
#GRIDTYPE=PARALLELGRID_ALUGRID_CUBE
#GRIDTYPE=PARALLELGRID_ALUGRID_SIMPLEX
# GRIDTYPE=SPGRID
#GRIDTYPE=CARTESIANGRID_ALUGRID_CUBE
set(GRIDTYPE ALUGRID_CUBE)
#GRIDTYPE=YASPGRID
#GRIDTYPE = YASPGRID
set(GRIDDIM 3)
# helper variables
set(SOURCEBASE ${BASEDIR}/main.cc chorjo.cc)
set(SOURCES ${SOURCEBASE} ${BASEDIR}/main_0.cc ${BASEDIR}/main_1.cc
${BASEDIR}/main_2.cc ${BASEDIR}/main_3.cc)
set(SOURCES12 ${SOURCEBASE} ${BASEDIR}/main_1.cc ${BASEDIR}/main_2.cc)
set(SOURCEONEP ${SOURCEBASE} ${BASEDIR}/main_pol.cc)
set(GRIDTYPE YASPGRID)
set(GRIDDIM 3)
set(POLORDER 2)
install(FILES ${nseq_HEADERS} DESTINATION ${nseqdir})
\ No newline at end of file
set(PROBLEM 2)
set(FLUX 1)
set(DIFFFLUX PRIMALDG)
set(TESTS nseq
nseq12
nseqonep)
add_definitions( "-D${GRIDTYPE}" )
add_definitions( "-DGRIDDIM=${GRIDDIM}" )
add_definitions( "-DFLUX=${FLUX}" )
add_definitions( "-D${DIFFFLUX}" )
add_definitions( "-DPROBLEM=${PROBLEM}" )
include_directories("${CMAKE_SOURCE_DIR}/dune/fem-dg/test/navierstokes")
add_executable( nseq ${BASEDIR}/main.cc ${BASEDIR}/main_0.cc ${BASEDIR}/main_1.cc ${BASEDIR}/main_2.cc ${BASEDIR}/main_3.cc )
dune_target_link_libraries(nseq ${DUNE_LIBS})
set_property(TARGET nseq APPEND PROPERTY
COMPILE_DEFINITIONS "LIMITER")
add_executable( nseq12 ${BASEDIR}/main.cc ${BASEDIR}/main_0.cc ${BASEDIR}/main_1.cc )
dune_target_link_libraries(nseq12 ${DUNE_LIBS})
set_property(TARGET nseq12 APPEND PROPERTY
COMPILE_DEFINITIONS "ONLY_P1_P2")
add_executable( nseqonep ${BASEDIR}/main_pol.cc )
dune_target_link_libraries(nseqonep ${DUNE_LIBS})
set_property(TARGET nseqonep APPEND PROPERTY
COMPILE_DEFINITIONS "ONLY_ONE_P;POLORDER=${POLORDER}")
# We do not want want to build the tests during make all
# but just build them on demand
install(FILES ${nseq_HEADERS} DESTINATION ${nseqdir})
foreach(i ${TESTS})
add_dune_alugrid_flags(${i})
add_test(${i} ${i})
endforeach(i ${TESTS})
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${TESTS} ${COMPILE_XFAIL_TESTS})
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