Skip to content
Snippets Groups Projects
Commit bc9184b0 authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Fixing conflicts

parents 3081e237 19d554ef
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,12 @@ m4_ifdef([AX_EIGEN],,[m4_include([m4/ax_eigen.m4])])
m4_ifdef([AX_LIB_HDF5],,[m4_include([m4/ax_lib_hdf5.m4])])
m4_ifdef([AX_LIB_PETSC],,[m4/ax_petsc_lib.m4])
case $host_os in
*darwin*|*macosx*)
CXXFLAGS+=" --std=c++11 "
AC_DEFINE([HAVE_OSX],[],[We have OSX])
;;
*cygwin*)
# Do something specific for cygwin
CXXFLAGS+=" --std=gnu++11 "
......@@ -141,7 +146,7 @@ AC_CHECK_LIB(rt, clock_gettime, [AC_DEFINE([HAVE_CLOCK_GETTIME],[],[Have clock t
####### include OpenFPM_numerics include path"
INCLUDES_PATH+=" -I/usr/local/include -I. -Iconfig -I../../openfpm_devices/src -I../../openfpm_data/src -I../../openfpm_io/src -I../../openfpm_vcluster/src -I../../src"
INCLUDES_PATH+=" -I/usr/local/include -I. -I../../openfpm_devices/src -I../../openfpm_data/src -I../../openfpm_io/src -I../../openfpm_vcluster/src -I../../src"
###### Check for se-class1
......
......@@ -237,9 +237,8 @@ template<typename solver_type,typename lid_nn> void lid_driven_cavity_2d()
#ifdef HAVE_OSX
std::string file1 = std::string("test/") + s + "lid_driven_cavity_p" + std::to_string(v_cl.getProcessingUnits()) + "_grid_" + std::to_string(v_cl.getProcessUnitID()) + "_test_osx.vtk";
std::string file2 = s + "lid_driven_cavity_p" + std::to_string(v_cl.getProcessingUnits()) + "_grid_" + std::to_string(v_cl.getProcessUnitID()) + ".vtk";
std::string file1 = std::string("test/") + s + "lid_driven_cavity_p" + std::to_string(v_cl.getProcessingUnits()) + "_grid_" + std::to_string(v_cl.getProcessUnitID()) + "_test_osx.vtk";
std::string file2 = s + "lid_driven_cavity_p" + std::to_string(v_cl.getProcessingUnits()) + "_grid_" + std::to_string(v_cl.getProcessUnitID()) + ".vtk";
#else
......
......@@ -8,7 +8,7 @@
#ifndef OPENFPM_NUMERICS_SRC_FINITEDIFFERENCE_EQ_UNIT_TEST_3D_HPP_
#define OPENFPM_NUMERICS_SRC_FINITEDIFFERENCE_EQ_UNIT_TEST_3D_HPP_
#include "config.h"
#include "Laplacian.hpp"
#include "FiniteDifference/eq.hpp"
#include "FiniteDifference/sum.hpp"
......@@ -206,9 +206,19 @@ template<typename solver_type,typename lid_nn_3d> void lid_driven_cavity_3d()
g_dist.write(s + "lid_driven_cavity_3d_p" + std::to_string(v_cl.getProcessingUnits()));
#ifdef HAVE_OSX
std::string file1 = std::string("test/") + s + "lid_driven_cavity_3d_p" + std::to_string(v_cl.getProcessingUnits()) + "_grid_" + std::to_string(v_cl.getProcessUnitID()) + "_test_osx.vtk";
std::string file2 = s + "lid_driven_cavity_3d_p" + std::to_string(v_cl.getProcessingUnits()) + "_grid_" + std::to_string(v_cl.getProcessUnitID()) + ".vtk";
#else
std::string file1 = std::string("test/") + s + "lid_driven_cavity_3d_p" + std::to_string(v_cl.getProcessingUnits()) + "_grid_" + std::to_string(v_cl.getProcessUnitID()) + "_test.vtk";
std::string file2 = s + "lid_driven_cavity_3d_p" + std::to_string(v_cl.getProcessingUnits()) + "_grid_" + std::to_string(v_cl.getProcessUnitID()) + ".vtk";
#endif
// Check that match
bool test = compare(file1,file2);
BOOST_REQUIRE_EQUAL(test,true);
......
/*
* sum.hpp
*
* Created on: Oct 13, 2015
* Author: i-bird
*/
/*
* sum.hpp
*
* Created on: Oct 13, 2015
* Author: i-bird
*/
#ifndef OPENFPM_NUMERICS_SRC_FINITEDIFFERENCE_SUM_HPP_
#define OPENFPM_NUMERICS_SRC_FINITEDIFFERENCE_SUM_HPP_
#ifndef OPENFPM_NUMERICS_SRC_FINITEDIFFERENCE_SUM_HPP_
#define OPENFPM_NUMERICS_SRC_FINITEDIFFERENCE_SUM_HPP_
#include <boost/mpl/vector.hpp>
#include "config.h"
#include <unordered_map>
#include "util/for_each_ref.hpp"
#include <boost/mpl/vector.hpp>
#include "config.h"
#include <unordered_map>
#include "util/for_each_ref.hpp"
template<typename v_expr>
struct sum_functor_value
{
//! Number of elements in the vector v_expr
typedef boost::mpl::size<v_expr> size;
//! Last element of sum
typedef typename boost::mpl::at<v_expr,boost::mpl::int_<size::value-1> >::type last;
template<typename v_expr>
struct sum_functor_value
{
//! Number of elements in the vector v_expr
typedef boost::mpl::size<v_expr> size;
//! sum functor
std::unordered_map<long int,typename last::stype> & cols;
//! Last element of sum
typedef typename boost::mpl::at<v_expr,boost::mpl::int_<size::value-1> >::type last;
//! Grid info
const grid_sm<last::dims,void> & gs;
//! sum functor
std::unordered_map<long int,typename last::stype> & cols;
// grid mapping
const typename stub_or_real<last,last::dims,typename last::stype,typename last::b_grid::decomposition::extended_type>::type & g_map;
//! Grid info
const grid_sm<last::dims,void> & gs;
// grid position
grid_dist_key_dx<last::dims> & kmap;
// grid mapping
const typename stub_or_real<last,last::dims,typename last::stype,typename last::b_grid::decomposition::extended_type>::type & g_map;
//! position
grid_key_dx<last::dims> & key;
// grid position
grid_dist_key_dx<last::dims> & kmap;
//! coefficent
typename last::stype coeff;
//! coefficent
typename last::stype coeff;
//! spacing
typename last::stype (& spacing)[last::dims];
//! spacing
typename last::stype (& spacing)[last::dims];
/*! \brief constructor
*
*/
sum_functor_value(const typename stub_or_real<last,last::dims,typename last::stype,typename last::b_grid::decomposition::extended_type>::type & g_map, grid_dist_key_dx<last::dims> & kmap, const grid_sm<last::dims,void> & gs, typename last::stype (& spacing)[last::dims], std::unordered_map<long int,typename last::stype> & cols, typename last::stype coeff)
:cols(cols),gs(gs),g_map(g_map),kmap(kmap),key(key),coeff(coeff),spacing(spacing)
/*! \brief constructor
*
*/
sum_functor_value(const typename stub_or_real<last,last::dims,typename last::stype,typename last::b_grid::decomposition::extended_type>::type & g_map, grid_dist_key_dx<last::dims> & kmap, const grid_sm<last::dims,void> & gs, typename last::stype (& spacing)[last::dims], std::unordered_map<long int,typename last::stype> & cols, typename last::stype coeff)
:cols(cols),gs(gs),g_map(g_map),kmap(kmap),coeff(coeff),spacing(spacing)
{};
//! It call this function for every expression in the sum
......
This diff is collapsed.
This diff is collapsed.
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