FEMatrix

A FEMatrix consists of FEMatrixBlocks that share a common ExtendableSparseMatrix. Each block is associated to two FESpaces and can only write into a submatrix of the common sparse matrix specified by offsets.

ExtendableFEMBase.FEMatrixType
struct FEMatrix{TvM, TiM, TvG, TiG, nbrow, nbcol, nbtotal} <: SparseArrays.AbstractSparseArray{TvM, TiM, 2}

an AbstractMatrix (e.g. an ExtendableSparseMatrix) with an additional layer of several FEMatrixBlock subdivisions each carrying coefficients for their associated pair of FESpaces

source
ExtendableFEMBase.FEMatrixMethod
FEMatrix{TvM,TiM}(FESX, FESY; name = "auto")

Creates FEMatrix with one rectangular block (FESX,FESY) if FESX and FESY are single FESpaces, or a rectangular block matrix with blocks corresponding to the entries of the FESpace vectors FESX and FESY. Optionally a name for the matrix can be given.

source
ExtendableFEMBase.FEMatrixMethod
FEMatrix{TvM,TiM}(name::String, FES::FESpace{TvG,TiG,FETypeX,APTX}) where {TvG,TiG,FETypeX,APTX}

Creates FEMatrix with one square block (FES,FES).

source
ExtendableFEMBase.FEMatrixMethod
FEMatrix{TvM,TiM}(FESX, FESY; name = "auto")

Creates an FEMatrix with blocks coressponding to the ndofs of FESX (rows) and FESY (columns).

source
ExtendableFEMBase.FEMatrixBlockType
struct FEMatrixBlock{TvM, TiM, TvG, TiG, FETypeX, FETypeY, APTX, APTY} <: AbstractArray{TvM, 2}

block of an FEMatrix that carries coefficients for an associated pair of FESpaces and can be assigned as an two-dimensional AbstractArray (getindex, setindex, size)

source
Base.fill!Method
fill!(B::FEMatrixBlock{Tv, Ti}, value)

Custom fill function for FEMatrixBlock (only fills the already present nzval in the block, not the complete FEMatrix).

source
Base.lengthMethod
length(
    _::FEMatrix{TvM, TiM, TvG, TiG, nbrow, nbcol, nbtotal}
) -> Any

Custom length function for FEMatrix that gives the total number of defined FEMatrixBlocks in it

source
Base.showMethod
show(
    io::IO,
    FEM::FEMatrix{TvM, TiM, TvG, TiG, nbrow, nbcol, nbtotal}
)

Custom show function for FEMatrix that prints some information on its blocks.

source
Base.sizeMethod
size(FEB::FEMatrixBlock) -> Tuple{Int64, Int64}

Custom size function for FEMatrixBlock that gives a tuple with the size of the block (that coressponds to the number of degrees of freedoms in X and Y)

source
Base.sizeMethod
size(
    _::FEMatrix{TvM, TiM, TvG, TiG, nbrow, nbcol, nbtotal}
) -> Tuple{Any, Any}

Custom size function for FEMatrix that gives a tuple with the number of rows and columns of the FEBlock overlay

source
ExtendableFEMBase.add!Method
add!(A::FEMatrix{Tv, Ti}, B::FEMatrix{Tv, Ti}; kwargs...)

Adds FEMatrix/ExtendableSparseMatrix/CSCMatrix B to FEMatrix A.

source
ExtendableFEMBase.addblock!Method
addblock!(
    A::FEMatrixBlock{Tv, Ti},
    B::FEMatrixBlock{Tv, Ti};
    factor,
    transpose
)

Adds FEMatrixBlock B to FEMatrixBlock A.

source
ExtendableFEMBase.addblock!Method
addblock!(
    A::FEMatrixBlock{Tv},
    B::ExtendableSparse.AbstractExtendableSparseMatrixCSC{Tv, Ti<:Integer};
    factor,
    transpose
)

Adds ExtendableSparseMatrix B to FEMatrixBlock A.

source
ExtendableFEMBase.addblock!Method
addblock!(
    A::FEMatrixBlock{Tv},
    cscmat::SparseArrays.SparseMatrixCSC{Tv, Ti<:Integer};
    factor,
    transpose
)

Adds SparseMatrixCSC B to FEMatrixBlock A.

source
ExtendableFEMBase.addblock_matmul!Method
addblock_matmul!(
    a::AbstractArray{Tv, 1},
    B::FEMatrixBlock{Tv, Ti},
    b::AbstractArray{Tv, 1};
    factor,
    transposed
)

Adds matrix-vector product B times b to FEVectorBlock a.

source
ExtendableFEMBase.addblock_matmul!Method
addblock_matmul!(
    A::FEMatrixBlock{Tv},
    cscmatB::SparseArrays.SparseMatrixCSC{Tv, Ti},
    cscmatC::SparseArrays.SparseMatrixCSC{Tv, Ti};
    factor,
    transposed
)

Adds matrix-matrix product B times C to FEMatrixBlock A.

source
ExtendableFEMBase.addblock_matmul!Method
addblock_matmul!(
    a::FEVectorBlock{Tv},
    B::ExtendableSparse.AbstractExtendableSparseMatrixCSC{Tv, Ti<:Integer},
    b::FEVectorBlock{Tv};
    factor
)

Adds matrix-vector product B times b to FEVectorBlock a.

source
ExtendableFEMBase.addblock_matmul!Method
addblock_matmul!(
    a::FEVectorBlock{Tv},
    B::FEMatrixBlock{Tv, Ti},
    b::FEVectorBlock{Tv};
    factor,
    transposed
)

Adds matrix-vector product B times b (or B' times b if transposed = true) to FEVectorBlock a.

source
ExtendableFEMBase.ldrdmatmulMethod
ldrdmatmul(
    a1::AbstractArray{Tv, 1},
    a2::AbstractArray{Tv, 1},
    B::ExtendableSparse.AbstractExtendableSparseMatrixCSC{Tv, Ti<:Integer},
    b1::AbstractArray{Tv, 1},
    b2::AbstractArray{Tv, 1};
    factor
) -> Any

Computes vector'-matrix-vector product (a1-a2)'B(b1-b2).

source
ExtendableFEMBase.lrmatmulMethod
lrmatmul(
    a::AbstractArray{Tv, 1},
    B::ExtendableSparse.AbstractExtendableSparseMatrixCSC{Tv, Ti<:Integer},
    b::AbstractArray{Tv, 1};
    factor
) -> Any

Computes vector'-matrix-vector product a'Bb.

source
ExtendableFEMBase.nbcolsMethod
nbcols(
    _::FEMatrix{TvM, TiM, TvG, TiG, nbrow, nbcol, nbtotal}
) -> Any

Gives the number of FEMatrixBlocks in each row.

source
ExtendableFEMBase.nbrowsMethod
nbrows(
    _::FEMatrix{TvM, TiM, TvG, TiG, nbrow, nbcol, nbtotal}
) -> Any

Gives the number of FEMatrixBlocks in each column.

source