Skip to content

Commit

Permalink
Use deal.II CG solver instead of trilinos
Browse files Browse the repository at this point in the history
  • Loading branch information
gassmoeller committed Mar 22, 2024
1 parent 722dc0a commit dcf23f4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions source/simulator/solver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@

#include <deal.II/base/signaling_nan.h>
#include <deal.II/lac/solver_gmres.h>

#include <deal.II/lac/trilinos_solver.h>
#include <deal.II/lac/solver_cg.h>

#include <deal.II/fe/fe_values.h>

Expand Down Expand Up @@ -276,7 +275,8 @@ namespace aspect
{
SolverControl solver_control(1000, src.block(1).l2_norm() * S_block_tolerance);

TrilinosWrappers::SolverCG solver(solver_control);
PrimitiveVectorMemory<LinearAlgebra::Vector> mem;
SolverCG<LinearAlgebra::Vector> solver(solver_control,mem);

// Trilinos reports a breakdown
// in case src=dst=0, even
Expand Down Expand Up @@ -323,7 +323,9 @@ namespace aspect
if (do_solve_A == true)
{
SolverControl solver_control(10000, utmp.l2_norm() * A_block_tolerance);
TrilinosWrappers::SolverCG solver(solver_control);
PrimitiveVectorMemory<LinearAlgebra::Vector> mem;
SolverCG<LinearAlgebra::Vector> solver(solver_control,mem);

try
{
dst.block(0) = 0.0;
Expand Down

0 comments on commit dcf23f4

Please sign in to comment.