erdc / proteus-mprans

Module for solving 3D, non-hydrostatic, turbulent, incompressible air/water flow (multi-phase RANS)
7 stars 6 forks source link

schur options #44

Open cekees opened 9 years ago

cekees commented 9 years ago

@ahmadia and @jedbrown , I added two working option sets to this commit 7195038ec44733e73b066f8f3cd8b0677850d2f2

cekees commented 9 years ago

@ahmadia can you point me to the wiki or notes that you started on the scaling study?

ahmadia commented 9 years ago

https://github.com/erdc-cm/proteus/wiki/Summer-2014-Scalability-Study

On Wed, Nov 12, 2014 at 10:30 AM, Chris Kees notifications@github.com wrote:

@ahmadia https://github.com/ahmadia can you point me to the wiki or notes that you started on the scaling study?

— Reply to this email directly or view it on GitHub https://github.com/erdc-cm/proteus-mprans/issues/44#issuecomment-62680357 .

cekees commented 9 years ago

@jedbrown, I think you were out of the room when I finally tracked down the floating point error I had been seeing with the Schur complement preconditioner. In all there were only 3 errors: one when importing pytables, one due to the denormalizing issue in our smagorinsky calculation (which I fixed), and the one in PETSc below. That said, proteus and the petsc solvers are all converging as expected, so these floating point issues don't seem to be related to what @ahmadia had seen.

The PETSc floating point error is in KSPMonitorTrueResidualNorm when monitors are turned on for the velocity block:

-rans2p_fieldsplit_velocity_ksp_monitor_true_residual

However, it is not the initial velocity block solve that triggers the error, but rather a stage inside the Schur complement solve. I suspect it's just trying to compute 0/0. Here is the output:

Residual norms for rans2p_fieldsplit_velocity_ solve.
0 KSP unpreconditioned resid norm 9.043469552679e-01 true resid norm 9.043469552679e-01 ||r(i)||/||b|| 1.000000000000e+00
1 KSP unpreconditioned resid norm 6.895198358523e-16 true resid norm 6.443085977667e-16 ||r(i)||/||b|| 7.124573085733e-16
Residual norms for rans2p_fieldsplit_pressure_ solve.
  Residual norms for rans2p_fieldsplit_velocity_ solve.
  0 KSP unpreconditioned resid norm 0.000000000000e+00 true resid norm 0.000000000000e+00 ||r(i)||/||b||           -nan
jedbrown commented 9 years ago

Thanks, and this explains why it doesn't feed back. This happens when the initial condition is such that a solve is attempted with 0.0 right hand side. It's harmless and wouldn't show up with -ksp_monitor (though -ksp_monitor_true_residual has its place).