This package contains some iterative eigenvalue solvers to be used by the numerical methods in DUNE.
dune-eigensolver depends on the following software packages
Additionally, it depends on the following DUNE packages
- dune-common 2.9
- dune-istl 2.9
A quick way to resolve dependencies is to set up a Spack environment - the following setup was tested on Milan and is the recommended approach.
Setting up a local spack enviroment for dune-eigensolver on Milan. The packages' versions correspond to the dependency of the repository as on the branch develop
.
- Create a local directory, spack-env and copy the commands below to
spack-env/spack.yaml
file. The comands describe a set of packages to be installed, along with configuration settings.
spack:
# add package specs to the `specs` list
specs:
- [email protected]%[email protected]
- [email protected]%[email protected]
- [email protected]%[email protected]
- [email protected]%[email protected]
- [email protected]%[email protected]
view:
default:
root: .spack-env/view
link: roots
concretizer:
unify: false
- Install spack environment
$ spack env activate --create /path/to/spack-env
- To load the environment on next login
$ spacktivate /path/to/spack-env
The installation of dune-eigensolver maintains an out-of-source build in order to keep the source controlled tree intact while allowing the user the flexibility of removing and reinstalling the complete build. The source tree also maintains a local directory to some of the package's dependencies.
- Make a separate directory for a local installation of DUNE packages and dependencies.
$ mkdir -p DUNE/external && cd DUNE/external
- Resolve all the dependencies, and clone and install VCL, Eigen inside
external/
. - Return to
DUNE/
and set some CMake variables and compiler flags in a filerelease.opts
, or optionally through the variable$OPTSFILE
. Modify the paths as needed.
CMAKE_FLAGS="
-DCMAKE_CXX_FLAGS_RELEASE='-O3 -DNDEBUG -g0 -funroll-loops -ftemplate-depth=5120 -march=native -Wa,-q'
-DCMAKE_BUILD_TYPE=Release
-DDUNE_SYMLINK_TO_SOURCE_TREE=1
-DDUNE_ENABLE_PYTHONBINDINGS=NO
-DARPACKPP_INCLUDE_DIR=/path/to/arpackpp/include/arpackpp/
-DVCL_ROOT=/path/to/vcl
-DEIGEN_ROOT=/path/to/eigen/include/eigen3/Eigen
"
-
Clone dune-common, dune-istl
-
Clone dune-eigensolver
$ git clone https://github.com/normallytangent/dune-eigensolver.git
Optionally, If you want to test dune-eigensolver with the Aharmonic subdomains, clone also the submodule Sampler under dune-eigensolver/src/sampler
. Please note that because of the matrices, Sampler can get quite large.
$ submodule update --init --recursive
- Setup script for DUNE installation
#!/bin/bash
ROOT=$(pwd)
BUILDDIR=$ROOT/release-build
OPTSFILE=release.opts
MODULES="common istl eigensolver"
for i in $MODULES; do
echo build $i
./dune-common/bin/dunecontrol --builddir=$BUILDDIR --opts=$OPTSFILE --only=dune-$i all
done
- ... and run. This will create a separate build directory,
release-build
underDUNE/
.
See
$ .dune-common/bin/dunecontrol --help
for further options.
The full build system is described in the dune-common/doc/buildsystem (Git version) or under share/doc/dune-common/buildsystem if you installed DUNE!