File tree Expand file tree Collapse file tree
source/initial_temperature Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,11 +148,14 @@ if(ASPECT_WITH_WORLD_BUILDER)
148148
149149 # generate config.cc and include it:
150150 IF (WORLD_BUILDER_VERSION VERSION_LESS 0.5.0)
151- CONFIGURE_FILE ("${WORLD_BUILDER_SOURCE_DIR} /source/config.cc.in" "${CMAKE_BINARY_DIR} /world_builder_config.cc" @ONLY )
151+ CONFIGURE_FILE ("${WORLD_BUILDER_SOURCE_DIR} /source/config.cc.in" "${CMAKE_BINARY_DIR} /source/world_builder/config.cc" @ONLY )
152+ LIST (INSERT TARGET_SRC 0 "${CMAKE_BINARY_DIR} /source/world_builder/config.cc" )
153+ FILE (REMOVE "${CMAKE_BINARY_DIR} /include/world_builder/config.h" )
152154 ELSE ()
153- CONFIGURE_FILE ("${WORLD_BUILDER_SOURCE_DIR} /source/world_builder/config.cc.in" "${CMAKE_BINARY_DIR} /world_builder_config.cc" @ONLY )
155+ CONFIGURE_FILE ("${WORLD_BUILDER_SOURCE_DIR} /include/world_builder/config.h.in" "${CMAKE_BINARY_DIR} /include/world_builder/config.h" @ONLY )
156+ INCLUDE_DIRECTORIES ("${CMAKE_BINARY_DIR} /include/" )
157+ FILE (REMOVE "${CMAKE_BINARY_DIR} /source/world_builder/config.cc" )
154158 ENDIF ()
155- LIST (INSERT TARGET_SRC 0 "${CMAKE_BINARY_DIR} /world_builder_config.cc" )
156159
157160 # Move some file to the end for unity builds to make sure other file come
158161 # "before". Note: The current design keeps all ASPECT files (including
Original file line number Diff line number Diff line change 2121#include < aspect/global.h>
2222
2323#ifdef ASPECT_WITH_WORLD_BUILDER
24+ #include < world_builder/config.h>
2425#include < aspect/initial_temperature/world_builder.h>
2526#include < world_builder/world.h>
2627#include < aspect/geometry_model/interface.h>
@@ -49,9 +50,15 @@ namespace aspect
4950 WorldBuilder<dim>::
5051 initial_temperature (const Point<dim> &position) const
5152 {
53+ #if WORLD_BUILDER_VERSION_MAJOR > 0 || WORLD_BUILDER_VERSION_MINOR >= 5
54+ return this ->get_world_builder ().temperature (Utilities::convert_point_to_array (position),
55+ -this ->get_geometry_model ().height_above_reference_surface (position));
56+ #else
57+
5258 return this ->get_world_builder ().temperature (Utilities::convert_point_to_array (position),
5359 -this ->get_geometry_model ().height_above_reference_surface (position),
5460 this ->get_gravity_model ().gravity_vector (position).norm ());
61+ #endif
5562 }
5663
5764 }
You can’t perform that action at this time.
0 commit comments