Skip to content

Commit

Permalink
Do not create unnecessary failing assembler.
Browse files Browse the repository at this point in the history
  • Loading branch information
gassmoeller committed Jan 28, 2022
1 parent f130695 commit 709ffe8
Show file tree
Hide file tree
Showing 5 changed files with 412 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/simulator/newton.cc
Expand Up @@ -53,8 +53,10 @@ namespace aspect

if (this->get_material_model().is_compressible())
{
assemblers.stokes_preconditioner.push_back(
std::make_unique<aspect::Assemblers::StokesCompressiblePreconditioner<dim>>());
// The compressible part of the preconditioner is only necessary if we use the simplified A block
if (this->get_parameters().use_full_A_block_preconditioner == false)
assemblers.stokes_preconditioner.push_back(
std::make_unique<aspect::Assemblers::StokesCompressiblePreconditioner<dim>>());

assemblers.stokes_system.push_back(
std::make_unique<aspect::Assemblers::NewtonStokesCompressibleStrainRateViscosityTerm<dim>>());
Expand Down
1 change: 1 addition & 0 deletions tests/tosi_benchmark_newton_solver_full_A.cc
@@ -0,0 +1 @@
#include <../benchmarks/tosi_et_al_2015_gcubed/tosi.cc>
15 changes: 15 additions & 0 deletions tests/tosi_benchmark_newton_solver_full_A.prm
@@ -0,0 +1,15 @@
# This is a test for the Tosi benchmark using the Newton solver and the full A block
# as preconditioner. Prior to this test there was a bug assigning the correct assemblers
# for this case.

include $ASPECT_SOURCE_DIR/benchmarks/newton_solver_benchmark_set/tosi_et_al_2015/input.prm

set Additional shared libraries = ./libnewton_solver_tosi.so
set End time = 0.0021
set Max nonlinear iterations = 15

subsection Solver parameters
subsection Stokes solver parameters
set Use full A block as preconditioner = true
end
end

0 comments on commit 709ffe8

Please sign in to comment.