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

Target

Select target project
  • jakub.both/dune-istl
  • eduardo.bueno/dune-istl
  • tkoch/dune-istl
  • pipping/dune-istl
  • andreas.brostrom/dune-istl
  • stephan.hilb/dune-istl
  • max.kahnt/dune-istl
  • patrick.jaap/dune-istl
  • tobias.meyer.andersen/dune-istl
  • andreas.thune/dune-istl
  • dominic/dune-istl
  • ansgar/dune-istl
  • exadune/dune-istl
  • lars.lubkoll/dune-istl
  • govind.sahai/dune-istl
  • maikel.nadolski/dune-istl
  • markus.blatt/dune-istl
  • core/dune-istl
  • lisa_julia.nebel/dune-istl
  • michael.sghaier/dune-istl
  • liesel.schumacher/dune-istl
  • Xinyun.Li/dune-istl
  • lukas.renelt/dune-istl
  • simon.praetorius/dune-istl
  • rene.milk/dune-istl
  • lasse.hinrichsen/dune-istl
  • nils.dreier/dune-istl
  • claus-justus.heine/dune-istl
  • felix.mueller/dune-istl
  • kilian.weishaupt/dune-istl
  • lorenzo.cerrone/dune-istl
  • jakob.torben/dune-istl
  • liam.keegan/dune-istl
  • alexander.mueller/dune-istl
34 results
Show changes
Commits on Source (968)
Showing
with 861 additions and 283 deletions
# SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
# SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
*~
/build*/
# ignore files generated during python setup.py sdist
MANIFEST
_skbuild/
dist
*.egg-info/
# ignore macOS filesystem
.DS_Store
# SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
# SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
---
include:
- "https://gitlab.dune-project.org/core/ci-config/raw/master/config/common/master.yml"
- "https://gitlab.dune-project.org/core/ci-config/raw/master/jobs/common/master.yml"
- project: 'core/ci-config'
ref: master
file: 'config/common/master.yml'
- project: 'core/ci-config'
ref: master
file: 'jobs/common/master.yml'
before_script:
- duneci-install-module https://gitlab.dune-project.org/core/dune-common.git
......@@ -14,3 +21,24 @@ variables:
# number of cores. We solve the issue by disallowing OpenMP to allocate more
# than one thread.
OMP_NUM_THREADS: 1
# 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
tags: [duneci]
script:
- codespell
--ignore-words-list ba,eiter,equil,fo,parms
reuse:
stage: .pre
image:
name: docker.io/fsfe/reuse:latest
entrypoint: [""]
tags: [duneci]
before_script: ""
script:
- reuse lint
# Master (will become release 2.7)
<!--
SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
-->
- Deprecated the preconditioner implementations `SeqILU0` and `SeqILUn`.
Use `SeqILU` instead, which implements incomplete LU decomposition
of any order.
# Master (will become release 2.11)
- `FastAMG` can now be used with non-nested matrices of type `BCRSMatrix<T>`
where `T` is a plain number type instead of `FieldMatrix<T,m,n>`.
# Release 2.10
- Improve testing support on Laplacian matrices with an optional diagonal regularization parameter.
- Base the implementation of `VariableBlockVector` on `std::vector` as the storage type. Note that
this prevents from using `bool` as block type that was possible before.
- A method `BCRSMatrix::setIndicesNoSort()` was added. Similar
to `BCRSMatrix::setIndices()` this allows to insert all indices
of a row at once, but - incontrast to the latter - does not sort them.
This allows to speed up insertion if indices are already sorted.
- `UMFPACK` is extended to arbitrary blocked matrix structures. This includes `MultiTypeBlockMatrix`. The external interface is unchanged.
However, internally the `BCCSMatrixInitializer` is replaced by direct calls of `flatMatrixForEach` similar to `Cholmod`. This requires a
compatible vector field of "ignored" degrees of freedom. The method `setSubMatrix` with a top-level index set is preserved for compatibility.
- The internal storage in `MatrixIndexSet` was changed from `std::set` to a sorted `std::vector`
(with a `std::set` fallback for very dense rows) to improve performance. The stored index
type was changed from `std::size_t` to `uint32_t` to reduce memory consumption and improve
performance. Hence, `MatrixIndexSet` can no longer be used for very large matrices with more
than 2^32 columns.
- Added flag 'useFixedOrder' to the coarsen method of AMGs ParallelIndicesCoarsener.
If set to true, during the creation of the coarser matrix (by accumulation and restriction
to fewer processes) the coarse matrix rows are ordered in a fixed manner, making parallel runs
reproducible; the runtime is possibly not ideal though.
If set to false (which is the default), the row order depends on the order of messages received from the
processes responsible for the respective parts of the finer grid. Then the indices on the coarser grid
may differ from run to run.
- Define `field_type` and `real_type` in `MultiTypeBlock[Matrix|Vector]` only if a common type of these
types exist over all blocks in the container. Otherwise it is defined as `Std::nonesuch`.
## Deprecations and removals
- The deprecated CMake variables `SUPERLU_INCLUDE_DIRS`, `SUPERLU_LIBRARIES`,
`SUPERLU_DUNE_COMPILE_FLAGS`, and `SUPERLU_DUNE_LIBRARIES` are removed, they are
replaced by the target `SuperLU::SuperLU`.
- Multiple containers no longer provide the deprecated member function `blocklevel`. Use the free function
`blockLevel()`.
- Removed deprecated function `initSolverFactories()`, use `initSolverFactories<O>` instead.
- Removed deprecated `MultyTypeBlockMatrix::size()`, use `N()` instead.
- Removed deprecated `MultyTypeBlockVector::count()`, use `N()` instead.
- Deprecated `writeSVGMatrix` with `std::stream` as the second argument. Use the method
with `std::stream` as the first argument.
# Release 2.9
- Add `const` qualifier to `LinearOperator` and `ScalarProduct` in
`IterativeSolver`. In particular, the constructors of iterative solvers have
changed.
- Solvers are more robust if used with multiple right-hand sides and one lane starts with the exact solution.
- Added a function to write nested matrices as SVG objects: `writeSVGMatrix(...)`
- `MultiTypeBlockVector` uses now `std::common_type` of the entries for the `field_type`. The old `double`
default is replaced by `Std::nonesuch` of an empty `MultiTypeBlockVector`.
- All vector implementations require a `FieldTraits` class specialization to export `field_type` and `real_type`
in order to work with blocked ISTL vector types.
- MINRES: The algorithm computes the preconditioned defect during the iterations. However, the initial
defect was computed as the defect of the original/non-preconditioned system. This is now changed so
that the initial defect is also computed as the preconditioned defect (this is also in line with GMRes).
In some numerical tests with a Stokes system this lead to earlier termination when using the same
termination criterion.
- The `Cholmod` class now provides access to the `cholmod_factor` class that is
used by `CHOLMOD` itself to store the Cholesky factor. This can be used to
use the more advanced features of `CHOLMOD`.
- The `Cholmod` class now has an additional template parameter `Index`, which specifies the
type used by `CHOLMOD` for integers. The types `int` (the default) and `SuiteSparse_long`
(which is usually `long int`) are supported. Use `SuiteSparse_long` if your problems
are too big for `int`.
- You can now multiply objects of type `ScaledIdentityMatrix` by scalars
using `operator*`.
- You can now use `std::tuple_element` to get the types of `MultiTypeBlockVector` entries
and `MultiTypeBlockMatrix` rows.
- The SPQR solver can now work with non-square matrices (a bug which caused a segfault when previously
attempting to do it was found and resolved).
## Deprecations and removals
- The deprecated ILU functions `bilu_backsolve`, `bilu0_decomposition`, `bilu_backsolve`,
`firstmatrixelement`, and `bilu_decomposition` are removed. Use their camel case
replacements.
- Remove deprecated `ImplicitModeOverflowExhausted`, use
`ImplicitModeCompressionBufferExhausted` instead.
# Release 2.8
- Extended the MatrixMarket IO functions for reading and writing vectors with
SIMD field_type as tall-skinny matrices.
- Added public access of the `cholmod_common` object in class `Cholmod`.
- Python bindings have been moved from the `dune-python` module which is now
obsolete.
Note that for `dune-istl` bindings are still very much work in progress.
To activate Python bindings the CMake flag
`DUNE_ENABLE_PYTHONBINDINGS` needs to be turned on (default is off).
Furthermore, flags for either shared library or position independent code
needs to be used.
- Added new utility functions templates `maxBlockLevel`, `minBlockLevel`, `blockLevel` in `dnue/istl/blocklevel.hh` to
automatically determine the block level of possibly nested ISTL vectors & matrices at compile time.
The block level cannot be always uniquely determined for `MultiTypeBlockMatrix`/`MultiTypeBlockVector` since the nesting level
of different block types might differ. Hence, `maxBlockLevel`, `minBlockLevel` always works
but if they yield different results `blockLevel` will not compile.
This condition can be checked with the function template `hasUniqueBlockLevel`.
- The internal setup code of the various SuiteSparse solvers (like `UMFPack`)
has been cleaned up. The effects should be invisible to all regular users.
However, if you have happened to use the `ColCompMatrix` and `ColCompMatrixInitializer`
classes in the past you need to port your code to use `Impl::BCCSMatrix` and
`Impl::BCCSMatrixInitializer` instead. Their interfaces have changed a little bit;
please look at the class documentation for details. The old header `colcompmatrix.hh`
is still there, but backward compatibility is only partial.
- More implementation code of the ILU preconditioners (in `ilu.hh`) has moved
into the `ILU` namespace. With the move, some methods have changed their names
from std-style to CamelCase. The old methods are still there, but they are
deprecated now. The class `MatrixBlockError` has moved from the file `ilu.hh`
to the file `istlexception.hh`, because it is of wider interest.
- Added the routines `flatVectorForEach` and `flatMatrixForEach` that traverse a (blocked) vector or matrix container.
At each entry a functor is called taking the entry and the (flat) index offset.
- `Cholmod` solver can now be used with each blocked matrix/vector type compatible with `flatVectorForEach` and `flatMatrixForEach`.
## Deprecations and removals
- Drop deprecated bindings of direct solver Pardiso.
- Remove deprecated preconditioner implementations `SeqILU0` and `SeqILUn`. Use
`SeqILU` instead, which implements incomplete LU decomposition of any order.
- Remove deprecated methods 'BlockVector::resize' and 'BlockVector::reserve'
with two arguments.
- Drop support SuperLU 4.
- Rename the exception `ImplicitModeOverflowExhausted` to `ImplicitModeCompressionBufferExhausted`,
to better reflect its meaning. The old exception is still there, but it triggers
a deprecation warning.
- Remove deprecated `SequentialInformation::getSolverCategory()`, use
`category()` instead.
## Known issues
- SuiteSparse's threading tends to conflict with the threading from OpenBLAS. The
author of SuiteSparse reports cases of an
[100 fold slowdown](https://github.com/DrTimothyAldenDavis/SuiteSparse/issues/1)
for cholmod. See also
[dune-istl #91](https://gitlab.dune-project.org/core/dune-istl/-/issues/91).
# Release 2.7
- New `SolverFactory` for generating sequential direct or iterative solvers and
preconditioners from a `ParameterTree` configuration.
- `BDMatrix` objects now have the method `solve`, which implements that
canonical way to solve block-diagonal linear systems.
- The class `VariableBlockVector::CreateIterator` is a true STL output iterator now.
This means that you can use STL algorithms like `std::fill` or `std::copy`
to set the block sizes.
- Support for SuiteSparse's CHOLMOD providing a sparse Cholesky
factorization.
- `MultiTypeBlockVector<Args...>` now inherits the constructors from its
parent type (`std::tuple<Args...>`). This means you can now also construct
`MultiTypeBlockVector`s from values or references of BlockVectors.
- `MultiTypeBlockVector::count()` is now `const`
- All matrix and vector classes can now be instantiated with number types
directly (A number type is any type for which `Dune::IsNumber<T>::value`
is true). For example, you can now use `BlockVector<double>` instead of
......@@ -26,6 +202,48 @@
a single entry can still be cast to their `field_type`. Therefore, the
change is completely backward-compatible.
- Added a right-preconditioned flexible restarted GMRes solver
- The UMFPack binding use the long int functions to compute larger systems.
With the \*_dl_\* versions instead of the \*_di_\* versions UMFPACK will not
have a memory limit of just 2 GiB.
- Support for SuiteSparse's CHOLMOD providing a sparse Cholesky
factorization.
- The interface methods `dot()` and `norm()` of ScalarProduct are now `const`. You will
have to adjust the method signatures in your own scalar product implementations.
- `MultiTypeBlockVector` now implements the interface method `N()`, which
returns the number of vector entries.
- `MultiTypeBlockVector` now implements the interface method `dim()`, which
returns the number of scalar vector entries.
- `MultiTypeBlockVector::count()` is now `const`
- `SeqILU` can now be used with SIMD data types.
## Deprecations and removals
- Deprecated support for SuperLU 4.x. It will be removed after Dune 2.7.
- Deprecated the preconditioner implementations `SeqILU0` and `SeqILUn`.
Use `SeqILU` instead, which implements incomplete LU decomposition
of any order.
- The method `setSolverCategory` of `OwnerOverlapCopyCommunication` is deprecated and
will be removed after Dune 2.7. The solver category can only be set in the constructor.
- The method `getSolverCategory` of `OwnerOverlapCopyCommunication` is deprecated and
will be removed after Dune 2.7. Use `category()` instead.
- The method `MultiTypeBlockVector::count()` has been deprecated, because its name
is inconsistent with the name mandated by the `dune-istl` vector interface.
- The method `MultiTypeBlockMatrix::size()` has been deprecated, because its name
is inconsistent with the name mandated by the `dune-istl` vector interface.
# Release 2.6
- `BDMatrix` objects can now be constructed and assigned from `std::initializer_list`.
......@@ -35,4 +253,4 @@
- The solver infrastructure was updated to support SIMD data types (see
current changes in `dune-common`). This allows to solve multiple systems
simultaniously using vectorization.
simultaneously using vectorization.
# set up project
project(dune-istl C CXX)
# SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
# SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
# general stuff
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.16)
project(dune-istl C CXX)
# guess build tree of dune-common
if(NOT (dune-common_DIR OR dune-common_ROOT OR
......@@ -20,13 +20,32 @@ list(APPEND CMAKE_MODULE_PATH ${dune-common_MODULE_PATH}
#include the dune macros
include(DuneMacros)
# deactivate global include-directories
dune_policy(SET DP_DEFAULT_INCLUDE_DIRS NEW)
# deactivate global calls to add_dune_all_flags in tests
dune_policy(SET DP_TEST_ADD_ALL_FLAGS NEW)
# start a dune project with information from dune.module
dune_project()
# create library target and export it as Dune::ISTL
dune_add_library(duneistl INTERFACE
EXPORT_NAME ISTL
LINK_LIBRARIES Dune::Common)
# set include directories to target
dune_default_include_directories(duneistl INTERFACE)
add_subdirectory(cmake/modules)
add_subdirectory(dune)
add_subdirectory(doc)
add_subdirectory(lib)
add_subdirectory(src)
# if Python bindings are enabled, include necessary sub directories.
if( DUNE_ENABLE_PYTHONBINDINGS )
add_subdirectory(python)
endif()
# finalize the dune project, e.g. generating config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
finalize_dune_project()
<!--
SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
-->
Installation Instructions
=========================
......
......@@ -2,43 +2,62 @@ Copyright holders:
2014--2016 Marco Agnese
2003--2013 Peter Bastian
2004--2016 Markus Blatt
2014--2016 Ansgar Burchardt
2020 Jean Benezech
2004--2024 Markus Blatt
2022 Eduardo Bueno
2022 Samuel Burbulla
2014--2023 Ansgar Burchardt
2004--2005 Adrian Burri
2008--2015 Andreas Dedner
2003--2016 Christian Engwer
2005--2016 Jorrit Fahlke
2008--2015 Bernd Flemisch
2005--2016 Carsten Gräser
2015--2016 Felix Gruber
2012--2016 Christoph Grüninger
2016 René Heß
2016 Stephan Hilb
2017--2018 Matthew Collins
2008--2024 Andreas Dedner
2018--2022 Nils-Arne Dreier
2003--2023 Christian Engwer
2005--2019 Jorrit Fahlke
2008--2017 Bernd Flemisch
2017--2020 Janick Gerstenberger
2015--2020 Felix Gruber
2005--2024 Carsten Gräser
2012--2024 Christoph Grüninger
2016--2020 René Heß
2018 Claus-Justus Heine
2016--2019 Stephan Hilb
2018--2024 Lasse Hinrichsen
2012--2013 Olaf Ippisch
2013--2016 Dominic Kempf
2018--2024 Patrick Jaap
2013--2019 Dominic Kempf
2015 Emmanouil Kiagias
2004--2016 Robert Klöfkorn
2016 Timo Koch
2004--2023 Robert Klöfkorn
2016--2023 Timo Koch
2007 Sreejith Pulloor Kuttanikkad
2013--2016 Arne Morten Kvarving (SINTEF)
2013--2016 Arne Morten Kvarving
2009--2013 Andreas Lauser
2012--2016 Tobias Malkmus
2012--2017 Tobias Malkmus
2007--2009 Sven Marnach
2013 René Milk
2013--2016 Steffen Müthing
2024 Alex Müller
2013--2019 Steffen Müthing
2016 Maikel Nadolski
2023--2024 Lisa Julia Nebel
2003--2005 Thimo Neubauer
2010--2012 Rebecca Neumann
2008--2014 Martin Nolte
2008--2018 Martin Nolte
2012--2015 Andreas Nüßing
2013--2014 Marian Piatkowski
2011--2016 Elias Pipping
2013 Jurgis Pods
2018--2024 Simon Praetorius
2009 Atgeirr Rasmussen
2018--2022 Lukas Renelt
2021--2024 Santiago Ospina De Los Ríos
2008--2013 Uli Sack
2004--2016 Oliver Sander
2023 Vaishnavi Sanchi
2004--2024 Oliver Sander
2015--2019 Linus Seelinger
2013 Bård Skaflestad
2018 Mathis Springwald
2023 Jakob Torben
2006--2010 Martin Weiser
2019--2020 Kilian Weishaupt
2015 Sebastian Westerheide
2011--2012 Matthias Wohlmuth
2014--2016 Jonathan Youett
......
The DUNE library and headers are licensed under version 2 of the GNU
General Public License (see below), with a special exception for
linking and compiling against DUNE, the so-called "runtime exception."
The license is intended to be similar to the GNU Lesser General
Public License, which by itself isn't suitable for a template library.
The exact wording of the exception reads as follows:
As a special exception, you may use the DUNE source files as part
of a software library or application without restriction.
Specifically, if other files instantiate templates or use macros or
inline functions from one or more of the DUNE source files, or you
compile one or more of the DUNE source files and link them with
other files to produce an executable, this does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
<!--
SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
-->
DUNE-library
============
......
# SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
# SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
# Defines the functions to use ARPACKPP
#
# .. cmake_function:: add_dune_arpackpp_flags
......@@ -9,12 +12,19 @@
#
# A list of targets to use ARPACKPP with.
#
include_guard(GLOBAL)
set_package_properties("ARPACK" PROPERTIES
PURPOSE "Solve large scale eigenvalue problems")
set_package_properties("ARPACKPP" PROPERTIES
PURPOSE "C++ interface for ARPACK")
function(add_dune_arpackpp_flags _targets)
if(ARPACKPP_FOUND)
foreach(_target ${_targets})
target_link_libraries(${_target} ${ARPACKPP_DUNE_LIBRARIES})
target_compile_definitions(${_target} PUBLIC ENABLE_ARPACKPP=1)
target_link_libraries(${_target} PUBLIC ${ARPACKPP_DUNE_LIBRARIES})
target_compile_definitions(${_target} PUBLIC HAVE_ARPACKPP=1)
target_compile_options(${_target} PUBLIC ${ARPACKPP_DUNE_COMPILE_FLAGS})
endforeach()
endif()
......
# SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
# SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
# Defines the functions to use SuperLU
#
# .. cmake_function:: add_dune_superlu_flags
......@@ -9,19 +12,28 @@
#
# A list of targets to use SuperLU with.
#
include_guard(GLOBAL)
set_package_properties("SuperLU" PROPERTIES
PURPOSE "Direct solver for linear system, based on LU decomposition")
# set HAVE_SUPERLU for config.h
set(HAVE_SUPERLU ${SuperLU_FOUND})
# register all SuperLU related flags
if(SuperLU_FOUND)
dune_register_package_flags(
COMPILE_DEFINITIONS "HAVE_SUPERLU=1"
LIBRARIES SuperLU::SuperLU)
endif()
function(add_dune_superlu_flags)
if(SUPERLU_FOUND)
cmake_parse_arguments(_add_superlu "OBJECT" "" "" ${ARGN})
foreach(_target ${_add_superlu_UNPARSED_ARGUMENTS})
if(NOT _add_superlu_OBJECT)
target_link_libraries(${_target} ${SUPERLU_DUNE_LIBRARIES})
endif()
get_target_property(_props ${_target} COMPILE_FLAGS)
string(REPLACE "_props-NOTFOUND" "" _props "${_props}")
set_target_properties(${_target} PROPERTIES COMPILE_FLAGS
"${_props} ${SUPERLU_DUNE_COMPILE_FLAGS} -DENABLE_SUPERLU=1")
# Provide function to set target properties for linking to SuperLU
function(add_dune_superlu_flags _targets)
if(SuperLU_FOUND)
foreach(_target ${_targets})
target_link_libraries(${_target} PUBLIC SuperLU::SuperLU)
target_compile_definitions(${_target} PUBLIC HAVE_SUPERLU=1)
endforeach()
endif(SUPERLU_FOUND)
endif()
endfunction(add_dune_superlu_flags)
# SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
# SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
set(modules
AddARPACKPPFlags.cmake
AddSuperLUFlags.cmake
......
# SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
# SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
# .. cmake_module::
#
# This modules content is executed whenever a module required or suggests dune-istl!
......@@ -6,12 +9,10 @@
find_package(METIS)
find_package(ParMETIS)
include(AddParMETISFlags)
find_package(SuperLU)
find_package(SuperLU 5.0)
include(AddSuperLUFlags)
find_package(ARPACKPP)
include(AddARPACKPPFlags)
find_package(SuiteSparse OPTIONAL_COMPONENTS CHOLMOD LDL SPQR UMFPACK)
include(AddSuiteSparseFlags)
# enable / disable backwards compatibility w.r.t. category
set(DUNE_ISTL_SUPPORT_OLD_CATEGORY_INTERFACE 1
......
# SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
# SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
# .. cmake_module::
#
# Module that checks whether ARPACK is available and usable.
......@@ -22,15 +25,10 @@
# system paths.
#
# check for Fortran support which is required by ARPACK
if(NOT(Fortran_Works))
message(WARNING "Fortran doesn't seem to be supported, skipping search for ARPACK.")
# log errornous result
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determing location of ARPACK failed:\n"
"Fortran support is required but could not be detected\n\n")
return()
endif()
# text for feature summary
set_package_properties("ARPACK" PROPERTIES
URL "https://www.arpack.org"
DESCRIPTION "ARnoldi PACKage")
# look for library, only at positions given by the user
find_library(ARPACK_LIBRARY
......@@ -78,18 +76,13 @@ if(ARPACK_FOUND)
set(ARPACK_LIBRARIES ${ARPACK_LIBRARY})
# log result
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determing location of ARPACK succeeded:\n"
"Determining location of ARPACK succeeded:\n"
"Libraries to link against: ${ARPACK_LIBRARIES}\n\n")
set(ARPACK_DUNE_LIBRARIES ${ARPACK_LIBRARIES}
CACHE STRING "Libraries used by DUNE when linking ARPACK programs")
else()
# log errornous result
# log erroneous result
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determing location of ARPACK failed:\n"
"Determining location of ARPACK failed:\n"
"Libraries to link against: ${ARPACK_LIBRARIES}\n\n")
endif()
# text for feature summary
set_package_properties("ARPACK" PROPERTIES
DESCRIPTION "ARnoldi PACKage"
PURPOSE "Solve large scale eigenvalue problems")
# SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
# SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
# .. cmake_module::
#
# Module that checks whether ARPACK++ is available and usable.
......@@ -25,6 +28,11 @@
# system paths.
#
# text for feature summary
set_package_properties("ARPACKPP" PROPERTIES
URL "https://github.com/m-reuter/arpackpp"
DESCRIPTION "ARPACK++")
# find ARPACK which is required by ARPACK++
find_package(ARPACK)
......@@ -97,7 +105,7 @@ if(ARPACKPP_FOUND)
endif(ARPACKPP_LIBRARY)
# log result
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determing location of ARPACK++ succeeded:\n"
"Determining location of ARPACK++ succeeded:\n"
"Include directory: ${ARPACKPP_INCLUDE_DIRS}\n"
"Libraries to link against: ${ARPACKPP_LIBRARIES}\n\n")
......@@ -113,24 +121,19 @@ if(ARPACKPP_FOUND)
set(ARPACKPP_DUNE_LIBRARIES ${ARPACKPP_LIBRARIES}
CACHE STRING "Libraries used by DUNE when linking ARPACK++ programs")
else()
# log errornous result
# log erroneous result
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determing location of ARPACK++ failed:\n"
"Determining location of ARPACK++ failed:\n"
"Include directory: ${ARPACKPP_INCLUDE_DIRS}\n"
"Libraries to link against: ${ARPACKPP_LIBRARIES}\n\n")
endif()
# set HAVE_ARPACKPP for config.h
# set HAVE_ARPACKPP for conditional tests
set(HAVE_ARPACKPP ${ARPACKPP_FOUND})
# register all ARPACK++ related flags
if(ARPACKPP_FOUND)
dune_register_package_flags(COMPILE_DEFINITIONS "ENABLE_ARPACKPP=1"
dune_register_package_flags(COMPILE_DEFINITIONS "HAVE_ARPACKPP=1"
LIBRARIES "${ARPACKPP_LIBRARIES}"
COMPILE_OPTIONS "${ARPACKPP_DUNE_COMPILE_FLAGS}")
endif()
# text for feature summary
set_package_properties("ARPACKPP" PROPERTIES
DESCRIPTION "ARPACK++"
PURPOSE "C++ interface for ARPACK")
# SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
# SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
# .. cmake_module::
#
# Module that checks whether SuperLU is available and usable.
# SuperLU must be 4.0 or newer.
#
# Variables used by this module which you may want to set:
#
# :ref:`SUPERLU_ROOT`
# Path list to search for SuperLU
#
# Sets the follwing variables:
# Sets the following variables:
#
# :code:`SUPERLU_FOUND`
# :code:`SuperLU_FOUND`
# True if SuperLU available and usable.
#
# :code:`SUPERLU_MIN_VERSION_4`
# True if SuperLU version >= 4.0.
#
# :code:`SUPERLU_MIN_VERSION_4_3`
# True if SuperLU version >= 4.3.
#
# :code:`SUPERLU_MIN_VERSION_5`
# True if SuperLU version >= 5.0.
#
# :code:`SUPERLU_WITH_VERSION`
# Human readable string containing version information.
# This module provides the following imported targets, if found:
#
# :code:`SUPERLU_INCLUDE_DIRS`
# Path to the SuperLU include dirs.
# :code:`SuperLU:SuperLU`
# Library and include directories for the found SuperLU.
#
# :code:`SUPERLU_LIBRARIES`
# Name to the SuperLU library.
#
# .. cmake_variable:: SUPERLU_ROOT
# This module provides the following imported targets, if found:
#
# You may set this variable to have :ref:`FindSuperLU` look
# for the SuperLU package in the given path before inspecting
# system paths.
# :code:`SuperLU:SuperLU`
# Library and include directories for the found SuperLU.
#
find_package(BLAS QUIET)
# text for feature summary
include(FeatureSummary)
set_package_properties("SuperLU" PROPERTIES
URL "https://portal.nersc.gov/project/sparse/superlu/"
DESCRIPTION "Supernodal LU")
# look for header files, only at positions given by the user
find_path(SUPERLU_INCLUDE_DIR
NAMES supermatrix.h
PATHS ${SUPERLU_PREFIX} ${SUPERLU_ROOT}
PATH_SUFFIXES "superlu" "SuperLU" "include/superlu" "include" "SRC"
NO_DEFAULT_PATH
)
set(SUPERLU_INT_TYPE "int" CACHE STRING
"The integer version that SuperLU was compiled for (Default is int.
Should be the same as int_t define in e.g. slu_sdefs.h")
# look for header files, including default paths
find_path(SUPERLU_INCLUDE_DIR
NAMES supermatrix.h
PATH_SUFFIXES "superlu" "SuperLU" "include/superlu" "include" "SRC"
)
find_package(BLAS QUIET)
# look for library, only at positions given by the user
find_library(SUPERLU_LIBRARY
NAMES "superlu"
"superlu_5.2.1" "superlu_5.2" "superlu_5.1.1" "superlu_5.1" "superlu_5.0"
"superlu_4.3" "superlu_4.2" "superlu_4.1" "superlu_4.0"
PATHS ${SUPERLU_PREFIX} ${SUPERLU_ROOT}
PATH_SUFFIXES "lib" "lib32" "lib64"
NO_DEFAULT_PATH
find_path(SUPERLU_INCLUDE_DIR supermatrix.h
PATH_SUFFIXES "superlu" "SuperLU" "SRC"
)
# look for library files, including default paths
find_library(SUPERLU_LIBRARY
NAMES "superlu"
"superlu_5.2.1" "superlu_5.2" "superlu_5.1.1" "superlu_5.1" "superlu_5.0"
"superlu_4.3" "superlu_4.2" "superlu_4.1" "superlu_4.0"
PATH_SUFFIXES "lib" "lib32" "lib64"
)
# check version specific macros
include(CheckCSourceCompiles)
include(CMakePushCheckState)
cmake_push_check_state()
# we need if clauses here because variable is set variable-NOTFOUND
# if the searches above were not successful
# Without them CMake print errors like:
# "CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
# Please set them or make sure they are set and tested correctly in the CMake files:"
#
if(SUPERLU_INCLUDE_DIR)
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${SUPERLU_INCLUDE_DIR})
endif(SUPERLU_INCLUDE_DIR)
if(SUPERLU_LIBRARY)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${SUPERLU_LIBRARY})
endif(SUPERLU_LIBRARY)
if(BLAS_LIBRARIES)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${BLAS_LIBRARIES})
endif(BLAS_LIBRARIES)
# check wether version is new enough >= 4.0
check_c_source_compiles("
typedef int int_t;
#include <supermatrix.h>
#include <slu_util.h>
int main()
{
SuperLUStat_t stat;
stat.expansions=8;
return 0;
}" SUPERLU_MIN_VERSION_4)
# check whether version is at least 4.3
check_c_source_compiles("
#include <slu_ddefs.h>
int main(void)
{
return SLU_DOUBLE;
}"
SUPERLU_MIN_VERSION_4_3)
# check whether version is at least 5.0
check_c_source_compiles("
typedef int int_t;
#include <supermatrix.h>
#include <slu_util.h>
int main(void)
{
GlobalLU_t glu;
return 0;
}"
SUPERLU_MIN_VERSION_5)
if(SUPERLU_MIN_VERSION_4_3)
include(CheckIncludeFiles)
set(HAVE_SLU_DDEFS_H 1)
check_include_files(slu_sdefs.h HAVE_SLU_SDEFS_H)
check_include_files(slu_cdefs.h HAVE_SLU_CDEFS_H)
check_include_files(slu_zdefs.h HAVE_SLU_ZDEFS_H)
endif(SUPERLU_MIN_VERSION_4_3)
cmake_pop_check_state()
set(SUPERLU_INT_TYPE "int" CACHE STRING
"The integer version that SuperLU was compiled for (Default is int.
Should be the same as int_t define in e.g. slu_sdefs.h")
if(NOT SUPERLU_MIN_VERSION_4)
set(SUPERLU_WITH_VERSION "SuperLU < 4.0" CACHE STRING
"Human readable string containing SuperLU version information.")
else()
if(SUPERLU_MIN_VERSION_5)
set(SUPERLU_WITH_VERSION "SuperLU >= 5.0" CACHE STRING
"Human readable string containing SuperLU version information.")
elseif(SUPERLU_MIN_VERSION_4_3)
set(SUPERLU_WITH_VERSION "SuperLU >= 4.3" CACHE STRING
"Human readable string containing SuperLU version information.")
else()
set(SUPERLU_WITH_VERSION "SuperLU <= 4.2 and >= 4.0" CACHE STRING
"Human readable string containing SuperLU version information.")
# check version of SuperLU
find_file(SLU_UTIL_HEADER slu_util.h
HINTS ${SUPERLU_INCLUDE_DIR}
NO_DEFAULT_PATH)
if(SLU_UTIL_HEADER)
file(READ "${SLU_UTIL_HEADER}" superluheader)
# get version number from defines in header file
string(REGEX REPLACE ".*#define SUPERLU_MAJOR_VERSION[ \t]+([0-9]+).*" "\\1"
SUPERLU_MAJOR_VERSION "${superluheader}")
string(REGEX REPLACE ".*#define SUPERLU_MINOR_VERSION[ \t]+([0-9]+).*" "\\1"
SUPERLU_MINOR_VERSION "${superluheader}")
string(REGEX REPLACE ".*#define SUPERLU_PATCH_VERSION[ \t]+([0-9]+).*" "\\1"
SUPERLU_PATCH_VERSION "${superluheader}")
if(SUPERLU_MAJOR_VERSION GREATER_EQUAL 0)
set(SuperLU_VERSION "${SUPERLU_MAJOR_VERSION}")
endif()
if (SUPERLU_MINOR_VERSION GREATER_EQUAL 0)
set(SuperLU_VERSION "${SuperLU_VERSION}.${SUPERLU_MINOR_VERSION}")
endif()
if (SUPERLU_PATCH_VERSION GREATER_EQUAL 0)
set(SuperLU_VERSION "${SuperLU_VERSION}.${SUPERLU_PATCH_VERSION}")
endif()
# if SUPERLU_MAJOR_VERSION not defined, SuperLU must be version 4 or older
if(NOT SuperLU_VERSION)
set(SuperLU_VERSION "4")
endif()
endif()
# behave like a CMake module is supposed to behave
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
"SuperLU"
DEFAULT_MSG
BLAS_FOUND
SUPERLU_INCLUDE_DIR
SUPERLU_LIBRARY
SUPERLU_MIN_VERSION_4
find_package_handle_standard_args("SuperLU"
REQUIRED_VARS
SUPERLU_LIBRARY SUPERLU_INCLUDE_DIR SLU_UTIL_HEADER BLAS_FOUND
VERSION_VAR
SuperLU_VERSION
)
mark_as_advanced(SUPERLU_INCLUDE_DIR SUPERLU_LIBRARY)
mark_as_advanced(SUPERLU_INCLUDE_DIR SUPERLU_LIBRARY SLU_UTIL_HEADER)
# if both headers and library are found, store results
if(SUPERLU_FOUND)
set(SUPERLU_INCLUDE_DIRS ${SUPERLU_INCLUDE_DIR})
set(SUPERLU_LIBRARIES ${SUPERLU_LIBRARY})
if(SuperLU_FOUND)
if(NOT TARGET SuperLU::SuperLU)
add_library(SuperLU::SuperLU UNKNOWN IMPORTED)
set_target_properties(SuperLU::SuperLU
PROPERTIES
IMPORTED_LOCATION ${SUPERLU_LIBRARY}
INTERFACE_INCLUDE_DIRECTORIES "${SUPERLU_INCLUDE_DIR}")
# Link BLAS library
if(TARGET BLAS::BLAS)
target_link_libraries(SuperLU::SuperLU
INTERFACE BLAS::BLAS)
else()
target_link_libraries(SuperLU::SuperLU
INTERFACE ${BLAS_LINKER_FLAGS} ${BLAS_LIBRARIES})
endif()
endif()
# log result
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining location of ${SUPERLU_WITH_VERSION} succeeded:\n"
"Include directory: ${SUPERLU_INCLUDE_DIRS}\n"
"Library directory: ${SUPERLU_LIBRARIES}\n\n")
set(SUPERLU_DUNE_COMPILE_FLAGS "-I${SUPERLU_INCLUDE_DIRS}"
CACHE STRING "Compile flags used by DUNE when compiling SuperLU programs")
set(SUPERLU_DUNE_LIBRARIES ${SUPERLU_LIBRARIES} ${BLAS_LIBRARIES}
CACHE STRING "Libraries used by DUNE when linking SuperLU programs")
else(SUPERLU_FOUND)
# log errornous result
"Determining location of SuperLU succeeded:\n"
"Include directory: ${SUPERLU_INCLUDE_DIR}\n"
"Library directory: ${SUPERLU_LIBRARY}\n\n")
else()
# log erroneous result
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining location of SuperLU failed:\n"
"Include directory: ${SUPERLU_INCLUDE_DIRS}\n"
"Library directory: ${SUPERLU_LIBRARIES}\n"
"Found unsupported version: ${SUPERLU_WITH_VERSION}\n\n")
endif(SUPERLU_FOUND)
# set HAVE_SUPERLU for config.h
set(HAVE_SUPERLU ${SUPERLU_FOUND})
# register all superlu related flags
if(SUPERLU_FOUND)
dune_register_package_flags(COMPILE_DEFINITIONS "ENABLE_SUPERLU=1"
LIBRARIES "${SUPERLU_DUNE_LIBRARIES}"
INCLUDE_DIRS "${SUPERLU_INCLUDE_DIRS}")
"Include directory: ${SUPERLU_INCLUDE_DIR}\n"
"Library directory: ${SUPERLU_LIBRARY}\n")
endif()
# text for feature summary
set_package_properties("SuperLU" PROPERTIES
DESCRIPTION "Supernodal LU"
PURPOSE "Direct solver for linear system, based on LU decomposition")
// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
/* begin dune-istl
put the definitions for config.h specific to
your project here. Everything above will be
......@@ -28,37 +30,10 @@
/* end private */
/* Define to ENABLE_SUPERLU if the SuperLU library is available */
#cmakedefine HAVE_SUPERLU ENABLE_SUPERLU
/* Define to the integer type that SuperLU was compiled for
See e.g. what int_t is defined to in slu_sdefs.h */
#cmakedefine SUPERLU_INT_TYPE @SUPERLU_INT_TYPE@
/* Define to 1 if header slu_sdefs.h is there. */
#cmakedefine01 HAVE_SLU_SDEFS_H
/* Define to 1 if header slu_ddefs.h is there. */
#cmakedefine01 HAVE_SLU_DDEFS_H
/* Define to 1 if header slu_cdefs.h is there. */
#cmakedefine01 HAVE_SLU_CDEFS_H
/* Define to 1 if header slu_zdefs.h is there. */
#cmakedefine01 HAVE_SLU_ZDEFS_H
/* Define to ENABLE_ARPACKPP if the ARPACK++ library is available */
#cmakedefine HAVE_ARPACKPP ENABLE_ARPACKPP
/* Define to 0 as all versions since SuperLu 4.0 do no longer provide it that way. */
#define HAVE_MEM_USAGE_T_EXPANSIONS 1
/* define to 1 if SuperLU header slu_ddefs.h contains SLU_DOUBLE */
#cmakedefine SUPERLU_MIN_VERSION_4_3 @SUPERLU_MIN_VERSION_4_3@
/* define to 1 if SuperLU dgssvx takes a GlobalLU_t parameter */
#cmakedefine SUPERLU_MIN_VERSION_5 @SUPERLU_MIN_VERSION_5@
/* Define to the version of dune-istl */
#define DUNE_ISTL_VERSION "${DUNE_ISTL_VERSION}"
......
# SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
# SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
add_subdirectory(doxygen)
dune_add_latex_document(istl.tex
FORCE_DVI
BIBFILES istl.bib
IMAGES blockstructure.eps)
create_doc_install(istl.pdf
${CMAKE_INSTALL_DOCDIR} istl_safepdf)
dune_add_latex_document(
SOURCE istl.tex
FATHER_TARGET doc
INSTALL ${CMAKE_INSTALL_DOCDIR})
SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
# SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
# SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
# shortcut for creating the Doxyfile.in and Doxyfile
add_doxygen_target()
......
# SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
# SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
INPUT += @srcdir@/mainpage.txt \
@srcdir@/modules.txt \
@top_srcdir@/dune/istl
......