Skip to content

Commit 908c889

Browse files
committed
small improvements in doc
1 parent 04156db commit 908c889

File tree

8 files changed

+27
-14
lines changed

8 files changed

+27
-14
lines changed

docs/src/solvers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ advance.
1515

1616
!!! note
1717

18-
Currently it is not possible to used different finite element spaces for different multi-indices,
18+
Currently it is not possible to use different finite element spaces for different multi-indices,
1919
but this feature might be added in the future.
2020

2121
```@autodocs

docs/src/tonbasis.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
Each multi-index ``\mu = [\mu_1,\mu_2,\ldots,\mu_M]``
44
encodes a tensorized basis function for the parameter space
5-
of the form ``H_\mu = \pro_{k=1}^M H_k`` where the
5+
of the form ``H_\mu = \prod_{k=1}^M H_k`` where the
66
``H_k`` are the orthogonal polynomials.
77
The TensorizedBasis collects all information necessary
88
to evaluate those basis functions, i.e. the set of multi-indices
99
and the triple products of the form ``(y_mH_\mu, H_\lambda)``
10-
for each ``m`` and ``\mu, \lambda`` in the set of multi-indices.
10+
for each ``m`` and ``\mu, \lambda`` in the set of multi-indices
11+
as a sparse matrix. There are analytic formulas to evaluate
12+
these triple products in terms of recurrence coefficients, but it makes
13+
sense to store them for faster evaluation times.
1114

1215

1316

docs/src/tonbasis.pdf

356 Bytes
Binary file not shown.

src/coefficients/coefficients.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ $(TYPEDEF)
33
44
A stochastic coefficient is assumed to have the Karhunen-Loeve expansion form
55
6-
``a(x,y) = a_0(x) + ∑_m y_m a_m(x)``
7-
6+
``a(y,x) = a_0(x) + \\sum_{m=1}^\\infty y_m a_m(x)``
87
with (centered independent) random variables ``y_m`` and
98
basis functions ``a_m(x)`` that need to be specified (together with their gradients)
109
and expectation value ``a_0``

src/estimate.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ computes the residual-based a posteriori error estimator for the current solutio
4242
for the given model problem and stochastic coefficient `C` and returns:
4343
- `eta4modes` = array with total error estimators for each multi-index (corresponding to the enriched set of multi-indices with the current active modes coming first)
4444
- `eta4cell` = array with total error estimators for each cell in grid (for spatial refinement)
45-
- `multi_indices_extended = enriched set of multi-indices used for the computations
45+
- `multi_indices_extended` = enriched set of multi-indices used for the computations
4646
4747
"""
4848
function estimate(::Type{AbstractModelProblem}, sol::SGFEVector, C::AbstractStochasticCoefficient; kwargs...)

src/modelproblems/modelproblems.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,21 @@ $(TYPEDSIGNATURES)
66
solves the specified model problem with the given stochastic coefficient `C` and right-hand side `rhs`
77
and writes the solution into `sol`. Via this `sol` vector the spatial and stochastic discretization
88
is communicated as well as initial data for the iterative solver.
9+
The boolean `use_iterative_solver` (default is true) determines if the iterative solver is used
10+
or if the full matrix is assembled and solved by a direct solver (very slow for larger systems).
11+
The parameters `bonus_quadorder_f` (default is 0) and `bonus_quadorder_a` (default is 2) can be used
12+
to increase the quadrature order in terms that involve the rhs or the stochastic coefficient, respectively.
13+
914
1015
"""
1116
function solve!(
1217
::Type{AbstractModelProblem},
1318
sol::SGFEVector, ## target SGFEM vector
1419
C::AbstractStochasticCoefficient;
20+
rhs = nothing,
21+
use_iterative_solver = true,
22+
bonus_quadorder_f = 0,
23+
bonus_quadorder_a = 0,
1524
kwargs...
1625
)
1726
return @error "This Model problem seems to have no solver implemented!"

src/mopcontrol.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ $(TYPEDSIGNATURES)
4141
4242
adds new stochastic modes:
4343
- for each existing mode all neighbouring modes are added (= all possible copies of that mode where one dimension is increased by 1)
44-
- `p_extension' additionally ensures that the polynomial degree of the first dimension is increased by this amount
45-
- `tail_extension' activates tail_expansion[1] many new stochastic modes with order 1,
46-
for each existing mode also the next tail_expansion[2] many higher stochastic modes are activated or increased
44+
- `p_extension` additionally ensures that the polynomial degree of the first dimension is increased by this amount
45+
- `tail_extension` activates `tail_expansion[1]` many new stochastic modes with order 1,
46+
for each existing mode also the next `tail_expansion[2]` many higher stochastic modes are activated or increased
4747
"""
4848
function add_boundary_modes(multi_indices; p_extension = 1, tail_extension = [10, 2])
4949
last_nonzero = 0 # = support

src/sampling_error.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,13 @@ $(TYPEDSIGNATURES)
5454
estimates the error for the model problem `problem` by Monte carlo sampling: for each sample a discrete
5555
finite element solution of the deterministic model problem with fixed (sampled) coefficient with
5656
polynomial order `order` is computed and compared to the given stochastic Galerkin solution
57-
`SolutionSGFEM`. Return values are:
58-
- totalerrorL2stress_weighted : mean L2 error of the stress with samples weighted by the distribution
59-
- totalerrorL2u_weighted : mean L2 error with samples weighted by the distribution
60-
- totalerrorL2stress_uniform : mean L2 error of the stress with samples weighted uniformly
61-
- totalerrorL2u_uniform : mean L2 error with samples weighted uniformly
57+
`SolutionSGFEM`. Return values (each arrays of length M+1 where M is the length of the multi-indices) are:
58+
- `totalerrorL2stress_weighted` : mean L2 error of the stress with samples weighted by the distribution
59+
- `totalerrorL2u_weighted` : mean L2 error with samples weighted by the distribution
60+
- `totalerrorL2stress_uniform` : mean L2 error of the stress with samples weighted uniformly
61+
- `totalerrorL2u_uniform` : mean L2 error with samples weighted uniformly
62+
The m-th component of these arrays are the errors when only multi-indices of up to order m
63+
are included.
6264
6365
"""
6466
function calculate_sampling_error(

0 commit comments

Comments
 (0)