From fe929f17e98b577171f58ca520b5145be41730ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= Date: Thu, 16 Mar 2023 19:48:40 +0100 Subject: [PATCH] Adjust sequential and both parallel cases in istl-solver-playground Do same thing, independent of paralellel, distributed, or sequential. This fixes the test in the sequential case. --- src/istl-solver-playground.hh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/istl-solver-playground.hh b/src/istl-solver-playground.hh index 0ff3abd5..11693cf5 100644 --- a/src/istl-solver-playground.hh +++ b/src/istl-solver-playground.hh @@ -66,7 +66,11 @@ std::shared_ptr loadSystem(std::shared_ptr& m, std::shared_ptr oocomm; if(distributed){ oocomm = std::make_shared(MPI_COMM_WORLD); - loadMatrixMarket(*m, matrixfilename, *oocomm); + if(matrixfilename != "laplacian"){ + loadMatrixMarket(*m, matrixfilename, *oocomm); + }else{ + setupLaplacian(*m, config.get("N", 20)); + } if(config.get("random_rhs", false)){ rhs->resize(m->N()); srand(42); @@ -98,16 +102,22 @@ template void loadSystem(std::shared_ptr& m, std::shared_ptr& rhs, const Dune::ParameterTree& config){ - std::string matrixfilename = config.get("matrix"); + // generate Laplacian or load matrix + std::string matrixfilename = config.get("matrix", "laplacian"); + if(matrixfilename == "laplacian"){ + setupLaplacian(*m, config.get("N", 20)); + }else{ + loadMatrixMarket(*m, matrixfilename); + } + // use random values or load right-hand side std::string rhsfilename; - if(!config.get("random_rhs", false)) - rhsfilename = config.get("rhs"); - loadMatrixMarket(*m, matrixfilename); if(config.get("random_rhs", false)){ rhs->resize(m->N()); fillRandom(*rhs); - }else + }else{ + rhsfilename = config.get("rhs"); loadMatrixMarket(*rhs, rhsfilename); + } } #endif -- 2.39.2 u?id=e0c6c18371e4b7029724471cf43d1c95b69d1b81'>gnu/packages/busybox.scm
AgeCommit message (Expand)Author
2019-06-17gnu: busybox: Don't install to usr....* gnu/packages/busybox.scm (busybox)[arguments]: Add a custom phase to prevent installing to %PREFIX/usr. Efraim Flashner
2019-06-17gnu: toybox: Don't install files to usr....* gnu/packages/busybox.scm (toybox)[arguments]: Add custom phase to remove any files installed in $PREFIX/usr. Efraim Flashner
2019-06-06gnu: toybox: Update to 0.8.1....* gnu/packages/busybox.scm (toybox): Update to 0.8.1. Tobias Geerinckx-Rice
2019-02-17gnu: toybox: Update to 0.8.0....* gnu/packages/busybox.scm (toybox): Update to 0.8.0. Tobias Geerinckx-Rice
2018-12-12gnu: Add toybox....* gnu/packages/busybox.com (toybox): New variable. Efraim Flashner
2018-09-18gnu: busybox: Update to 1.29.3....* gnu/packages/busybox.scm (busybox): Update to 1.29.3. Tobias Geerinckx-Rice
2018-07-19gnu: busybox: Update to 1.29.1....* gnu/packages/busybox.scm (busybox): Update to 1.29.1. [arguments]: Add custom phase to change the default value of TASKSET. Efraim Flashner
2018-06-22gnu: busybox: Return #t from all phases....* gnu/packages/busybox.scm (busybox)[arguments]: Substitute INVOKE for SYSTEM*. Tobias Geerinckx-Rice