improve efficiency for vertex patch blocks?


Is there a more efficient way to obtain the vertex/edge patch blocks for a block jacobi preconditioner?
The version in unit-2.1.2 is serial and is quite slow.
I am guessing this is due to python for looping and no parallelization. Any suggestion to speed up the process?


Hi Guosheng,

Still afraid of taking a look at the C++ source code?
Some choices for BlockJacobi-blocks are defined on the FESpace-level for most standard FESpaces, i.e. you could use or modify these for your own block preconditioners. More flexible would be to simply write a small minimal module that generates your block preconditioners on the C++ level. For that simply take a look at a module like GitHub - NGSolve/ngs-special-functions: Add special functions of SLATEC ( to NGSolve to copy the library infrastructure that you need to build a module and take a look at the CreateSmoothingBlocks() function of a standard FESpace, e.g. H1. Both together should contain all the functionality that you need.


Thanks for the suggestions.
I will take a look. :>