81. Overlapping Domain Decomposition Methods#
Let
with
Let
In addition to
where the constant
The overlapping domain decomposition method is a sub-space decomposition of the global finite element space
The overlapping domain decomposition method is an additive Schwarz method with the space splitting
We are solving Dirichlet problems on the overlapping sub-domains, and adding up the solutions: The preconditioning action
is defined as
81.1. Experiments with overlapping DD#
from ngsolve import *
from ngsolve.webgui import Draw
We start from a coarse grid, where we define the overlapping sub-domains as vertex patches: All elements connected with vertex i form the order=0
.
mesh = Mesh(unit_square.GenerateMesh(maxh=0.3))
fesdom = L2(mesh, order=0, autoupdate=True)
fes = H1(mesh, order=1, dirichlet="bottom", autoupdate=True)
gfdom = GridFunction(fesdom, multidim=mesh.nv, nested=True, autoupdate=True)
for el in mesh.Elements(VOL):
for v in el.vertices:
gfdom.vecs[v.nr][el.nr] = 1
for l in range(2):
mesh.Refine()
Draw (gfdom, animate=True);
copy mesh complete
Setup the problem. The sub-spaces are now finite element functions which are in BitArrays
with
cleared bits for dofs not belonging to elements outside
u,v = fes.TnT()
a = BilinearForm(grad(u)*grad(v)*dx).Assemble()
pre = None
for v in gfdom.vecs:
mask = BitArray(fes.FreeDofs())
for el in fes.Elements(VOL):
if v[el.nr] == 0:
for d in el.dofs:
mask[d] = False
# print (mask)
invi = a.mat.Inverse(freedofs=mask, inverse="sparsecholesky")
pre = pre+invi if pre else invi
from ngsolve.la import EigenValues_Preconditioner
lam = list(EigenValues_Preconditioner(a.mat, pre))
print ("lammin, lammax=", lam[0], lam[-1])
print ("kappa=", lam[-1]/lam[0])
lammin, lammax= 0.06687894741407863 2.99999999999935
kappa= 44.857165311304264
We observe the following behaviour:
the condition number is independent of the refinement level
the condition number grows with the number of sub-domains
81.2. Analysis of the DD preconditioner#
Theorem: The eigenvalues of the domain decomposition preconditioner are bounded as
Outline of the proof: We apply the Additive Schwarz Lemma. The ASM lemma provides the representation
By assuming shape regularity of the domains, only a small, fixed number of sub-domains overlap. From that we get the constant upper bound
Partition on unity:
We call the set of functions
and
For the definition of the overlapping domain decomposition we can define a partition of unity as follows:
These functions are
However, these function do not sum up to 1, so we rescale by their sum to obtain a partition of unity:
We need local interpolation-like operators
$
which are projectors onto
and satisfy the approximation estimate
$
We cannot use simple nodal interpolation since this is not well-defined for
We have now the tools to conduct the proof for the sub-space decomposition:
For a given
These
By linearity of the quasi-interpolation, the partition of unity,
and the projection property they are a decomposition of the given function
Finally, we have to bound the norm of the decomposition. First,
we use the boundedness of the quasi-interpolation in the
We continue with the product rule, and bounds for the pu-functions and their derivatives:
Finally, we sum over all sub-domains. We use that only a small, fixed number of sub-domains overlap:
In the last step we used Friedrichs’ inequality to bound the
81.3. Overlapping DD Methods with coarse grid#
Now we add an additional coarse grid correction step. We assume that we have an additional finite element space
We define this two-level preconditioner
where
from ngsolve import *
from ngsolve.webgui import Draw
Same as before, but now we assemble the bilinear-form already before mesh refinement, and invert the (small) coarse grid matrix by a direct solver:
mesh = Mesh(unit_square.GenerateMesh(maxh=0.3))
fesdom = L2(mesh, order=0, autoupdate=True)
fes = H1(mesh, order=1, dirichlet="bottom", autoupdate=True)
gfdom = GridFunction(fesdom, multidim=mesh.nv, nested=True, autoupdate=True)
for el in mesh.Elements(VOL):
for v in el.vertices:
gfdom.vecs[v.nr][el.nr] = 1
u,v = fes.TnT()
a = BilinearForm(grad(u)*grad(v)*dx).Assemble()
a0inv = a.mat.Inverse(fes.FreeDofs())
levels = 2
for l in range(levels):
mesh.Refine()
copy mesh complete
the local inverses:
a.Assemble()
pre = None
for v in gfdom.vecs:
mask = BitArray(fes.FreeDofs())
for el in fes.Elements(VOL):
if v[el.nr] == 0:
for d in el.dofs:
mask[d] = False
invi = a.mat.Inverse(freedofs=mask, inverse="sparsecholesky")
pre = pre+invi if pre else invi
We have the prolongation as a function call, prolongating a vector in-place. Prolongate(l)
prolongates a vector from level l-1
to level l
. The transpose of the prolongation matrix is the restriction matrix, again implemented as an in-place operation:
class ProlongationOp(BaseMatrix):
def __init__ (self, fes, levels, nc):
super(ProlongationOp, self).__init__()
self.fes = fes
self.levels = levels
self.nc = nc
def Mult (self, x, y):
y[IntRange(0, self.nc)] = x
for l in range(self.levels):
fes.Prolongation().Prolongate(l+1, y)
def MultTrans (self, y, x):
hy = y.CreateVector()
hy.data = y
for l in range(self.levels, 0, -1):
fes.Prolongation().Restrict(l, hy)
x.data = hy[IntRange(0, self.nc)]
def Height (self):
return self.fes.ndof
def Width (self):
return self.fes.ndof
P = ProlongationOp (fes, levels, a0inv.height)
C2l = P @ a0inv @ P.T + pre
lam = list(EigenValues_Preconditioner(a.mat, C2l))
print ("lammin, lammax=", lam[0], lam[-1])
print ("kappa=", lam[-1]/lam[0])
lammin, lammax= 1.0427258429588369 3.692782966558738
kappa= 3.5414706478167877
81.4. Analysis of the 2-level method:#
We apply now the ASM - theory to the sub-space splitting
Theorem: The condition number of the 2-level method is bounded, i.e.
Proof: By the ASM Lemma we have
Again, only a fixed number of sub-spaces overlap, which immediately proves the constant
We have to come up with an explicit decomposition
By semi-norm continuity of
and for the rest
We proceed as above to decompose
The inverse factor
81.5. Comparison to DD with minimal overlap#
In comparison to the small overlap in the previous section, we have now an overlap of a fixed width, independent of the mesh-size. It is more expensive, but the condition number does not deteriorate for smaller mesh-size. The second difference is that we have now a coarse space containing the continuous, piecewise linear finite element functions. Thanks to this coarse space, we have a good approximation property of coarse grid functions.