Gridap.Algebra
Gridap.Algebra — Module
The exported names are
AffineOperatorArrayBuilderBackslashSolverDoNotLoopLUSolverLinearSolverLoopLoopStyleMinCPUMinMemoryNLSolverNewtonRaphsonSolverNonlinearOperatorNonlinearSolverNumericalSetupSparseMatrixBuilderSymbolicSetupadd_entries!add_entry!allocate_coo_vectorsallocate_in_domainallocate_in_rangeallocate_jacobianallocate_matrixallocate_matrix_and_vectorallocate_residualallocate_residual_and_jacobianallocate_vectoraxpy_entries!copy_entries!create_from_nzfinalize_coo!get_array_typeget_matrixget_vectorhessianhessian!is_entry_storedjacobianjacobian!length_to_ptrs!muladd!numerical_setupnumerical_setup!nz_allocationnz_counternz_indexpush_coo!residualresidual!residual_and_jacobianresidual_and_jacobian!rewind_ptrs!solvesolve!sparse_from_coosymbolic_setuptest_linear_solvertest_nonlinear_operatortest_nonlinear_solverzero_initial_guess
Gridap.Algebra.AffineOperator — Type
struct AffineOperator{A<:AbstractMatrix,B<:AbstractVector} <: NonlinearOperator
matrix::A
vector::B
endGridap.Algebra.BackslashSolver — Type
struct BackslashSolver <: LinearSolver endWrapper of the backslash solver available in julia This is typically faster than LU for a single solve
Gridap.Algebra.LUSolver — Type
struct LUSolver <: LinearSolver endWrapper of the LU solver available in julia
Gridap.Algebra.LinearSolver — Type
abstract type LinearSolver <: NonlinearSolver endGridap.Algebra.NLSolver — Type
struct NLSolver <: NonlinearSolver
# private fields
endThe cache generated when using this solver has a field result that hosts the result object generated by the underlying nlsolve function. It corresponds to the most latest solve.
Gridap.Algebra.NLSolver — Method
NLSolver(ls::LinearSolver;kwargs...)
NLSolver(;kwargs...)Same kwargs as in nlsolve. If ls is provided, it is not possible to use the linsolve kw-argument.
Gridap.Algebra.NewtonRaphsonSolver — Type
struct NewtonRaphsonSolver <:NonlinearSolver
# Private fields
endVanilla Newton-Raphson method
Gridap.Algebra.NonlinearOperator — Type
abstract type NonlinearOperator <: GridapType endGridap.Algebra.NonlinearSolver — Type
abstract type NonlinearSolver <: GridapType endGridap.Algebra.NumericalSetup — Type
abstract type NumericalSetup <: GridapType endGridap.Algebra.SymbolicSetup — Type
abstract type SymbolicSetup <: GridapType endGridap.Algebra.add_entries! — Method
add_entries!(combine::Function,A,vs,is,js)Add several entries only for positive input indices. Returns A.
Gridap.Algebra.add_entry! — Method
add_entry!(combine::Function,A,v,i...)
add_entry!(A,v,i...)Add an entry. Returns A.
Gridap.Algebra.allocate_in_domain — Method
allocate_in_domain(matrix::AbstractMatrix{T}) where TAllocate a vector in the domain of matrix matrix.
Gridap.Algebra.allocate_in_domain — Method
allocate_in_domain(::Type{V},matrix) where VAllocate a vector of type V in the domain of matrix matrix.
Gridap.Algebra.allocate_in_range — Method
allocate_in_range(matrix::AbstractMatrix{T}) where TAllocate a vector in the range of matrix matrix.
Gridap.Algebra.allocate_in_range — Method
allocate_in_range(::Type{V},matrix) where VAllocate a vector of type V in the range of matrix matrix.
Gridap.Algebra.allocate_jacobian — Method
allocate_jacobian(op::NonlinearOperator,x::AbstractVector)Gridap.Algebra.allocate_residual — Method
allocate_residual(op::NonlinearOperator,x::AbstractVector)Gridap.Algebra.allocate_residual_and_jacobian — Method
allocate_residual_and_jacobian(op::NonlinearOperator,x::AbstractVector)Gridap.Algebra.allocate_vector — Method
allocate_vector(::Type{V},indices) where VAllocate a vector of type V indexable at the indices indices
Gridap.Algebra.axpy_entries! — Method
axpy_entries!(α::Number, A::T, B::T) where {T<: AbstractMatrix} -> TEfficient implementation of axpy! for sparse matrices.
Gridap.Algebra.copy_entries! — Method
copy_entries!(a,b)Copy the entries of array b into array a. Returns a.
Gridap.Algebra.finalize_coo! — Method
finalize_coo!(::Type,I,J,V,m,n)Check and insert diagonal entries in COO vectors if needed.
Gridap.Algebra.get_matrix — Method
get_matrix(operator)Return the matrix corresponding to the assembled left hand side of the operator. This matrix incorporates all boundary conditions and constraints.
Gridap.Algebra.get_vector — Method
get_vector(operator)Return the vector corresponding to the assembled right hand side of the operator. This vector includes all boundary conditions and constraints.
Gridap.Algebra.is_entry_stored — Method
is_entry_stored(::Type,i,j) -> BoolTells if the entry with coordinates [i,j] will be stored in the coo vectors.
Gridap.Algebra.jacobian! — Method
jacobian!(A::AbstractMatrix,op::NonlinearOperator,x::AbstractVector)Gridap.Algebra.jacobian — Method
jacobian(op::NonlinearOperator,x::AbstractVector)Gridap.Algebra.length_to_ptrs! — Method
length_to_ptrs!(ptrs)Given a vector of integers, mutate it from length state to pointer state.
Gridap.Algebra.muladd! — Method
muladd!(c,a,b)Matrix multiply a*b and add to result to c. Returns c.
Gridap.Algebra.numerical_setup! — Method
numerical_setup!(::NumericalSetup,mat::AbstractMatrix)Gridap.Algebra.numerical_setup — Method
numerical_setup(::SymbolicSetup,mat::AbstractMatrix) -> NumericalSetupGridap.Algebra.push_coo! — Method
push_coo!(::Type, I,J,V,i,j,v)Inserts entries in COO vectors for further building a sparse matrix of type T.
Gridap.Algebra.residual! — Method
residual!(b::AbstractVector,op::NonlinearOperator,x::AbstractVector)Gridap.Algebra.residual — Method
residual(op::NonlinearOperator,x::AbstractVector)Gridap.Algebra.residual_and_jacobian! — Method
residual_and_jacobian!(
b::AbstractVector, A::AbstractMatrix,
op::NonlinearOperator, x::AbstractVector)Gridap.Algebra.residual_and_jacobian — Method
residual_and_jacobian(op::NonlinearOperator,x::AbstractVector)Gridap.Algebra.rewind_ptrs! — Method
rewind_ptrs!(ptrs)Rewind the given vector of pointers.
Gridap.Algebra.solve! — Method
solve!(x::AbstractVector,ls::LinearSolver,A::AbstractMatrix,b::AbstractVector)Gridap.Algebra.solve! — Method
solve!(
x::AbstractVector,
ls::LinearSolver,
op::AffineOperator,
cache,
newmatrix::Bool)Gridap.Algebra.solve! — Method
solve!(x::AbstractVector,nls::NonlinearSolver,op::NonlinearOperator,cache)Solve using the cache object from a previous solve.
Gridap.Algebra.solve! — Method
solve!(x::AbstractVector,nls::NonlinearSolver,op::NonlinearOperator)Usage:
cache = solve!(x,nls,op)
The returned cache object can be used in subsequent solves:
cache = solve!(x,nls,op,cache)
Gridap.Algebra.solve! — Method
solve!(x::AbstractVector,::NumericalSetup,b::AbstractVector)Gridap.Algebra.solve — Method
solve(ls::LinearSolver,A::AbstractMatrix,b::AbstractVector)Gridap.Algebra.solve — Method
solve(nls::NonlinearSolver,op::NonlinearOperator)Creates and uses a zero initial guess.
Gridap.Algebra.sparse_from_coo — Method
sparse_from_coo(::Type,I,J,V,m,n)Gridap.Algebra.symbolic_setup — Method
symbolic_setup(::LinearSolver,mat::AbstractMatrix) -> SymbolicSetupGridap.Algebra.test_linear_solver — Method
test_linear_solver(
ls::LinearSolver,
A::AbstractMatrix,
b::AbstractVector,
x::AbstractVector)Gridap.Algebra.test_nonlinear_operator — Function
test_nonlinear_operator(
op::NonlinearOperator,
x::AbstractVector,
b::AbstractVector,
pred=isapprox;
jac=nothing)Gridap.Algebra.test_nonlinear_solver — Function
test_nonlinear_solver(
nls::NonlinearSolver,
op::NonlinearOperator,
x0::AbstractVector,
x::AbstractVector,
pred::Function=isapprox)Gridap.Algebra.zero_initial_guess — Method
zero_initial_guess(op::NonlinearOperator)