Commit 50b240fc authored by Kirill Terekhov's avatar Kirill Terekhov

Fix some warnings on VS; Add tool to produce STL file from mesh boundaries

parent ca1e913c
......@@ -8,6 +8,7 @@ add_executable(Slice slice.cpp)
add_executable(SliceFunc slice_func.cpp)
add_executable(SplitNonplanar split_nonplanar.cpp)
add_executable(CollapseDegenerate collapse_degenerate.cpp)
add_executable(Bnd2Stl bnd2stl.cpp)
target_link_libraries(FixFaults inmost)
if(USE_MPI)
......@@ -95,4 +96,14 @@ endif(USE_MPI)
install(TARGETS CollapseDegenerate EXPORT inmost-targets RUNTIME DESTINATION bin)
target_link_libraries(Bnd2Stl inmost)
if(USE_MPI)
message("linking Bnd2Stl with MPI")
target_link_libraries(Bnd2Stl ${MPI_LIBRARIES})
if(MPI_LINK_FLAGS)
set_target_properties(Bnd2Stl PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
endif()
endif(USE_MPI)
install(TARGETS Bnd2Stl EXPORT inmost-targets RUNTIME DESTINATION bin)
......@@ -795,14 +795,18 @@ namespace INMOST
///Exchange contents of two matrices.
void Swap(AbstractMatrix<Var> & b)
{
if( dynamic_cast<Matrix<Var,storage_type> *>(&b) != NULL )
#if defined(_CPPRTTI) || defined(__GXX_RTTI)
Matrix<Var,storage_type> * bb = dynamic_cast<Matrix<Var,storage_type> *>(&b);
if( bb != NULL )
{
Matrix<Var,storage_type> & bb = dynamic_cast<Matrix<Var,storage_type> &>(b);
space.swap(bb.space);
std::swap(n,bb.n);
std::swap(m,bb.m);
space.swap((*bb).space);
std::swap(n,(*bb).n);
std::swap(m,(*bb).m);
}
else AbstractMatrix<Var>::Swap(b);
#else //_CPPRTTI
AbstractMatrix<Var>::Swap(b);
#endif //_CPPRTTI
}
/// Construct empty matrix.
Matrix() : space(), n(0), m(0) {}
......
......@@ -1880,10 +1880,10 @@ template<class A> __INLINE INMOST_DATA_REAL_TY
__INLINE void set_value(INMOST::multivar_expression_reference & Arg, const INMOST::multivar_expression & Val) {Arg.SetValue(Val.GetValue()); }
__INLINE void set_value(INMOST::multivar_expression_reference & Arg, const INMOST::multivar_expression_reference & Val) {Arg.SetValue(Val.GetValue()); }
__INLINE void assign(INMOST::var_expression & Arg, INMOST_DATA_REAL_TYPE Val) {Arg = Val;}
__INLINE void assign(INMOST_DATA_INTEGER_TYPE & Arg, INMOST_DATA_REAL_TYPE Val) {Arg = Val;}
__INLINE void assign(INMOST_DATA_INTEGER_TYPE & Arg, const INMOST::var_expression & Val) {Arg = Val.GetValue();}
__INLINE void assign(INMOST_DATA_INTEGER_TYPE & Arg, const INMOST::multivar_expression & Val) {Arg = Val.GetValue();}
__INLINE void assign(INMOST_DATA_INTEGER_TYPE & Arg, const INMOST::multivar_expression_reference & Val) {Arg = Val.GetValue();}
__INLINE void assign(INMOST_DATA_INTEGER_TYPE & Arg, INMOST_DATA_REAL_TYPE Val) {Arg = (INMOST_DATA_INTEGER_TYPE)Val;}
__INLINE void assign(INMOST_DATA_INTEGER_TYPE & Arg, const INMOST::var_expression & Val) {Arg = (INMOST_DATA_INTEGER_TYPE)Val.GetValue();}
__INLINE void assign(INMOST_DATA_INTEGER_TYPE & Arg, const INMOST::multivar_expression & Val) {Arg = (INMOST_DATA_INTEGER_TYPE)Val.GetValue();}
__INLINE void assign(INMOST_DATA_INTEGER_TYPE & Arg, const INMOST::multivar_expression_reference & Val) {Arg = (INMOST_DATA_INTEGER_TYPE)Val.GetValue();}
__INLINE void assign(INMOST_DATA_REAL_TYPE & Arg, const INMOST::var_expression & Val) {Arg = Val.GetValue();}
__INLINE void assign(INMOST_DATA_REAL_TYPE & Arg, const INMOST::multivar_expression & Val) {Arg = Val.GetValue();}
__INLINE void assign(INMOST_DATA_REAL_TYPE & Arg, const INMOST::multivar_expression_reference & Val) {Arg = Val.GetValue();}
......
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