[cig-commits] [commit] master: disable pressure scaling if using direct solver (b663f53)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Mon May 19 20:13:41 PDT 2014


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

On branch  : master
Link       : https://github.com/geodynamics/aspect/compare/76d4275352ef2cae5de9a073acd1c03a92c2670c...4f3d06fd1f3754419813db37ec9ef7f0f6f3cb15

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

commit b663f53803f1562f8f1d79247cb9c092589dc5f0
Author: Timo Heister <timo.heister at gmail.com>
Date:   Mon May 12 18:03:17 2014 -0400

    disable pressure scaling if using direct solver


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

b663f53803f1562f8f1d79247cb9c092589dc5f0
 source/simulator/core.cc   | 5 ++++-
 source/simulator/solver.cc | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/source/simulator/core.cc b/source/simulator/core.cc
index d7e30fb..e75aa97 100644
--- a/source/simulator/core.cc
+++ b/source/simulator/core.cc
@@ -272,7 +272,10 @@ namespace aspect
     // to make velocities and pressures of roughly the same (numerical) size,
     // and we may have to fix up the right hand side vector before solving for
     // compressible models if there are no in-/outflow boundaries
-    pressure_scaling = material_model->reference_viscosity() / geometry_model->length_scale();
+    if (parameters.direct_stokes_solver)
+      pressure_scaling = 1.0;
+    else
+      pressure_scaling = material_model->reference_viscosity() / geometry_model->length_scale();
 
     std::set<types::boundary_id> open_velocity_boundary_indicators
       = geometry_model->get_used_boundary_indicators();
diff --git a/source/simulator/solver.cc b/source/simulator/solver.cc
index d9c5c57..8c087a9 100644
--- a/source/simulator/solver.cc
+++ b/source/simulator/solver.cc
@@ -388,7 +388,8 @@ namespace aspect
         current_constraints.distribute (distributed_stokes_solution);
 
         // now rescale the pressure back to real physical units
-        distributed_stokes_solution.block(1) *= pressure_scaling;
+        // we use pressure_scaling = 1.0 with a direct solver
+        // distributed_stokes_solution.block(1) *= pressure_scaling;
 
         // then copy back the solution from the temporary (non-ghosted) vector
         // into the ghosted one with all solution components



More information about the CIG-COMMITS mailing list