Skip to content
Snippets Groups Projects
Commit b2fdd625 authored by Xavier Adriaens's avatar Xavier Adriaens
Browse files

Up last gmshfem version

parent e0c3ea6e
No related branches found
No related tags found
No related merge requests found
...@@ -8,11 +8,11 @@ macro(opt OPTION HELP VALUE) ...@@ -8,11 +8,11 @@ macro(opt OPTION HELP VALUE)
endmacro() endmacro()
include(CheckCXXCompilerFlag) include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++11" HAVE_CXX11) check_cxx_compiler_flag("-std=c++14" HAVE_CXX14)
if(HAVE_CXX11) if(HAVE_CXX14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
else() else()
message(ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.") message(ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler.")
endif() endif()
check_cxx_compiler_flag("-Wall" HAVE_WALL) check_cxx_compiler_flag("-Wall" HAVE_WALL)
...@@ -99,8 +99,8 @@ endif() ...@@ -99,8 +99,8 @@ endif()
include_directories(${EXTRA_INCS}) include_directories(${EXTRA_INCS})
file( GLOB LIB_SOURCES common/*/*/*.cpp common/*/*.cpp common/*.cpp specific/*/*/*.cpp specific/*/*.cpp specific/*.cpp) file( GLOB LIB_SOURCES contrib/blossom5v2.05/*.cpp contrib/blossom5v2.05/*/*.cpp common/*/*/*.cpp common/*/*.cpp common/*.cpp specific/*/*/*.cpp specific/*/*.cpp specific/*.cpp)
file( GLOB LIB_HEADERS common/*/*/*.h common/*/*.h common/*.h specific/*/*/*.h specific/*/*.h specific/*.h) file( GLOB LIB_HEADERS contrib/blossom5v2.05/*.h contrib/blossom5v2.05/*/*.h common/*/*/*.h common/*/*.h common/*.h specific/*/*/*.h specific/*/*.h specific/*.h)
add_library( fwi ${LIB_SOURCES} ${LIB_HEADERS}) add_library( fwi ${LIB_SOURCES} ${LIB_HEADERS})
add_executable( synthetics synthetics.cpp ${EXTRA_INCS}) add_executable( synthetics synthetics.cpp ${EXTRA_INCS})
...@@ -115,8 +115,8 @@ target_link_libraries( gradient fwi ${EXTRA_LIBS}) ...@@ -115,8 +115,8 @@ target_link_libraries( gradient fwi ${EXTRA_LIBS})
#target_link_libraries( preconditioner fwi ${EXTRA_LIBS}) #target_link_libraries( preconditioner fwi ${EXTRA_LIBS})
add_executable( ip_comparison ip_comparison.cpp ${EXTRA_INCS}) add_executable( ip_comparison ip_comparison.cpp ${EXTRA_INCS})
target_link_libraries( ip_comparison fwi ${EXTRA_LIBS}) target_link_libraries( ip_comparison fwi ${EXTRA_LIBS})
#add_executable( ob_comparison ob_comparison.cpp ${EXTRA_INCS}) add_executable( ob_comparison ob_comparison.cpp ${EXTRA_INCS})
#target_link_libraries( ob_comparison fwi ${EXTRA_LIBS}) target_link_libraries( ob_comparison fwi ${EXTRA_LIBS})
#add_executable( multiscale multiscale.cpp ${EXTRA_INCS}) #add_executable( multiscale multiscale.cpp ${EXTRA_INCS})
#target_link_libraries( multiscale fwi ${EXTRA_LIBS}) #target_link_libraries( multiscale fwi ${EXTRA_LIBS})
add_executable( inversion inversion.cpp ${EXTRA_INCS}) add_executable( inversion inversion.cpp ${EXTRA_INCS})
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#include "model/parametrization.h" #include "model/parametrization.h"
#include "enum.h" #include "enum.h"
using namespace gmshfem::function::literals;
class ConfigurationInterface //(abstract) class ConfigurationInterface //(abstract)
{ {
protected: protected:
...@@ -55,7 +57,7 @@ public: ...@@ -55,7 +57,7 @@ public:
virtual void mesh() const = 0; virtual void mesh() const = 0;
virtual double area() const = 0; virtual double area() const = 0;
virtual double data_area() const {return gmshfem::post::integrate(1.,_data_omega,"Gauss0");}; virtual double data_area() const {return gmshfem::post::integrate(1._d_sf,_data_omega,"Gauss0");};
virtual double datapoint_area() const = 0; virtual double datapoint_area() const = 0;
virtual double array() const {return 0.;}; virtual double array() const {return 0.;};
virtual double depth() const {return 0.;}; virtual double depth() const {return 0.;};
......
...@@ -61,7 +61,7 @@ int synthetics(const GmshFem& gmshFem) ...@@ -61,7 +61,7 @@ int synthetics(const GmshFem& gmshFem)
EquationInterface<T_Physic>* const pequation = new ParametrizedEquation<T_Physic>(parametrization,1,2.*M_PI*frequency,configuration,w_discret,gmshFem,suffix); EquationInterface<T_Physic>* const pequation = new ParametrizedEquation<T_Physic>(parametrization,1,2.*M_PI*frequency,configuration,w_discret,gmshFem,suffix);
WaveUpdater<T_Physic> wu(configuration,nullptr,pequation); WaveUpdater<T_Physic> wu(configuration,nullptr,pequation);
DataUpdater<T_Physic> du(std::vector<double>(frequency),configuration,&wu,nullptr); DataUpdater<T_Physic> du(std::vector<double>(1,frequency),configuration,&wu,nullptr);
std::array<bool,5> dataNeedUpToDate = {true,false,false,false,false}; std::array<bool,5> dataNeedUpToDate = {true,false,false,false,false};
du.get(dataNeedUpToDate,ms).write(Type::F,name+"_data"+suffix); du.get(dataNeedUpToDate,ms).write(Type::F,name+"_data"+suffix);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment