Skip to content
fdrmrcPublic

About

Robust and scalable operator preconditioning approaches for fictitious domain discretizations.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

OP4FDD — Operator Preconditioning for Fictitious Domain Discretizations

deal.II master License: GPL-3.0-only

Development repository containing operator preconditioning strategies for fictitious domain discretizations.
Experiments are based on the deal.II library.


Prerequisites

Toolchain & libraries

Dependency Requirement
CMake >= 3.13.4
C++17 compiler GCC >= 11.4.0 or Clang >= 15
Open MPI >= 4.0.3
Trilinos >= 13.4.1
deal.II >= 9.8
Other libraries p4est, muparser, UMFPACK, and MUMPS

Note

Tested with deal.II 9.8.0-pre, a development build of deal.II 9.8.

Required deal.II configuration

Enable all of the following options when configuring deal.II:

DEAL_II_WITH_MPI=ON
DEAL_II_WITH_TRILINOS=ON
DEAL_II_WITH_P4EST=ON
DEAL_II_WITH_MUPARSER=ON
DEAL_II_WITH_UMFPACK=ON
DEAL_II_WITH_MUMPS=ON

Building and running

With deal.II installed and configured as above:

git clone https://github.com/fdrmrc/OP4FDD.git
cd OP4FDD
mkdir build && cd build
cmake .. -DDEAL_II_DIR=/path/to/deal.II -DCMAKE_BUILD_TYPE=Release
make -j 4

Replace /path/to/deal.II with your installation path and adjust 4 to the desired number of build jobs. Without -DCMAKE_BUILD_TYPE=Release, a Debug build is generated.

The configuration step scans all the dependencies listed above. If something is missing or too old, it stops and lists what has to be fixed. The executables are generated in build/.

Running the examples

The sources are in examples/ and the parameter files in parameters/. All the examples share the preconditioners defined in include/riesz_preconditioners.h. The files in parameters/ are meant to be edited to experiment with the code. The fixed configurations of the experiments in the paper are in experiments/ (see below). Each executable takes a parameter file, and optionally the space dimension:

Executable Runs with Parameter file (in parameters/) Test case Diagonal blocks
elliptic_interface_riesz one process elliptic_interface_riesz.prm scalar problem, square inclusion AMG
elliptic_interface_riesz one process elliptic_interface_riesz_ball.prm scalar problem, ball inclusion AMG
elliptic_interface_riesz one process elliptic_interface_riesz_3d.prm scalar problem, cube inclusion AMG
immersed_elasticity_riesz_mpi MPI immersed_elasticity_riesz.prm linear elasticity, square inclusion MUMPS
immersed_elasticity_riesz_mpi MPI immersed_elasticity_riesz_3d.prm linear elasticity, cube inclusion AMG
immersed_elasticity_riesz_matrix_free MPI immersed_elasticity_riesz_mf.prm linear elasticity, square inclusion, matrix-free geometric multigrid

From the build/ directory, the corresponding commands are:

./elliptic_interface_riesz ../parameters/elliptic_interface_riesz.prm
./elliptic_interface_riesz ../parameters/elliptic_interface_riesz_ball.prm
./elliptic_interface_riesz ../parameters/elliptic_interface_riesz_3d.prm 3

mpirun -np 4 ./immersed_elasticity_riesz_mpi ../parameters/immersed_elasticity_riesz.prm
mpirun -np 4 ./immersed_elasticity_riesz_mpi ../parameters/immersed_elasticity_riesz_3d.prm 3

# For a parallel, matrix-free version with geometric multigrid on blocks:
mpirun -np 4 ./immersed_elasticity_riesz_matrix_free ../parameters/immersed_elasticity_riesz_mf.prm

Some remarks:

  • 3D runs: append a trailing 3 to run the 3D instantiation instead. Without it, the program runs in 2D.
  • elliptic_interface_riesz is a serial prototype.
  • Each program writes the solutions to the Output directory of the parameter file, and the parameters it used to used_parameters*.prm, both relative to the directory it runs from.

Compiling and running all the numerical experiments

The script compile_and_run_experiments.sh configures and compiles the code in Release mode, and then runs the following sweeps, for 16 experiments in total:

Executable Parameter file (in experiments/) Swept parameters Values
elliptic_interface_riesz elliptic_interface_riesz_square.prm Beta_2 10, 1e3, 1e5, 1e7
elliptic_interface_riesz elliptic_interface_riesz_ball.prm Beta_2 10, 1e3, 1e5, 1e7
immersed_elasticity_riesz_mpi immersed_elasticity_riesz_mpi_2d.prm lambda immersed, mu immersed (20, 10), (2e2, 1e2), (2e3, 1e3), (2e4, 1e4)
immersed_elasticity_riesz_mpi immersed_elasticity_riesz_mpi_3d.prm (3D, first four refinement cycles) lambda immersed, mu immersed (20, 10), (2e2, 1e2), (2e3, 1e3), (2e4, 1e4)

These experiments are fixed. The script reads the files in experiments/, never those in parameters/, and changes only the swept parameters. Each file in experiments/ sets every parameter, defaults included, so the experiments stay the same when you edit parameters/ or when a default in the code changes. To try other settings, use the files in parameters/ as described above. results/summary.txt records the commit the experiments ran from, and flags local changes to experiments/.

Run it from anywhere, for instance from the top level directory:

export DEAL_II_DIR=/path/to/deal.II   # if CMake does not find it by itself
./compile_and_run_experiments.sh

The full sweep might be demanding at the last refinement cycles. To check that everything works first, you can limit the number of refinement cycles with N_CYCLES:

N_CYCLES=2 ./compile_and_run_experiments.sh

While an experiment runs, the script prints one line per refinement cycle: its DoFs as soon as the cycle starts, then its iterations and wall time once it is solved.

results/
  summary.txt                                        # final iteration table of each experiment
  elliptic_interface_riesz/square/beta_2_<value>/
  elliptic_interface_riesz/ball/beta_2_<value>/
  immersed_elasticity_riesz_mpi/2d/lambda_<value>_mu_<value>/
  immersed_elasticity_riesz_mpi/3d/lambda_<value>_mu_<value>/

If an experiment fails, the script carries on with the next ones, lists the failed experiments at the end and exits with an error. The following environment variables change its behavior:

Variable Meaning Default
DEAL_II_DIR where to find deal.II found by CMake
BUILD_DIR build directory build
RESULTS_DIR results directory results
N_JOBS number of build jobs 4
N_RANKS MPI ranks of immersed_elasticity_riesz_mpi 4
MPIEXEC MPI launcher the MPI launcher found by CMake
N_CYCLES overrides Refinemented cycles in all the experiments, for a quick test the values in experiments/

Author and contact information

This repository is developed and maintained by:

For inquiries or special requests, you can either contact the author by email or open an issue.

License

The code in this repository is licensed under the GNU General Public License, version 3 only (GPL-3.0-only).

About

Robust and scalable operator preconditioning approaches for fictitious domain discretizations.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages