Forms

Bramble._dirichlet_bc_indices!Method
_dirichlet_bc_indices!(A, marker_indices)

Internal helper to apply Dirichlet boundary conditions to matrix A for a given set of indices.

source
Bramble._dirichlet_bc_indices!Method

dirichletbcindices!(A::SparseMatrixCSC, indexin_marker::BitVector)

Applies Dirichlet boundary conditions to a sparse matrix A by directly manipulating its CSC data structure for high performance.

source
Bramble.dirichlet_bc!Method
dirichlet_bc!(A::AbstractMatrix, Ωₕ::AbstractMeshType, labels::Symbol...)

Applies Dirichlet boundary conditions to matrix A based on marked regions in the mesh Ωₕ.

For each index i associated with the given Dirichlet labels, this function:

  1. Sets all elements in the i-th row of A to zero.
  2. Sets the diagonal element A[i, i] to one.
source
Bramble.dirichlet_bc!Method
dirichlet_bc!(v::AbstractVector, Ωₕ::AbstractMeshType, bcs::DirichletConstraint, labels::Symbol...)

Apply Dirichlet boundary conditions to vector v using the DirichletConstraint object bcs and the mesh Ωₕ.

source
Bramble.symmetrize!Method
symmetrize!(A, F, Ωₕ, labels)

Modifies the linear system Ax = F to make A symmetric after applying Dirichlet conditions. It updates the vector F and zeros out the columns of A corresponding to Dirichlet nodes.

The algorithm goes as follows: for any given row i where Dirichlet boundary conditions have been applied

- calculate `dᵢ = cᵢ .* F`, where `cᵢ` is the `i`-th column of `A`;
- replace `F` by substracting `dᵢ` to `F` (except for the `i`-th component)
- replace all elements in the `i`-th column of `A` (except the `i`-th by zero).
source
Bramble.LinearFormType
struct LinearForm{TestType,F} <: LinearFormType
	test_space::TestType
	form_expr::F
end

Structure to store the data associated with a llinear form

\[\begin{array}{rcll} l \colon & W_h &\longrightarrow &\mathbb{R} \\ & v &\longmapsto & l(v). \end{array}\]

The field form_expr has the expression of the form and the remaining field stores the test space $W_h$.

source
Bramble._assemble!Method
_assemble!(x::AbstractVector, l::LinearForm)

In-place assemble of a linear form into a given vector.

source
Bramble.BilinearFormType
struct BilinearForm{TrialType,TestType,F} <: BilinearFormType
	trial_space::TrialType
	test_space::TestType
	form_expr::F
end

Structure to store the data associated with a bilinear form

\[\begin{array}{rcll} a \colon & W_h \times V_h &\longrightarrow &\mathbb{R} \\ & (u,v) &\longmapsto & a(u,v). \end{array}\]

The field form_expr has the expression of the form and the remaining fields store the trial and test spaces $W_h$ and $V_h$.

source
Bramble._assemble!Method
_assemble!(A::AbstractMatrix, a::BilinearForm)

Helper function. Copies the assembled matrix of a bilinear form to a given matrix.

source
Bramble._assembleMethod
_assemble(a::BilinearForm)

Helper function. Returns the assembled matrix of a bilinear form.

source