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.FEMatrix
— Typestruct 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
ExtendableFEMBase.FEMatrix
— MethodFEMatrix{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.
ExtendableFEMBase.FEMatrix
— MethodFEMatrix{TvM,TiM}(name::String, FES::FESpace{TvG,TiG,FETypeX,APTX}) where {TvG,TiG,FETypeX,APTX}
Creates FEMatrix with one square block (FES,FES).
ExtendableFEMBase.FEMatrix
— MethodFEMatrix{TvM,TiM}(FESX, FESY; name = "auto")
Creates an FEMatrix with blocks coressponding to the ndofs of FESX (rows) and FESY (columns).
ExtendableFEMBase.FEMatrixBlock
— Typestruct 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)
Base.fill!
— Methodfill!(B::FEMatrixBlock{Tv, Ti}, value)
Custom fill
function for FEMatrixBlock
(only fills the already present nzval in the block, not the complete FEMatrix).
Base.length
— Methodlength(
_::FEMatrix{TvM, TiM, TvG, TiG, nbrow, nbcol, nbtotal}
) -> Any
Custom length
function for FEMatrix
that gives the total number of defined FEMatrixBlocks in it
Base.show
— Methodshow(
io::IO,
FEM::FEMatrix{TvM, TiM, TvG, TiG, nbrow, nbcol, nbtotal}
)
Custom show
function for FEMatrix
that prints some information on its blocks.
Base.size
— Methodsize(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)
Base.size
— Methodsize(
_::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
ExtendableFEMBase.add!
— Methodadd!(A::FEMatrix{Tv, Ti}, B::FEMatrix{Tv, Ti}; kwargs...)
Adds FEMatrix/ExtendableSparseMatrix/CSCMatrix B to FEMatrix A.
ExtendableFEMBase.addblock!
— Methodaddblock!(
A::FEMatrixBlock{Tv, Ti},
B::FEMatrixBlock{Tv, Ti};
factor,
transpose
)
Adds FEMatrixBlock B to FEMatrixBlock A.
ExtendableFEMBase.addblock!
— Methodaddblock!(
A::FEMatrixBlock{Tv},
B::ExtendableSparse.AbstractExtendableSparseMatrixCSC{Tv, Ti<:Integer};
factor,
transpose
)
Adds ExtendableSparseMatrix B to FEMatrixBlock A.
ExtendableFEMBase.addblock!
— Methodaddblock!(
A::FEMatrixBlock{Tv},
cscmat::SparseArrays.SparseMatrixCSC{Tv, Ti<:Integer};
factor,
transpose
)
Adds SparseMatrixCSC B to FEMatrixBlock A.
ExtendableFEMBase.addblock_matmul!
— Methodaddblock_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.
ExtendableFEMBase.addblock_matmul!
— Methodaddblock_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.
ExtendableFEMBase.addblock_matmul!
— Methodaddblock_matmul!(
a::FEVectorBlock{Tv},
B::ExtendableSparse.AbstractExtendableSparseMatrixCSC{Tv, Ti<:Integer},
b::FEVectorBlock{Tv};
factor
)
Adds matrix-vector product B times b to FEVectorBlock a.
ExtendableFEMBase.addblock_matmul!
— Methodaddblock_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.
ExtendableFEMBase.ldrdmatmul
— Methodldrdmatmul(
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).
ExtendableFEMBase.lrmatmul
— Methodlrmatmul(
a::AbstractArray{Tv, 1},
B::ExtendableSparse.AbstractExtendableSparseMatrixCSC{Tv, Ti<:Integer},
b::AbstractArray{Tv, 1};
factor
) -> Any
Computes vector'-matrix-vector product a'Bb.
ExtendableFEMBase.nbcols
— Methodnbcols(
_::FEMatrix{TvM, TiM, TvG, TiG, nbrow, nbcol, nbtotal}
) -> Any
Gives the number of FEMatrixBlocks in each row.
ExtendableFEMBase.nbrows
— Methodnbrows(
_::FEMatrix{TvM, TiM, TvG, TiG, nbrow, nbcol, nbtotal}
) -> Any
Gives the number of FEMatrixBlocks in each column.