Commit d50be0ee authored by carambula's avatar carambula
Browse files

Fix ambiguity complains in autodiff with g++-4.2.1; disable extended solver...

Fix ambiguity complains in autodiff with g++-4.2.1; disable extended solver tests that require matrix collections
parent 0b000d86
......@@ -14,3 +14,5 @@ Source/Solver/solver_k3biilu2/k3d.cpp
Source/Solver/solver_k3biilu2/k3d.h
.vscode/*
.DS_Store
#ifndef _VECTOR_H
#define _VECTOR_H
#ifndef _VECTORS_H
#define _VECTORS_H
#include "inmost.h"
#include "coord.h"
......
......@@ -231,16 +231,16 @@ namespace INMOST
rMatrix Value(const Storage & e) const
{
rMatrix ret = Arg.Value(e);
for(INMOST_DATA_ENUM_TYPE k = 0; k < ret.Rows(); ++k)
for(INMOST_DATA_ENUM_TYPE l = 0; l < ret.Cols(); ++l)
for(INMOST_DATA_ENUM_TYPE k = 0; k < ret.Rows(); ++k)
for(INMOST_DATA_ENUM_TYPE l = 0; l < ret.Cols(); ++l)
ret(k,l) = get_table(ret(k,l),Table);
return ret;
}
vMatrix Variable(const Storage & e) const
{
vMatrix ret = Arg.Variable(e);
for(INMOST_DATA_ENUM_TYPE k = 0; k < ret.Rows(); ++k)
for(INMOST_DATA_ENUM_TYPE l = 0; l < ret.Cols(); ++l)
for(INMOST_DATA_ENUM_TYPE k = 0; k < ret.Rows(); ++k)
for(INMOST_DATA_ENUM_TYPE l = 0; l < ret.Cols(); ++l)
ret(k,l) = get_table(ret(k,l),Table);
return ret;
}
......
......@@ -84,7 +84,7 @@
#define NOMINMAX
#include <mpi.h>
#if !defined(MSMPI_VER) && !defined(MPIO_INCLUDE) && defined(USE_MPI_FILE) && !defined(OMPI_PROVIDE_MPI_FILE_INTERFACE)
#include <mpio.h> //some versions of MPI doesn't include that
//#include <mpio.h> //some versions of MPI doesn't include that
#endif
#endif
......
......@@ -82,7 +82,7 @@ namespace INMOST
value = other.value;
return *this;
}
operator INMOST_DATA_REAL_TYPE () {return value;}
//operator INMOST_DATA_REAL_TYPE () {return value;}
};
......@@ -181,6 +181,13 @@ namespace INMOST
entries.Clear();
return *this;
}
__INLINE multivar_expression & operator = (multivar_expression const & other)
{
value = other.value;
entries = other.entries;
return *this;
}
/*
__INLINE multivar_expression & operator = (basic_expression const & expr)
{
value = expr.GetValue();
......@@ -194,12 +201,7 @@ namespace INMOST
}
return *this;
}
__INLINE multivar_expression & operator = (multivar_expression const & other)
{
value = other.value;
entries = other.entries;
return *this;
}
*/
__INLINE Sparse::Row & GetRow() {return entries;}
__INLINE const Sparse::Row & GetRow() const {return entries;}
__INLINE multivar_expression & operator +=(basic_expression const & expr)
......@@ -450,6 +452,7 @@ namespace INMOST
hessian_entries.Clear();
return *this;
}
/*
__INLINE hessian_multivar_expression & operator = (basic_expression const & expr)
{
value = expr.GetValue();
......@@ -460,6 +463,8 @@ namespace INMOST
hessian_entries.Swap(htmp);
return *this;
}
*/
/*
__INLINE hessian_multivar_expression & operator = (multivar_expression const & other)
{
value = other.GetValue();
......@@ -467,6 +472,7 @@ namespace INMOST
hessian_entries.Clear();
return *this;
}
*/
__INLINE hessian_multivar_expression & operator = (hessian_multivar_expression const & other)
{
value = other.value;
......@@ -635,12 +641,13 @@ namespace INMOST
}
(void)multH;
}
__INLINE multivar_expression_reference & operator = (INMOST_DATA_REAL_TYPE pvalue)
multivar_expression_reference & operator = (INMOST_DATA_REAL_TYPE pvalue)
{
value = pvalue;
entries->Clear();
return *this;
}
__INLINE multivar_expression_reference & operator = (basic_expression const & expr)
{
value = expr.GetValue();
......@@ -654,18 +661,21 @@ namespace INMOST
}
return *this;
}
__INLINE multivar_expression_reference & operator = (multivar_expression_reference const & other)
{
value = other.GetValue();
*entries = other.GetRow();
return *this;
}
/*
__INLINE multivar_expression_reference & operator = (multivar_expression const & other)
{
value = other.GetValue();
*entries = other.GetRow();
return *this;
}
*/
__INLINE Sparse::Row & GetRow() {return *entries;}
__INLINE const Sparse::Row & GetRow() const {return *entries;}
__INLINE multivar_expression_reference & operator +=(basic_expression const & expr)
......@@ -1985,7 +1995,8 @@ namespace INMOST
template<class A>
class function_expression : public shell_expression< function_expression<A> > {
class function_expression : public shell_expression< function_expression<A> >
{
const A &arg;
INMOST_DATA_REAL_TYPE value, dmult, ddmult;
public:
......@@ -2190,31 +2201,31 @@ template<class A> __INLINE INMOST_DATA_REAL_TY
__INLINE void assign(INMOST::var_expression & Arg, const INMOST::var_expression & Val) {Arg = Val; }
__INLINE void assign(INMOST::multivar_expression & Arg, INMOST_DATA_INTEGER_TYPE Val) {Arg = (INMOST_DATA_REAL_TYPE)Val; }
__INLINE void assign(INMOST::multivar_expression & Arg, INMOST_DATA_REAL_TYPE Val) {Arg = Val; }
__INLINE void assign(INMOST::multivar_expression & Arg, const INMOST::var_expression & Val) {Arg = Val; }
__INLINE void assign(INMOST::multivar_expression & Arg, const INMOST::multivar_expression & Val) {Arg = Val; }
__INLINE void assign(INMOST::multivar_expression & Arg, const INMOST::multivar_expression_reference & Val) {Arg = Val; }
__INLINE void assign(INMOST::multivar_expression & Arg, const INMOST::hessian_multivar_expression & Val) {Arg = Val; }
__INLINE void assign(INMOST::multivar_expression & Arg, const INMOST::hessian_multivar_expression_reference & Val) {Arg = Val; }
// __INLINE void assign(INMOST::multivar_expression & Arg, const INMOST::var_expression & Val) {Arg = Val; }
// __INLINE void assign(INMOST::multivar_expression & Arg, const INMOST::multivar_expression & Val) {Arg = Val; }
// __INLINE void assign(INMOST::multivar_expression & Arg, const INMOST::multivar_expression_reference & Val) {Arg = Val; }
// __INLINE void assign(INMOST::multivar_expression & Arg, const INMOST::hessian_multivar_expression & Val) {Arg = Val; }
// __INLINE void assign(INMOST::multivar_expression & Arg, const INMOST::hessian_multivar_expression_reference & Val) {Arg = Val; }
__INLINE void assign(INMOST::multivar_expression_reference & Arg, INMOST_DATA_INTEGER_TYPE Val) {Arg = (INMOST_DATA_REAL_TYPE)Val; }
__INLINE void assign(INMOST::multivar_expression_reference & Arg, INMOST_DATA_REAL_TYPE Val) {Arg = Val; }
__INLINE void assign(INMOST::multivar_expression_reference & Arg, const INMOST::var_expression & Val) {Arg = Val; }
__INLINE void assign(INMOST::multivar_expression_reference & Arg, const INMOST::multivar_expression & Val) {Arg = Val; }
__INLINE void assign(INMOST::multivar_expression_reference & Arg, const INMOST::multivar_expression_reference & Val) {Arg = Val; }
__INLINE void assign(INMOST::multivar_expression_reference & Arg, const INMOST::hessian_multivar_expression & Val) {Arg = Val; }
// __INLINE void assign(INMOST::multivar_expression_reference & Arg, const INMOST::var_expression & Val) {Arg = Val; }
// __INLINE void assign(INMOST::multivar_expression_reference & Arg, const INMOST::multivar_expression & Val) {Arg = Val; }
// __INLINE void assign(INMOST::multivar_expression_reference & Arg, const INMOST::multivar_expression_reference & Val) {Arg = Val; }
// __INLINE void assign(INMOST::multivar_expression_reference & Arg, const INMOST::hessian_multivar_expression & Val) {Arg = Val; }
__INLINE void assign(INMOST::hessian_multivar_expression & Arg, INMOST_DATA_INTEGER_TYPE Val) {Arg = (INMOST_DATA_REAL_TYPE)Val; }
__INLINE void assign(INMOST::hessian_multivar_expression & Arg, INMOST_DATA_REAL_TYPE Val) {Arg = Val; }
__INLINE void assign(INMOST::hessian_multivar_expression & Arg, const INMOST::var_expression & Val) {Arg = Val; }
__INLINE void assign(INMOST::hessian_multivar_expression & Arg, const INMOST::multivar_expression & Val) {Arg = Val; }
__INLINE void assign(INMOST::hessian_multivar_expression & Arg, const INMOST::multivar_expression_reference & Val) {Arg = Val; }
__INLINE void assign(INMOST::hessian_multivar_expression & Arg, const INMOST::hessian_multivar_expression & Val) {Arg = Val; }
__INLINE void assign(INMOST::hessian_multivar_expression & Arg, const INMOST::hessian_multivar_expression_reference & Val) {Arg = Val; }
// __INLINE void assign(INMOST::hessian_multivar_expression & Arg, const INMOST::var_expression & Val) {Arg = Val; }
// __INLINE void assign(INMOST::hessian_multivar_expression & Arg, const INMOST::multivar_expression & Val) {Arg = Val; }
// __INLINE void assign(INMOST::hessian_multivar_expression & Arg, const INMOST::multivar_expression_reference & Val) {Arg = Val; }
// __INLINE void assign(INMOST::hessian_multivar_expression & Arg, const INMOST::hessian_multivar_expression & Val) {Arg = Val; }
// __INLINE void assign(INMOST::hessian_multivar_expression & Arg, const INMOST::hessian_multivar_expression_reference & Val) {Arg = Val; }
__INLINE void assign(INMOST::hessian_multivar_expression_reference & Arg, INMOST_DATA_INTEGER_TYPE Val) {Arg = Val; }
__INLINE void assign(INMOST::hessian_multivar_expression_reference & Arg, INMOST_DATA_REAL_TYPE Val) {Arg = Val; }
__INLINE void assign(INMOST::hessian_multivar_expression_reference & Arg, const INMOST::var_expression & Val) {Arg = Val; }
__INLINE void assign(INMOST::hessian_multivar_expression_reference & Arg, const INMOST::multivar_expression & Val) {Arg = Val; }
__INLINE void assign(INMOST::hessian_multivar_expression_reference & Arg, const INMOST::multivar_expression_reference & Val) {Arg = Val; }
__INLINE void assign(INMOST::hessian_multivar_expression_reference & Arg, const INMOST::hessian_multivar_expression & Val) {Arg = Val; }
__INLINE void assign(INMOST::hessian_multivar_expression_reference & Arg, const INMOST::hessian_multivar_expression_reference & Val) {Arg = Val; }
// __INLINE void assign(INMOST::hessian_multivar_expression_reference & Arg, const INMOST::var_expression & Val) {Arg = Val; }
// __INLINE void assign(INMOST::hessian_multivar_expression_reference & Arg, const INMOST::multivar_expression & Val) {Arg = Val; }
// __INLINE void assign(INMOST::hessian_multivar_expression_reference & Arg, const INMOST::multivar_expression_reference & Val) {Arg = Val; }
// __INLINE void assign(INMOST::hessian_multivar_expression_reference & Arg, const INMOST::hessian_multivar_expression & Val) {Arg = Val; }
// __INLINE void assign(INMOST::hessian_multivar_expression_reference & Arg, const INMOST::hessian_multivar_expression_reference & Val) {Arg = Val; }
template<class A> __INLINE void assign(INMOST_DATA_INTEGER_TYPE & Arg, const INMOST::shell_expression<A> & Val) {Arg = (INMOST_DATA_REAL_TYPE)Val.GetValue();}
template<class A> __INLINE void assign(INMOST_DATA_REAL_TYPE & Arg, const INMOST::shell_expression<A> & Val) {Arg = Val.GetValue();}
template<class A> __INLINE void assign(INMOST::multivar_expression & Arg, const INMOST::shell_expression<A> & Val) {Arg = Val;}
......
......@@ -4,13 +4,13 @@ endif(USE_MESH)
if(USE_AUTODIFF)
add_subdirectory(autodiff_test000)
#add_subdirectory(autodiff_test001)
add_subdirectory(autodiff_test001)
add_subdirectory(autodiff_test002)
endif(USE_AUTODIFF)
if(USE_SOLVER)
add_subdirectory(solver_test000)
add_subdirectory(solver_test001)
#add_subdirectory(solver_test001)
add_subdirectory(solver_test002)
add_subdirectory(solver_test003)
endif(USE_SOLVER)
......
Markdown is supported
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