Skip to content
Snippets Groups Projects
Commit 1155f802 authored by Oliver Sander's avatar Oliver Sander
Browse files
parents e8d9d2d9 72330c52
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ find_library(AMD_LIBRARY
)
if(NOT AMD_LIBRARY)
message(WARNING "UMFPack requires AMD which was not found, skipping the test.")
message(WARNING "UMFPack requires AMD (approximate minimum degree ordering) which was not found, skipping the test.")
return()
endif()
......@@ -59,19 +59,7 @@ find_library(UMFPACK_LIBRARY
PATH_SUFFIXES "lib" "lib32" "lib64" "UMFPACK" "UMFPACK/Lib"
)
if(UMFPACK_INCLUDE_DIR)
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${UMFPACK_INCLUDE_DIR} ${AMD_INCLUDE_DIR})
endif()
if(UMFPACK_LIBRARY)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${UMFPACK_LIBRARY})
endif()
if(BLAS_LIBRARIES)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${BLAS_LIBRARIES})
endif()
if(AMD_LIBRARY)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${AMD_LIBRARY})
endif()
# behave like a CMake module is supposed to behave
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
"UMFPack"
......@@ -82,9 +70,11 @@ find_package_handle_standard_args(
mark_as_advanced(UMFPACK_INCLUDE_DIR UMFPACK_LIBRARY)
# if both headers and library are found, store results
if(UMFPACK_FOUND)
set(UMFPACK_INCLUDE_DIRS ${UMFPACK_INCLUDE_DIR})
set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARY})
# log result
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining location of UMFPack succeded:\n"
"Include directory: ${UMFPACK_INCLUDE_DIRS}\n"
......@@ -92,8 +82,9 @@ if(UMFPACK_FOUND)
set(UMFPACK_DUNE_COMPILE_FLAGS "-I${UMFPACK_INCLUDE_DIRS}"
CACHE STRING "Compile Flags used by DUNE when compiling with UMFPack programs")
set(UMFPACK_DUNE_LIBRARIES ${UMFPACK_LIBRARIES} ${BLAS_LIBRARIES} ${AMD_LIBRARY}
CACHE STRING "LIbraries used by DUNE when linking UMFPack programs")
CACHE STRING "Libraries used by DUNE when linking UMFPack programs")
else(UMFPACK_FOUND)
# log errornous result
file(APPEND ${CMAKE_BINARY_DIR}${CMAKES_FILES_DIRECTORY}/CMakeError.log
"Determing location of UMFPack failed:\n"
"Include directory: ${UMFPACK_INCLUDE_DIRS}\n"
......@@ -109,4 +100,4 @@ if(UMFPACK_FOUND)
foreach(dir "${UMFPACK_INCLUDE_DIRS}")
set_property(GLOBAL APPEND PROPERTY ALL_PKG_FLAGS "-I${dir}")
endforeach()
endif()
\ No newline at end of file
endif()
......@@ -49,7 +49,7 @@ macro(finalize_headercheck)
foreach(header ${headerlist})
#do some name conversion
string(REGEX REPLACE ".*/([^/]*)" "\\1" simple ${header})
string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/(.*)" "\\1" rel ${header})
string(REPLACE ${PROJECT_SOURCE_DIR} "" rel ${header})
string(REGEX REPLACE "(.*)/[^/]*" "\\1" relpath ${rel})
string(REGEX REPLACE "/" "_" targname ${rel})
......@@ -67,5 +67,6 @@ macro(finalize_headercheck)
set_property(TARGET headercheck_${targname} APPEND_STRING PROPERTY COMPILE_FLAGS "-DHEADERCHECK -I${PROJECT_SOURCE_DIR}/${relpath} -I${CMAKE_BINARY_DIR}")
set_property(TARGET headercheck_${targname} PROPERTY ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/headercheck/${relpath}")
add_dune_all_flags(headercheck_${targname})
unset(headercheck_${targname}_LIB_DEPENDS CACHE)
endforeach(header ${headerlist})
endmacro(finalize_headercheck)
......@@ -160,6 +160,9 @@
/* Define to 1 if initializer list is supported */
#cmakedefine HAVE_INITIALIZER_LIST 1
/* Define to if the UMFPack library is available */
#cmakedefine HAVE_UMFPACK ENABLE_UMFPACK
/* Include always useful headers */
#include <dune/common/deprecated.hh>
#include <dune/common/unused.hh>
......
......@@ -228,6 +228,13 @@ namespace Dune {
V & asImp() { return static_cast<V&>(*this); }
const V & asImp() const { return static_cast<const V&>(*this); }
// prohibit copying
DenseVector ( const DenseVector & );
protected:
// construction allowed to derived classes only
DenseVector () {}
public:
//===== type definitions and constants
......
......@@ -240,6 +240,11 @@ namespace Dune {
_data = x[0];
}
//! copy constructor
FieldVector ( const FieldVector &other )
: _data( other._data )
{}
//! Assignment operator for scalar
inline FieldVector& operator= (const K& k)
{
......
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