Comments (6)
I think the problem is that your system is getting really badly conditioned and gmres is losing too much information in the restart. If I run with:
solver_parameters={'ksp_gmres_restart': 200, 'ksp_monitor_singular_value': True}
I get convergence of the largest problem:
L_inf norm: 0.131777047356
L2 norm: 0.131777047355
L_inf norm: 0.146869663844
L2 norm: 0.059711026174
L_inf norm: 0.0389459143339
L2 norm: 0.01596968206
L_inf norm: 0.0107924786456
L2 norm: 0.00426911884399
But PETSc estimates the condition number of the last problem as 6e5, and it takes 5100 iterations to converge (the system has 21000 dofs).
In conclusion, can you build a better PC by using schur complements?
from firedrake.
Answer, yes:
solve(a == L, out, solver_parameters={'pc_type': 'fieldsplit',
'pc_fieldsplit_type': 'schur',
'ksp_type': 'cg',
'pc_fieldsplit_schur_fact_type': 'FULL',
'fieldsplit_0_ksp_type': 'cg',
'fieldsplit_1_ksp_type': 'cg',
'ksp_monitor': True})
Residual norms for firedrake_snes_0_ solve.
0 KSP Residual norm 9.416491472343e+00
1 KSP Residual norm 1.853245163915e-11
L_inf norm: 0.131777047356
L2 norm: 0.131777047355
Residual norms for firedrake_snes_1_ solve.
0 KSP Residual norm 6.507015022039e+00
1 KSP Residual norm 2.674064589955e-12
L_inf norm: 0.146868545809
L2 norm: 0.0597100588258
Residual norms for firedrake_snes_2_ solve.
0 KSP Residual norm 1.592744048817e+01
1 KSP Residual norm 3.561132153579e-05
2 KSP Residual norm 1.700162704754e-10
L_inf norm: 0.0389818965915
L2 norm: 0.0159811969722
Residual norms for firedrake_snes_3_ solve.
0 KSP Residual norm 4.509605854437e+01
1 KSP Residual norm 5.140400988667e-05
2 KSP Residual norm 3.452288755060e-10
L_inf norm: 0.0098520605559
L2 norm: 0.0040541386656
In about 3 seconds.
from firedrake.
Is this appropriately addressed?
from firedrake.
i think i'm happy with it now.
from firedrake.
What does "happy" mean? Do we get the right answer or not?
from firedrake.
This test is in master and passing, hence closing.
from firedrake.
Related Issues (20)
- BUG: unable to save CG 2 field to `pvd` when using hexahedral mesh HOT 1
- DOCS: Use Sphinx directives to include code _using tags_
- VomMover HOT 5
- BUG: UFLInequalityConstraint from firedrake.adjoint is not working HOT 7
- Checkpointing arbitrary tags
- Successful installation on HPC but code is not working HOT 6
- BUG: cannot import from firedrake.pyplot HOT 3
- BUG: Error in UFLInequalityConstraint with ROL
- BUG: bug in assembly or vertex-only mesh HOT 6
- Function assigning a Cofunction HOT 2
- BUG: Incorrect `Action` derivatives in the complex case HOT 3
- BUG: $VIRTUAL_ENV/.cache not created HOT 5
- Follow up to #3138: cannot install libspatialindex and firedrake in the same path HOT 7
- BUG: Fieldsplit doesn't work with a `Cofunction` right hand side. HOT 4
- BUG: Errors checkpointing extruded mesh HOT 3
- Zenodo release HOT 1
- interpolation calls the old interpolation implementaion which produces warnings, could be considered error due to code predictable execution path. HOT 2
- BUG: Interpolators do not work anymore. HOT 4
- Multigrid for Non-nested meshes HOT 1
- BUG: Assembling a `Cofunction` returns the `Cofunction` rather than a supplied `tensor` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firedrake.