Skip to content
Snippets Groups Projects
Commit 1b342957 authored by Tobias Malkmus's avatar Tobias Malkmus
Browse files

add cmake support for dune-ash

parent 10348841
No related branches found
No related tags found
No related merge requests found
Showing
with 298 additions and 0 deletions
cmake_minimum_required( VERSION 2.8.12 )
project( "dune-ash" C CXX )
find_package( dune-common REQUIRED )
list( APPEND CMAKE_MODULE_PATH ${dune-common_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/modules" )
include( DuneMacros )
dune_project()
add_subdirectory( cmake/modules )
add_subdirectory( dune )
add_subdirectory( src )
finalize_dune_project( GENERATE_CONFIG_H_CMAKE )
set( MODULES
DuneAshMacros.cmake
)
install( FILES ${MODULES} DESTINATION ${DUNE_INSTALL_MODULEDIR} )
find_package( OpenGL REQUIRED )
include_directories( ${OPENGL_INCLUDE_DIR} )
list( INSERT DUNE_DEFAULT_LIBS 0 ${OPENGL_LIBRARY} )
find_package( SDL REQUIRED )
include_directories( ${SDL_INCLUDE_DIR} )
list( INSERT DUNE_DEFAULT_LIBS 0 ${SDL_LIBRARY} )
find_package( SDL_image REQUIRED )
include_directories( ${SDL_IMAGE_INCLUDE_DIRS} )
list( INSERT DUNE_DEFAULT_LIBS 0 ${SDL_IMAGE_LIBRARIES} )
find_package( SDL_ttf REQUIRED )
include_directories( ${SDL_TTF_INCLUDE_DIRS} )
list( INSERT DUNE_DEFAULT_LIBS 0 ${SDL_TTF_LIBRARIES} )
/* begin dune-ash */
/* Define to the version of dune-ash */
#define DUNE_ASH_VERSION "${DUNE_ASH_VERSION}"
/* Define to the major version of dune-ash */
#define DUNE_ASH_VERSION_MAJOR ${DUNE_ASH_VERSION_MAJOR}
/* Define to the minor version of dune-ash */
#define DUNE_ASH_VERSION_MINOR ${DUNE_ASH_VERSION_MINOR}
/* Define to the revision of dune-ash */
#define DUNE_ASH_VERSION_REVISION ${DUNE_ASH_VERSION_REVISION}
/* end dune-ash */
add_subdirectory( ash )
add_subdirectory( fem )
add_subdirectory( glue )
add_subdirectory( opengl )
add_subdirectory( parallel )
add_subdirectory( text )
add_subdirectory( textures )
add_subdirectory( visualizer )
add_subdirectory( widget )
set( HEADERS
cursor.hh
image.hh
io.hh
multiindex.hh
)
install( FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/ash )
dune_add_library( duneash
cursor.cc
image.cc
opengl/texture.cc
parallel/mutex.cc
parallel/thread.cc
text/box.cc
text/fontmanager.cc
text/parser.cc
text/truetypefont.cc
widget/button.cc
widget/collection.cc
widget/empty.cc
widget/floatingtext.cc
widget/grid.cc
widget/multiplesplit.cc
widget/slider.cc
widget/shrink.cc
widget/split.cc
widget/text.cc
)
target_link_dune_default_libraries( duneash )
set( HEADERS
gridpart.hh
l2projection.hh
levelgridpart.hh
)
install( FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/ash/glue )
set( HEADERS
displaylist.hh
error.hh
functor.hh
glmatrix.hh
opengl.hh
texture.hh
)
install( FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/ash/opengl )
set( HEADERS
mutex.hh
thread.hh
)
install( FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/ash/parallel )
set( HEADERS
box.hh
fontmanager.hh
parser.hh
truetypefont.hh
)
install( FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/ash/text )
set( HEADERS
arrow.hh
back.hh
cloudcolormapper.hh
colordiscretizer.hh
gridfunctor.hh
linearalphamapper.hh
)
install( FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/ash/textures )
set( HEADERS
discretefunction.hh
vectorfield.hh
)
install( FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/ash/visualizer )
set( HEADERS
button.hh
collection.hh
display.hh
empty.hh
event.hh
floatingtext.hh
grid.hh
multiplesplit.hh
shrink.hh
slider.hh
split.hh
text.hh
widget.hh
)
install( FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/ash/widget )
set( HEADERS
serialoutputmap.hh
writerutilities.hh
)
install( FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/fem )
add_subdirectory( adrsolver )
add_subdirectory( common )
add_subdirectory( config )
add_subdirectory( glue )
add_subdirectory( ui )
add_subdirectory( windfield )
add_executable( dune-ash-adrsolver adrsolver.cc ../common/filemanager.cc )
target_compile_definitions( dune-ash-adrsolver PRIVATE "POLORDER=1" "SPGRID" "GRIDDIM=2" )
target_compile_definitions( dune-ash-adrsolver PRIVATE "BINDIR=\"${CMAKE_INSTALL_BINDIR}\"" )
target_compile_definitions( dune-ash-adrsolver PRIVATE "SYSCONFDIR=\"${CMAKE_INSTALL_SYSCONFDIR}\"" )
target_link_dune_default_libraries( dune-ash-adrsolver )
install( PROGRAMS dune-ash-adrsolver DESTINATION ${CMAKE_INSTALL_BINDIR} )
############# IMPORTANT INCLUDE FOR DUNE-ASH #############
# start time and end time of simulation [sec]
ash.startTime: 0.
ash.endTime: 1.
ash.maxTimeStep: 0.01
ash.savestep: 0.01
###### FEM ODE SOLVER params ############
fem.timeprovider.factor: 0.5
fem.ode.maxiterations: 40
fem.ode.miniterations: 10
fem.ode.iterations: 250
fem.ode.cflStart: 1.
fem.ode.cflMax: 100
########### P R O B L E M C O N F I G U R A T I O N ##########
ash.volcano.concentration: 4.
ash.volcano.radius: 0.025
########### E N D P R O B L E M C O N F I G U R A T I O N ##########
fem.resolvevariables: 1
# colors
# ------
# define standard colors
color.white: 1.0 1.0 1.0
color.black: 0.0 0.0 0.0
color.red: 1.0 0.0 0.0
color.green: 0.0 1.0 0.0
color.blue: 0.0 0.0 1.0
# define dune colors
color.dune.orange: 0.91 0.56 0.25
color.dune.darkorange: 0.72 0.38 0.06
color.dune.lightblue: 0.78 0.84 1.0
color.dune.blue: 0.35 0.45 0.71
color.dune.mediumblue: 0.61 0.68 0.85
color.dune.darkblue: 0.22 0.29 0.49
color.dune.silver: 0.95 0.95 0.95
color.dune.gray: 0.79 0.79 0.79
# define color for usage
color.text.default: $(color.black)
color.text.heading: $(color.dune.orange)
color.text.link: $(color.dune.blue)
# widget settings
# ---------------
ash.button.background: $(color.white)
ash.button.linecolor: $(color.dune.darkblue)
ash.button.linewidth: 3
ash.slider.background: $(color.white)
ash.slider.foreground: $(color.dune.orange)
ash.slider.inactive: $(color.dune.lightblue)
ash.slider.active: $(color.dune.mediumblue)
ash.text.foreground: $(color.black)
ash.text.background: $(color.white)
# default font
ash.fontmanager.defaultfont: DejaVuSerif
ash.fontmanager.defaultsize: 28
# program settings
# ----------------
# time in ms to wait between checking for new samples
ui.playback.polldelay: 1000
# frame per second for "movie" playback
ui.playback.framespersecond: 12
# idle seconds before program terminates (default: some 100 years)
# ui.timeout: 600
ui.askonexit: false
# switch quit button on / off
ui.allowquit: true
# colon separated list of selectable languages (first is used on startup)
# available languages are: en, de, kor
ui.languages: en:de
# screen settings
# ---------------
# screen mode: either fullscreen or window
ui.screen.mode: fullscreen
# width / height (default: determine automatically)
#ui.screen.width: 1920
#ui.screen.height: 1080
# bits per pixel (default: determine automatically)
#ui.screen.bitsperpixel: 32
# frames to draw per second
ui.screen.framespersecond: 60
# curser file (e.g., arrow.cur or empty.cur)
ui.screen.cursor: arrow.cur
# show program version?
ui.screen.showversion: false
# misc settings
# -------------
# path to map file
ui.map: $(ash.datapath)/images/1024europe_small.png
# minimal / maximal diffusion
ui.diff.min: 1e-4
ui.diff.max: 1e-2
# scaling for ash concentration
ui.concentration.max: 0.05
ui.concentration.textureresolution: 1080
# wind field grid
ui.windfield.levels: 3
ui.windfield.resolution: (16,16)
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