[cig-commits] [commit] master: make compile with PETSc again (d71e1b3)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu May 22 21:29:10 PDT 2014


Repository : https://github.com/geodynamics/aspect

On branch  : master
Link       : https://github.com/geodynamics/aspect/compare/5ed75f2b515b2b212465be2165328a2c0f78c291...d71e1b31f12798ea55fa549bb57261b3baf930fd

>---------------------------------------------------------------

commit d71e1b31f12798ea55fa549bb57261b3baf930fd
Author: Timo Heister <timo.heister at gmail.com>
Date:   Fri May 23 00:29:00 2014 -0400

    make compile with PETSc again
    
    The direct solver was not working with PETSc. We pick MUMPS for now,
    which seems to work okay but requires you set up PETSc with MUMPS for it
    to work.


>---------------------------------------------------------------

d71e1b31f12798ea55fa549bb57261b3baf930fd
 source/simulator/solver.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/source/simulator/solver.cc b/source/simulator/solver.cc
index b0daa52..820dc7b 100644
--- a/source/simulator/solver.cc
+++ b/source/simulator/solver.cc
@@ -389,7 +389,11 @@ namespace aspect
 
         SolverControl cn;
         // TODO: can we re-use the direct solver?
+#ifdef USE_PETSC
+        PETScWrappers::SparseDirectMUMPS solver(cn, mpi_communicator);
+#else
         TrilinosWrappers::SolverDirect solver(cn);
+#endif
         solver.solve(system_matrix.block(0,0), distributed_stokes_solution.block(0), system_rhs.block(0));
 
         current_constraints.distribute (distributed_stokes_solution);



More information about the CIG-COMMITS mailing list