Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dg
dg
Commits
20385de7
Commit
20385de7
authored
Oct 20, 2016
by
Jonathan Lambrechts
Committed by
Valentin Vallaeys
Oct 25, 2016
Browse files
introduce slimFunctionConfig.h
parent
9db516ef
Changes
13
Hide whitespace changes
Inline
Side-by-side
modules/slimFunction/CMakeLists.txt
View file @
20385de7
...
...
@@ -23,7 +23,7 @@ if(ENABLE_NETCDF)
find_path
(
NETCDF_INC
"netcdf.h"
PATH_SUFFIXES include
)
if
(
NETCDF_INC
)
message
(
"slimFunction configured with Netcdf"
)
add_definitions
(
"-D
HAVE_NETCDF
"
)
set
(
HAVE_NETCDF
ON
)
include_directories
(
${
NETCDF_INC
}
)
list
(
APPEND LIBS
${
NETCDF_LIB
}
)
dg_add_swig_module
(
slimNetCDFWrap slimNetCDFWrap.i
"dgSlimFunction"
)
...
...
@@ -39,8 +39,8 @@ if(ENABLE_FES)
find_path
(
FES_DATA
"fes.ini"
PATH_SUFFIXES
"share/fes_data"
HINTS
"
${
FES_INC
}
/../share/fes_data"
)
if
(
FES_INC AND FES_DATA
)
message
(
"slimFunction configured with FES"
)
add_definitions
(
"-D
HAVE_FES
"
)
add_definitions
(
"-D
FES_DATA
\"
${
FES_DATA
}
\"
"
)
set
(
HAVE_FES
ON
)
set
(
FES_DATA
"
\"
${
FES_DATA
}
\"
"
)
list
(
APPEND LIBS
${
FES_LIB
}
)
include_directories
(
${
FES_INC
}
)
endif
(
FES_INC AND FES_DATA
)
...
...
@@ -69,7 +69,7 @@ if(ENABLE_PROJ)
)
set
(
PROJ_INC
${
CMAKE_CURRENT_BINARY_DIR
}
/libproj/src/libproj/src
)
message
(
"slimFunction configured with PROJ"
)
add_definitions
(
"-D
HAVE_PROJ
"
)
set
(
HAVE_PROJ
ON
)
include_directories
(
${
PROJ_INC
}
)
list
(
APPEND EXTERNAL_MODULE_DEPS libproj
)
list
(
APPEND LIBS
${
PROJ_LIB
}
)
...
...
@@ -85,12 +85,17 @@ if(ENABLE_PROJ)
BINARY_DIR unref/build
)
list
(
APPEND EXTERNAL_MODULE_DEPS unref
)
add_definition
(
-D
HAVE_UNREF
)
set
(
HAVE_UNREF
ON
)
list
(
APPEND LIBS
${
CMAKE_CURRENT_BINARY_DIR
}
/unref/build/libunref.a
)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
/unref/src/unref
)
endif
(
ENABLE_UNREF
)
endif
(
ENABLE_PROJ
)
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/slimFunctionConfig.h.in
${
CMAKE_CURRENT_BINARY_DIR
}
/slimFunctionConfig.h
)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
dg_add_module
(
dgSlimFunction
"
${
SRC
}
"
"
${
LIBS
}
;
${
PYTHON_LIBRARY
}
"
)
dg_add_swig_module
(
slimFunction slimFunction.i dgSlimFunction
)
if
(
ENABLE_PROJ
)
...
...
modules/slimFunction/ncDataDz.h
View file @
20385de7
...
...
@@ -3,6 +3,7 @@
#include
<fstream>
#include
<float.h>
#include
"function.h"
#include
"slimFunctionConfig.h"
#ifdef HAVE_NETCDF
...
...
modules/slimFunction/slimExportNetCDF.h
View file @
20385de7
#ifndef _SLIM_EXPORTNETCDF_H_
#define _SLIM_EXPORTNETCDF_H_
#include
"slimFunctionConfig.h"
/**
* \file slimExportNetCDF.h
* \brief Header for exporting solution in netCDF format/
...
...
modules/slimFunction/slimFES.h
View file @
20385de7
#ifndef _SLIM_FES_H_
#define _SLIM_FES_H_
#include
"slimFunctionConfig.h"
/**
* \file slimFES.h
...
...
modules/slimFunction/slimFunction.h
View file @
20385de7
#ifndef _SLIM_FUNCTION_H_
#define _SLIM_FUNCTION_H_
#include
"slimFunctionConfig.h"
#include
"function.h"
#include
"stdint.h"
#include
"dgDofContainer.h"
...
...
modules/slimFunction/slimFunction.i
View file @
20385de7
%
module
slimFunction
%
{
#
undef
HAVE_DLOPEN
#
include
"slimFunctionConfig.h"
#
include
"ncDataDz.h"
#
include
"slimFunction.h"
#
include
"slimStructData.h"
...
...
@@ -19,6 +20,7 @@
%
import
(
module
=
"dgpy.dgFunction"
)
"functor.h"
%
import
(
module
=
"dgpy.dgFunction"
)
"function.h"
%
include
"slimFunctionConfig.h"
%
include
"unrefMesher.h"
%
rename
(
_print
)
print
;
%
include
"ncDataDz.h"
...
...
modules/slimFunction/slimFunctionConfig.h.in
0 → 100644
View file @
20385de7
#ifndef SLIM_FUNCTION_CONFIG_H_IN
#define SLIM_FUNCTION_CONFIG_H_IN
#cmakedefine HAVE_UNREF
#cmakedefine HAVE_NETCDF
#cmakedefine HAVE_FES
#cmakedefine FES_DATA
#cmakedefine HAVE_PROJ
#cmakedefine HAVE_UNREF
#endif
modules/slimFunction/slimGebco.h
View file @
20385de7
#ifndef _SLIM_GEBCO_H_
#define _SLIM_GEBCO_H_
#include
"slimFunctionConfig.h"
#ifdef HAVE_NETCDF
/**Read the gebco bathymetry netcdf file generated with the interactive map available in https://www.bodc.ac.uk/data/online_delivery/gebco/select/ */
class
slimFunctionGebco
:
public
function
{
...
...
modules/slimFunction/slimLonLat.cpp
View file @
20385de7
#include
"slimFunctionConfig.h"
#include
"function.h"
#include
"slimLonLat.h"
#include
"functionGeneric.h"
...
...
modules/slimFunction/slimStructData.h
View file @
20385de7
#ifndef _SLIM_STRUCT_DATA_H_
#define _SLIM_STRUCT_DATA_H_
#include
"slimFunctionConfig.h"
#include
"slimDate.h"
#include
<fstream>
#include
<float.h>
...
...
modules/slimFunction/slimTpxo.h
View file @
20385de7
#ifndef _SLIM_TPXO_H_
#define _SLIM_TPXO_H_
#include
"slimFunctionConfig.h"
#include
"slimStructData.h"
#include
"dgDofContainer.h"
#include
"dgGroupOfElements.h"
...
...
modules/slimFunction/unrefMesher.cpp
View file @
20385de7
#include
"slimFunctionConfig.h"
#ifdef HAVE_UNREF
#include
<cmath>
#include
"unref.h"
...
...
modules/slimFunction/unrefMesher.h
View file @
20385de7
#ifndef UNREF_H_
#define UNREF_H_
#include
"slimFunctionConfig.h"
#ifdef HAVE_UNREF
#include
<string>
#include
<map>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment