GridapSolvers.PatchBasedSmoothers
GridapSolvers.PatchBasedSmoothers.PatchBasedLinearSolver
— Typestruct PatchBasedLinearSolver <: LinearSolver
...
end
Sub-assembled linear solver for patch-based methods. Given a bilinear form a
and a space decomposition V = Σ_i V_i
given by a patch space, returns a global correction given by aggregated local corrections, i.e
dx = Σ_i w_i I_i inv(A_i) (I_i)^* x
where A_i
is the patch-local system matrix defined by
(A_i u_i, v_i) = a(u_i,v_i) ∀ v_i ∈ V_i
and I_i
is the natural injection from the patch space to the global space. The aggregation can be un-weighted (i.e. w_i = 1
) or weighted, where w_i = 1/#(i)
.
GridapSolvers.PatchBasedSmoothers.PatchBasedLinearSolver
— Methodfunction PatchBasedLinearSolver(
biform::Function,
patch_space::FESpace,
space::FESpace;
local_solver = LUSolver(),
is_nonlinear = false,
weighted = false
)
Returns an instance of PatchBasedLinearSolver
from its underlying properties. Local patch-systems are solved with local_solver
. If weighted
, uses weighted patch aggregation to compute the global correction.
GridapSolvers.PatchBasedSmoothers.PatchBoundaryStyle
— Typeabstract type PatchBoundaryStyle end
struct PatchBoundaryExclude <: PatchBoundaryStyle end
struct PatchBoundaryInclude <: PatchBoundaryStyle end
Controls the boundary consitions imposed at the patch boundaries for the sub-spaces.
PatchBoundaryInclude
: No BCs are imposed at the patch boundaries.PatchBoundaryExclude
: Zero dirichlet BCs are imposed at the patch boundaries.
GridapSolvers.PatchBasedSmoothers.PatchDecomposition
— Typestruct PatchDecomposition{Dr,Dc,Dp} <: DiscreteModel{Dc,Dp}
Represents a patch decomposition of a discrete model, i.e an overlapping cell covering {Ω_i}
of Ω
such that Ω = Σ_i Ω_i
.
Properties:
Dr::Integer
: Dimension of the patch rootmodel::DiscreteModel{Dc,Dp}
: Underlying discrete modelpatch_cells::Table
: [patch][local cell] -> cellpatch_cells_overlapped::Table
: [patch][local cell] -> overlapped cellpatch_cells_faces_on_boundary::Table
: [d][overlapped cell][local face] -> face is on patch boundary
GridapSolvers.PatchBasedSmoothers.PatchDecomposition
— Methodfunction PatchDecomposition(
model::DiscreteModel{Dc,Dp};
Dr=0,
patch_boundary_style::PatchBoundaryStyle=PatchBoundaryExclude(),
boundary_tag_names::AbstractArray{String}=["boundary"]
)
Returns an instance of PatchDecomposition
from a given discrete model.
GridapSolvers.PatchBasedSmoothers.PatchFESpace
— Typestruct PatchFESpace <: SingleFieldFESpace
...
end
FESpace representing a patch-based subspace decomposition V = Σ_i V_i
of a global space V
.
GridapSolvers.PatchBasedSmoothers.PatchFESpace
— Methodfunction PatchFESpace(
space::FESpaces.SingleFieldFESpace,
patch_decomposition::PatchDecomposition,
cell_conformity::CellConformity;
patches_mask=Fill(false,num_patches(patch_decomposition))
)
Constructs a PatchFESpace
from a global SingleFieldFESpace
, a PatchDecomposition
and a CellConformity
instance.
If patches_mask[p] = true
, the patch p
is ignored. Used in parallel.
GridapSolvers.PatchBasedSmoothers.PatchFESpace
— Methodfunction PatchFESpace(
space::FESpaces.SingleFieldFESpace,
patch_decomposition::PatchDecomposition,
reffe::Union{ReferenceFE,Tuple{<:ReferenceFEs.ReferenceFEName,Any,Any}};
conformity=nothing,
patches_mask=Fill(false,num_patches(patch_decomposition))
)
Constructs a PatchFESpace
from a global SingleFieldFESpace
and a PatchDecomposition
. The conformity of the FESpace is deduced from reffe
and conformity
, which need to be the same as the ones used to construct the global FESpace.
If patches_mask[p] = true
, the patch p
is ignored. Used in parallel.
GridapSolvers.PatchBasedSmoothers.PatchFESpace
— Methodfunction PatchFESpace(
space::Gridap.MultiField.MultiFieldFESpace,
patch_decomposition::PatchDecomposition,
cell_conformity::Vector{<:CellConformity};
kwargs...
)
PatchFESpace
constructor for MultiFieldFESpace
. Returns a MultiFieldFESpace
of PatchFESpace
s .
GridapSolvers.PatchBasedSmoothers.PatchProlongationOperator
— Typestruct PatchProlongationOperator end
A PatchProlongationOperator
is a modified prolongation operator such that given a coarse solution xH
returns
xh = Ih(xH) - yh
where yh
is a subspace-based correction computed by solving local problems on coarse cells within the fine mesh.
GridapSolvers.PatchBasedSmoothers.PatchProlongationOperator
— Methodfunction PatchProlongationOperator(
lev :: Integer,
sh :: FESpaceHierarchy,
PD :: PatchDecomposition,
lhs :: Function,
rhs :: Function;
is_nonlinear=false
)
Returns an instance of PatchProlongationOperator
for a given level lev
and a given FESpaceHierarchy sh
. The subspace-based correction on a solution uH
is computed by solving local problems given by
lhs(u_i,v_i) = rhs(uH,v_i) ∀ v_i ∈ V_i
where V_i
is the patch-local space indiced by the PatchDecomposition PD
.
GridapSolvers.PatchBasedSmoothers.PatchTriangulation
— Typestruct PatchTriangulation{Dc,Dp} <: Triangulation{Dc,Dp}
...
end
Wrapper around a Triangulation, for patch-based assembly.