Commit eca1f8a2 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

modularity

parent 72eb82d5
Pipeline #429 failed with stage
in 24 minutes and 19 seconds
#ifndef SLIM3D_EQUATIONS_H
#define SLIM3D_EQUATIONS_H
#include "dgConfig.h"
#include "function.h"
#include "functionGeneric.h"
#include "dgDofContainer.h"
......
#include "slim3dNetCDFIO.h"
#ifdef HAVE_PNETCDF
#include "pnetcdf.h"
#include "netcdf.h"
#include "mpi.h"
mpiArrayStructure::mpiArrayStructure(dgGroupCollection* groups)
......
#ifndef SLIM_NETCDF_IO_H
#define SLIM_NETCDF_IO_H
#include "dgConfig.h"
#if defined(HAVE_PNETCDF)
#if defined(HAVE_MPI)
#include "dgDofContainer.h"
#include "dgGroupOfElements.h"
#include "dgExtrusion.h"
......@@ -89,4 +87,3 @@ public:
#endif
#endif
#endif
......@@ -13,15 +13,18 @@ set(SRC
slimExportNetCDF.cpp
)
set(LIBS "")
option(ENABLE_NETCDF "Enable NETCDF" ON)
if(ENABLE_NETCDF)
find_library (NETCDF_LIB netcdf)
if (NETCDF_LIB)
find_path (NETCDF_INC "netcdf.h" PATH_SUFFIXES include)
if (NETCDF_INC)
dg_set_module_option(HAVE_NETCDF "Netcdf")
message("slimFunction configured with Netcdf")
add_definitions("-DHAVE_NETCDF")
include_directories(${NETCDF_INC})
dg_add_library(${NETCDF_LIB})
list(APPEND LIBS ${NETCDF_LIB})
endif(NETCDF_INC)
endif(NETCDF_LIB)
endif(ENABLE_NETCDF)
......@@ -33,14 +36,30 @@ if(ENABLE_FES)
find_path(FES_INC "fes.h" PATH_SUFFIXES include)
find_path(FES_DATA "fes.ini" PATH_SUFFIXES "share/fes_data" HINTS "${FES_INC}/../share/fes_data")
if (FES_INC AND FES_DATA)
set(HAVE_FES TRUE)
dg_set_module_option(HAVE_FES "FES")
dg_add_library(${FES_LIB})
message("slimFunction configured with FES")
add_definitions("-DHAVE_FES")
add_definitions("-DFES_DATA \"${FES_DATA}\"")
list(APPEND LIBS ${FES_LIB})
include_directories(${FES_INC})
endif(FES_INC AND FES_DATA)
endif(FES_LIB)
endif(ENABLE_FES)
dg_add_module(dgSlimFunction "${SRC}")
option(ENABLE_PROJ "Enable PROJ" ON)
if(ENABLE_PROJ)
find_library (PROJ_LIB proj)
if (PROJ_LIB)
find_path (PROJ_INC "proj_api.h" PATH_SUFFIXES include)
if (PROJ_INC)
message("slimFunction configured with PROJ")
add_definitions("-DHAVE_PROJ")
include_directories(${PROJ_INC})
list(APPEND LIBS ${PROJ_LIB})
endif(PROJ_INC)
endif(PROJ_LIB)
endif(ENABLE_PROJ)
dg_add_module(dgSlimFunction "${SRC}" "${LIBS}")
dg_add_swig_module(slimFunction slimFunction.i dgSlimFunction)
dg_add_test_directory(tests valentin.vallaeys@uclouvain.be)
......@@ -7,7 +7,6 @@
#include <iostream>
#include <sstream>
#include "function.h"
#include "dgConfig.h"
#include "time.h"
#include "ncDataDz.h"
......
......@@ -3,7 +3,6 @@
#include <fstream>
#include <float.h>
#include "function.h"
#include "dgConfig.h"
#ifdef HAVE_NETCDF
......
......@@ -13,7 +13,6 @@
* slimExportNetCDF exports the fields of a dof container (eta, u or/and v) in a netCDF format.
*/
#include "dgConfig.h"
#include "slimStructData.h"
#include "dgDofContainer.h"
#include "dgGroupOfElements.h"
......
......@@ -24,7 +24,6 @@
* provides a worldwide database of tides, using modelling and assimilation.
*/
#include "dgConfig.h"
#include "slimStructData.h"
#include "function.h"
#include <string>
......
#include "dgConfig.h"
#ifdef HAVE_GMSH
#include "GModel.h"
#include "Field.h"
......
#ifndef _SLIMFIELD_H_
#define _SLIMFIELD_H_
#include "dgConfig.h"
#ifdef HAVE_GMSH
class GModel;
......
......@@ -7,7 +7,6 @@
#include "dgFunctionEvaluator.h"
#include "dgFunctionIntegratorInterface.h"
#include "dgIntegrationMatrices.h"
#include "dgConfig.h"
#include "dgMessage.h"
#include "SPoint2.h"
#include "SPoint3.h"
......
......@@ -3,7 +3,6 @@
#include "function.h"
#include "stdint.h"
#include "dgDofContainer.h"
#include "dgConfig.h"
/**transform the an XYZ function to a latLon / lonLat / latLonDegrees / lonLatDegrees */
class slimFunctionXYZ2LatLon : public function {
......
%module slimFunction
%{
#undef HAVE_DLOPEN
#include "dgConfig.h"
#include "ncDataDz.h"
#include "slimFunction.h"
#include "slimStructData.h"
......@@ -20,7 +19,6 @@
%import(module="dgpy.dgFunction") "function.h"
%rename (_print) print;
%include "dgConfig.h"
%include "ncDataDz.h"
%include "slimFunction.h"
%include "slimStructData.h"
......
......@@ -5,7 +5,6 @@
#include "function.h"
#include "slimDate.h"
#include <iostream>
#include "dgConfig.h"
#include "slimGebco.h"
#ifdef HAVE_NETCDF
......
#ifndef _SLIM_GEBCO_H_
#define _SLIM_GEBCO_H_
#include "dgConfig.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 {
......
......@@ -3,8 +3,6 @@
#include "functionGeneric.h"
#include "functorMember.h"
#include "dgConfig.h"
#ifdef HAVE_PROJ
#include <proj_api.h>
class slimLatLonFunction: public function {
......
......@@ -10,7 +10,6 @@
#include "slimStructData.h"
#include "function.h"
#include "slimDate.h"
#include "dgConfig.h"
#include "time.h"
#ifdef HAVE_NETCDF
......
......@@ -4,7 +4,6 @@
#include <fstream>
#include <float.h>
#include "function.h"
#include "dgConfig.h"
/**container for structured data */
class slimStructDataContainer {
......
......@@ -6,7 +6,6 @@
#include <fstream>
#include "function.h"
#include "slimDate.h"
#include "dgConfig.h"
#include "slimTemporalSerie.h"
#include <algorithm>
......
......@@ -5,7 +5,6 @@
#include "functor.h"
#include "slimDate.h"
#include <iostream>
#include "dgConfig.h"
#include "slimTpxo.h"
#include "dgDofContainer.h"
#include "functionGeneric.h"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment