Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • lisa_julia.nebel_at_tu-dresden.de/dune-solvers
  • patrick.jaap_at_tu-dresden.de/dune-solvers
  • burchardt_at_igpm.rwth-aachen.de/dune-solvers
  • agnumpde/dune-solvers
4 results
Select Git revision
Show changes
Commits on Source (60)
Showing
with 134 additions and 116 deletions
---
# Install external dependencies
before_script:
- duneci-install-module https://git.imp.fu-berlin.de/agnumpde/dune-matrix-vector.git
dune:git clang C++17:
image: registry.dune-project.org/docker/ci/dune:git-debian-10-clang-7-libcpp-17
# For release-based jobs, we use corresponding images,
# that already contain all core and staging dependencies.
.release_based_job:
before_script:
- duneci-install-module https://gitlab.dune-project.org/fufem/dune-matrix-vector.git
# For branch-based-based jobs, we need to install all dependencies manually.
.branch_base_job:
before_script:
- . /duneci/bin/duneci-init-job
- duneci-install-module https://gitlab.dune-project.org/core/dune-common.git
- duneci-install-module https://gitlab.dune-project.org/core/dune-geometry.git
- duneci-install-module https://gitlab.dune-project.org/core/dune-localfunctions.git
- duneci-install-module https://gitlab.dune-project.org/staging/dune-uggrid.git
- duneci-install-module https://gitlab.dune-project.org/core/dune-grid.git
- duneci-install-module https://gitlab.dune-project.org/core/dune-istl.git
- duneci-install-module https://gitlab.dune-project.org/fufem/dune-matrix-vector.git
# The 2.9 release is the one in Debian 12 ('bookworm', 'stable' at the time of writing)
dune:2.9 debian-11 gcc-10 C++20:
extends: .release_based_job
variables:
DUNECI_BRANCH: releases/2.9
image: registry.dune-project.org/docker/ci/dune:2.9-debian-11-gcc-10-20
script: duneci-standard-test
dune:git gcc-9 C++20:
image: registry.dune-project.org/docker/ci/dune:git-debian-11-gcc-9-20
# The 2.10 release is the one in Debian 13 ('trixie', 'testing' at the time of writing)
# To test against 2.10 we need an image with the corresponding version of the core modules.
# Unfortunately, there is no 2.10 image with a recent enough compiler.
dune:2.10 debian-11 gcc-10 C++20:
extends: .release_based_job
variables:
DUNECI_BRANCH: releases/2.10
image: registry.dune-project.org/docker/ci/dune:2.10-debian-11-gcc-10-20
script: duneci-standard-test
dune:git gcc-8 C++17:
image: registry.dune-project.org/docker/ci/dune:git-debian-10-gcc-8-17
# Also test with the current development branch
dune:git debian-11 clang-13 C++20:
extends: .branch_base_job
# image: registry.dune-project.org/docker/ci/dune:git-debian-11-clang-13-20
image: registry.dune-project.org/docker/ci/debian:11
variables:
DUNECI_TOOLCHAIN: clang-13-20
script: duneci-standard-test
dune:git debian-11 gcc-10 C++20:
extends: .branch_base_job
# image: registry.dune-project.org/docker/ci/dune:git-debian-11-gcc-10-20
image: registry.dune-project.org/docker/ci/debian:11
variables:
DUNECI_TOOLCHAIN: gcc-10-20
script: duneci-standard-test
# Check for spelling mistakes in text
code-spelling-check:
stage: .pre
# Avoid the global 'before_script'
before_script: ""
image: registry.dune-project.org/docker/ci/debian:11
script:
- codespell
--ignore-words-list foo,bar
# Master (will become release 2.8)
# Master (will become release 2.11)
- ...
# Release 2.10
- Deprecate the file `tuplevector.hh`. An equivalent file exists in `dune-common`
since 2016. Please use that from now on.
- `UMFPackSolver` accepts each correctly formed blocked matrix. The user has to make sure that the vector types of `x` and `rhs` are compatible to the matrix.
The main advantage is that it is now possible to use `MultiTypeBlockMatrix`.
- A new solver `ProximalNewtonSolver` is added which solves non-smooth minimization problems.
# Release 2.9
- The internal matrix of the`EnergyNorm` can now be accessed by `getMatrix()`.
- The default `BitVectorType` of the class `IterationStep` is now
`Solvers::DefaultBitVector_t<VectorType>` rather than `Dune::BitSetVector`.
This should do the right thing in more situations, while being fully
backward-compatible.
- `codespell` spell checker is now active for automated spell checking in the Gitlab CI.
To exclude false positives add the words to the `--ignore-words-list` in `.gitlab-ci.yml`.
# Release 2.8
- `UMFPackSolver` can now handle matrices and vectors with scalar entries.
......@@ -6,6 +32,9 @@
- CholmodSolver: `CholmodSolver` can be used with any blocked matrix/vector type supported by `flatMatrixForEach` and `flatVectorForEach` in dune-istl.
- CholmodSolver: There are now various new methods that allow to factorize the matrix once,
and use the factorization to solve linear systems with several right hand sides.
## Deprecations and removals
- The file `blockgsstep.hh` has been removed after four years of deprecation. Use the replacement
......
cmake_minimum_required(VERSION 2.8.6)
if(dune-common_VERSION VERSION_GREATER_EQUAL 2.10.0)
cmake_minimum_required(VERSION 3.16)
else()
cmake_minimum_required(VERSION 3.13)
endif()
project(dune-solvers CXX)
if(NOT (dune-common_DIR OR dune-common_ROOT OR
......@@ -22,9 +26,17 @@ dune_project()
find_package(SuiteSparse OPTIONAL_COMPONENTS UMFPACK)
include(AddSuiteSparseFlags)
# Create library target and export it as Dune::Solvers
dune_add_library(dunesolvers EXPORT_NAME Solvers LINK_LIBRARIES ${DUNE_LIBS})
dune_register_package_flags(LIBRARIES dunesolvers)
add_subdirectory("dune")
add_subdirectory("doc")
add_subdirectory("cmake/modules")
# finalize the dune project, e.g. generating config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
if(dune-common_VERSION VERSION_GREATER_EQUAL 2.10.0)
finalize_dune_project()
else()
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
endif()
......@@ -7,7 +7,7 @@ function(add_dune_ipopt_flags _targets)
set_target_properties(${_target} PROPERTIES COMPILE_FLAGS
"${_props} ${DUNE_IPOPT_CFLAGS}")
if(NOT ADD_DUNE_IPOPT_FLAGS_OBJECT)
target_link_libraries(${_target} ${IPOPT_LIBRARY})
target_link_libraries(${_target} PUBLIC ${IPOPT_LIBRARY})
endif()
endforeach(_target ${_targets})
endif(IPOPT_FOUND)
......
......@@ -9,12 +9,12 @@ find_library(DL_LIBRARY dl)
find_path(IPOPT_INCLUDE_DIR
NAMES "IpNLP.hpp"
PATHS ${IPOPT_ROOT}
PATH_SUFFIXES "include" "include/coin"
PATH_SUFFIXES "include" "include/coin" "include/coin-or"
NO_DEFAULT_PATH
)
find_path(IPOPT_INCLUDE_DIR
NAMES "IpNLP.hpp"
PATH_SUFFIXES "include" "include/coin"
PATH_SUFFIXES "include" "include/coin" "include/coin-or"
)
find_library(IPOPT_LIBRARY
......@@ -40,7 +40,7 @@ find_library(HSL_LIBRARY
find_package_handle_standard_args(hsl DEFAULT_MSG HSL_LIBRARY)
find_package_handle_standard_args(dl DEFAULT_MSG DL_LIBRARY)
find_package_handle_standard_args(Ipopt DEFAULT_MSG IPOPT_INCLUDE_DIR IPOPT_LIBRARY)
find_package_handle_standard_args(IPOpt DEFAULT_MSG IPOPT_INCLUDE_DIR IPOPT_LIBRARY)
if(IPOPT_FOUND)
set(HAVE_IPOPT ENABLE_IPOPT)
......
......@@ -21,7 +21,7 @@ CHANGES REQUIRING CODE ADAPTATION
---------------------------------------------------------------------------------------
CHANGES POSSIBLY AFFECTING PERFOMANCE (INCLUDING BUGFIXES)
CHANGES POSSIBLY AFFECTING PERFORMANCE (INCLUDING BUGFIXES)
----------------------------------------------------------
----------------------------------------------------------
......
......@@ -4,7 +4,7 @@
#Name of the module
Module: dune-solvers
Version: 2.8-git
Version: 2.11-git
Maintainer: oliver.sander@tu-dresden.de
#depending on
Depends: dune-common dune-grid dune-istl dune-localfunctions dune-matrix-vector
......
dune_add_library("dunesolvers"
iterationsteps/blockgssteps.cc
solvers/criterion.cc)
dune_register_package_flags(LIBRARIES dunesolvers)
add_subdirectory("common")
add_subdirectory("iterationsteps")
add_subdirectory("norms")
......@@ -12,6 +6,10 @@ add_subdirectory("solvers")
add_subdirectory("test")
add_subdirectory("transferoperators")
target_sources(dunesolvers PRIVATE
iterationsteps/blockgssteps.cc
solvers/criterion.cc)
install(FILES
computeenergy.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/solvers)
install(FILES
arithmetic.hh
boxconstraint.hh
canignore.hh
copyorreference.hh
......
// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=8 sw=4 sts=4:
#ifndef ARITHMETIC_HH
#define ARITHMETIC_HH
#warning arithmetic.hh is deprecated, please use dune-matrix-vector instead!
#include <dune/matrix-vector/axpy.hh>
#include <dune/matrix-vector/axy.hh>
#include <dune/matrix-vector/crossproduct.hh>
#include <dune/matrix-vector/matrixtraits.hh>
#include <dune/matrix-vector/promote.hh>
#include <dune/matrix-vector/scalartraits.hh>
#include <dune/matrix-vector/transpose.hh>
namespace Arithmetic
{
using Dune::MatrixVector::Promote;
using Dune::MatrixVector::ScalarTraits;
using Dune::MatrixVector::MatrixTraits;
using Dune::MatrixVector::Transposed;
using Dune::MatrixVector::addProduct;
using Dune::MatrixVector::subtractProduct;
using Dune::MatrixVector::crossProduct;
using Dune::MatrixVector::transpose;
using Dune::MatrixVector::Axy;
using Dune::MatrixVector::bmAxy;
}
#endif
......@@ -10,7 +10,7 @@
#include <dune/istl/bvector.hh>
#include <dune/istl/multitypeblockvector.hh>
#include <dune/solvers/common/tuplevector.hh>
#include <dune/common/tuplevector.hh>
namespace Dune {
namespace Solvers {
......
......@@ -34,7 +34,7 @@ struct GenericVector
//! Write vector to given stream
template <class VectorType>
DUNE_DEPRECATED_MSG("Please use Dune::MatrixVector::Generic::writeBinary instead.")
[[deprecated("Please use Dune::MatrixVector::Generic::writeBinary instead.")]]
static void writeBinary(std::ostream& s, const VectorType& v)
{
Dune::MatrixVector::Generic::writeBinary(s, v);
......@@ -42,23 +42,23 @@ struct GenericVector
//! Read vector from a given stream
template <class VectorType>
DUNE_DEPRECATED_MSG("Please use Dune::MatrixVector::Generic::readBinary instead.")
[[deprecated("Please use Dune::MatrixVector::Generic::readBinary instead.")]]
static void readBinary(std::istream& s, VectorType& v)
{
Dune::MatrixVector::Generic::readBinary(s, v);
}
//! Resize vector recursivly to size of given vector/matrix
//! Resize vector recursively to size of given vector/matrix
template <class VectorTypeA, class VectorTypeB>
DUNE_DEPRECATED_MSG("Please use Dune::MatrixVector::resize instead.")
[[deprecated("Please use Dune::MatrixVector::resize instead.")]]
static void resize(VectorTypeA& a, const VectorTypeB& b)
{
Dune::MatrixVector::resize(a, b);
}
//! Set vector to zero at indices that are true in bitvector recursivly
//! Set vector to zero at indices that are true in bitvector recursively
template <class VectorType, class BitVectorType>
DUNE_DEPRECATED_MSG("Please use Dune::MatrixVector::Generic::truncate instead.")
[[deprecated("Please use Dune::MatrixVector::Generic::truncate instead.")]]
static void truncate(VectorType& v, const BitVectorType& tr)
{
Dune::MatrixVector::Generic::truncate(v, tr);
......@@ -183,7 +183,7 @@ struct GenericVector
struct GenericMatrix
{
//! Set matrix to zero at indices that are true in bitvector recursivly
//! Set matrix to zero at indices that are true in bitvector recursively
template <class MatrixType, class BitVectorTypeR, class BitVectorTypeC>
static void truncate(MatrixType& mat, const BitVectorTypeR& trows, const BitVectorTypeC& tcols, bool setTruncatedDiagonalOne)
{
......
......@@ -16,7 +16,7 @@ public:
/** \brief Different levels of verbosity */
enum VerbosityMode {QUIET, REDUCED, FULL};
/** \brief Constructor, per defaut uses FULL. */
/** \brief Constructor, per default uses FULL. */
NumProc(VerbosityMode verbosity = FULL)
: verbosity_(verbosity)
{}
......
......@@ -15,7 +15,7 @@
//! Idea of implementation: define an ordering for the nodes (with respect to the axis of anisotropy)
//! and then use a merge sort algorithm to renumerate the nodes along the lines which are parallel to this axis.
//! to do so, we introduce a 'NodeList' class.
//! everything is handeled by the PermutationManager
//! everything is handled by the PermutationManager
// type of nodes:
......@@ -151,7 +151,7 @@ public:
// the information about the axis of anisotropy is in NodeList, since this list contains a methode "less_equal", which describes the ordering of the nodes.
// the information about the axis of anisotropy is in NodeList, since this list contains a method "less_equal", which describes the ordering of the nodes.
// this ordering depends on the axis of anisotropy
template< class GridViewImp >
class PermutationManager{
......@@ -430,9 +430,9 @@ public:
for( int i = 0; i < node_list_.size(); ++i )
{
std::cout << "Original node[" << get_inverse_permuted_index( i ) << "] = (" << node_list_[i].get_global_coordinate() << ") recieved permuted index " << i << std::endl;
std::cout << "Original node[" << get_inverse_permuted_index( i ) << "] = (" << node_list_[i].get_global_coordinate() << ") received permuted index " << i << std::endl;
// alternative:
//std::cout << "Original node[" << get_inverse_permuted_index( i ) << "] = (" << original_node_list_[get_inverse_permuted_index( i )].get_global_coordinate() << ") recieved permuted index " << i << std::endl;
//std::cout << "Original node[" << get_inverse_permuted_index( i ) << "] = (" << original_node_list_[get_inverse_permuted_index( i )].get_global_coordinate() << ") received permuted index " << i << std::endl;
}
#if 0
......
......@@ -16,8 +16,6 @@
#include <dune/matrix-vector/scalartraits.hh>
#include <dune/matrix-vector/transformmatrix.hh>
#include "arithmetic.hh"
namespace StaticMatrix
{
// type promotion (smallest matrix that can hold the sum of two matrices *******************
......
......@@ -3,9 +3,9 @@
#ifndef DUNE_SOLVERS_COMMON_TUPLEVECTOR_HH
#define DUNE_SOLVERS_COMMON_TUPLEVECTOR_HH
#include <tuple>
#warning This file is deprecated! Use tuplevector.hh from the dune-common module instead!
#include <dune/common/indices.hh>
#include <dune/common/tuplevector.hh>
namespace Dune
{
......@@ -16,45 +16,7 @@ namespace Solvers
* \brief A std::tuple that allows access to its element via operator[]
*/
template<class... T>
class TupleVector : public std::tuple<T...>
{
using Base = std::tuple<T...>;
public:
/** \brief Construct from a set of arguments */
template<class... TT>
constexpr TupleVector(TT&&... tt) :
Base(std::forward<TT>(tt)...)
{}
/** \brief Default constructor */
constexpr TupleVector()
{}
/** \brief Const access to the tuple elements */
template<std::size_t i>
auto operator[](const Dune::index_constant<i>&) const
->decltype(std::get<i>(*this))
{
return std::get<i>(*this);
}
/** \brief Non-const access to the tuple elements */
template<std::size_t i>
auto operator[](const Dune::index_constant<i>&)
->decltype(std::get<i>(*this))
{
return std::get<i>(*this);
}
/** \brief Number of elements of the tuple */
static constexpr std::size_t size()
{
return std::tuple_size<Base>::value;
}
};
using TupleVector = Dune::TupleVector<T...>;
} // namespace Functions
......
......@@ -3,6 +3,7 @@
#include <cassert>
#include <functional>
#include <type_traits>
#include <dune/common/parametertree.hh>
......@@ -181,7 +182,7 @@ template <class LinearSolver>
auto truncateSymmetrically(LinearSolver&& linearSolver) {
return [linearSolver = std::move(linearSolver) ](
const auto& m, const auto& b, const auto& ignore) {
using Return = typename std::result_of<LinearSolver(decltype(m), decltype(b))>::type;
using Return = std::invoke_result_t<LinearSolver, decltype(m), decltype(b)>;
if (ignore.all())
return Return(0);
......
......@@ -6,8 +6,8 @@
#include <vector>
#include <string>
#include <dune/common/bitsetvector.hh>
#include <dune/solvers/common/canignore.hh>
#include <dune/solvers/common/defaultbitvector.hh>
#include <dune/solvers/common/numproc.hh>
namespace Dune {
......@@ -15,7 +15,7 @@ namespace Dune {
namespace Solvers {
//! Base class for iteration steps being called by an iterative solver
template<class VectorType, class BitVectorType = Dune::BitSetVector<VectorType::block_type::dimension> >
template<class VectorType, class BitVectorType = Solvers::DefaultBitVector_t<VectorType> >
class IterationStep : virtual public NumProc, public CanIgnore<BitVectorType>
{
public:
......
......@@ -23,7 +23,7 @@ void LineGSStep<MatrixType, DiscFuncType, BitVectorType >::iterate()
const int current_block_size = blockStructure_[b_num].size();
//! compute and save the residuals for the curent block:
//! compute and save the residuals for the current block:
// determine the (permuted) residuals r[p(i)],..., r[p(i+current_block_size-1)]
// this means that we determine the residuals for the current block
DiscFuncType permuted_r_i(current_block_size);
......
......@@ -44,7 +44,7 @@ public:
virtual void iterate();
/** \brief To be called before starting to iterate
\note This calls the preprocess method for the dependant iteration step class, too!
\note This calls the preprocess method for the dependent iteration step class, too!
*/
virtual void preprocess();
......