Solver
Solving requires a spatial and stochastic discretization. Both are connected in a special vector structure that is passed to a solve function that runs a special iterative solver for each model problem.
SGFEVector
The spatial discretization is represented by s single finite element space from ExtendableFEM.jl, while the stochastic discretization is represented by a tensorized basis for the parameter space of the stochastic coefficient. Both have to be prepared in advance.
Currently it is not possible to use different finite element spaces for different multi-indices, but this feature might be added in the future.
ExtendableASGFEM.SGFEVector
— Typestruct SGFEVector{T, Tv, Ti, ONBType<:ONBasis, MIType}
structure that builds upon ExtendableFEMBase.FEVector and adds information on the stochastic discretization, i.e. the used TensoriedBasis
ExtendableASGFEM.SGFEVector
— MethodSGFEVector(
FES::Array{<:ExtendableFEMBase.FESpace{Tv, Ti}, 1},
TB::TensorizedBasis{Tv, ONBType, MIType};
active_modes,
T,
unames
) -> SGFEVector
constructs an SGFEVector for the given (spatial) finite element space FES
and the (tensorized basis of the stochastic discretization) TB
.
Base.getindex
— Methodgetindex(
SGFEV::SGFEVector,
u::Int64,
i::Int64
) -> ExtendableFEMBase.FEVectorBlock
returns the FEVectorBlock for the i
-th stochastic mode of the u
-th unknown
Base.getindex
— Methodgetindex(
SGFEV::SGFEVector,
i::Int64
) -> ExtendableFEMBase.FEVectorBlock
returns the i
-th stochastic mode
Base.length
— Methodlength(SGFEV::SGFEVector) -> Int64
returns the length of the full vector, i.e., the total number of degrees of freedom
Base.show
— Methodshow(io::IO, SGFEV::SGFEVector)
Custom show
function for FEVector
that prints some information on its blocks.
Base.size
— Methodsize(SGFEV::SGFEVector)
returns a tuple with the number of active stochastic modes and the number of spatial degrees of freedom
ExtendableASGFEM.fetypes
— Methodfetypes(SGFEV::SGFEVector) -> Vector
returns the finite element types of the (spatial) FE spaces
ExtendableASGFEM.num_multiindices
— Methodnum_multiindices(SGFEV::SGFEVector) -> Int64
returns the number of active modes (that are used from the stored tensorized basis)
ExtendableASGFEM.set_sample!
— Methodset_sample!(SGFEV::SGFEVector, S::AbstractVector)
evaluates the SGVector at that sample and stores the results in SGFEV.FEV.
Solve function
ExtendableASGFEM.solve!
— Methodsolve!(
::Type{ExtendableASGFEM.AbstractModelProblem},
sol::SGFEVector,
C::AbstractStochasticCoefficient;
rhs,
use_iterative_solver,
bonus_quadorder_f,
bonus_quadorder_a,
kwargs...
)
solves the specified model problem with the given stochastic coefficient C
and right-hand side rhs
and writes the solution into sol
. Via this sol
vector the spatial and stochastic discretization is communicated as well as initial data for the iterative solver. The boolean use_iterative_solver
(default is true) determines if the iterative solver is used or if the full matrix is assembled and solved by a direct solver (very slow for larger systems). The parameters bonus_quadorder_f
(default is 0) and bonus_quadorder_a
(default is 2) can be used to increase the quadrature order in terms that involve the rhs or the stochastic coefficient, respectively.