Solution verification indicators
solution_verification_indicators
¶
Functions¶
compute_c
¶
compute_c(e_q_j, gamma_j_1, gamma_j, beta)
Compute constant \(C\).
Parameters:
-
e_q_j–The error expansion (\(q_{exact} - q_j\)) for grid j.
-
gamma_j_1–The relative element size for grid j+1.
-
gamma_j–The relative element size for grid j.
-
beta–The convergence order.
Returns:
-
–
The constant \(C\).
Source code in src/vimseo/tools/verification/solution_verification_indicators.py
51 52 53 54 55 56 57 58 59 60 61 62 63 | |
compute_gci
¶
compute_gci(fs, h, q, beta, starting_mesh_id)
The Grid Convergence Index.
Computed from the two finest meshes.
Parameters:
-
fs–The safety factor.
-
h–The element sizes, from coarse to fine.
-
q–The output value corresponding to each element size.
-
beta–The convergence order.
-
starting_mesh_id–The GCI is computed based on q[starting_mesh_id] and
Returns:
-
–
A tuple where first element is the Grid Convergence Index, and second element is the GCI-based error band on the solution.
Source code in src/vimseo/tools/verification/solution_verification_indicators.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | |
compute_median
¶
compute_median(q: ndarray, q_ref: float)
Estimate the extrapolated value at element size = 0.
The uncertainty is computed from the Median Absolute Deviation (MAD).
Parameters:
-
q(ndarray) –The model output values.
-
q_ref(float) –A reference value in which we have most confidence. The final
Returns:
-
–
A tuple where first element is the estimate of the extrapolated value, and second is the MAD.
Source code in src/vimseo/tools/verification/solution_verification_indicators.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
compute_q_extrap
¶
compute_q_extrap(j, c, q, gamma, beta)
Compute the extrapolated value at element size = 0.
Parameters:
-
j–The grid index.
-
c–The \(C\) constant.
-
q–The model solution array indexed for j.
-
gamma–The relative element size array indexed for j.
-
beta–The convergence order.
Returns:
-
–
The extrapolated value of the model solution at element size = 0.
Source code in src/vimseo/tools/verification/solution_verification_indicators.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
compute_rde
¶
compute_rde(fs, h, q, q_extrap, beta, i)
The Relative Discretisation Index (RDE).
Computed from the two finest meshes.
Parameters:
-
fs–The safety factor.
-
h–The element sizes, from coarse to fine.
-
q–The output value corresponding to each element size.
-
beta–The convergence order.
-
q_extrap–The Richardson extrapolation.
-
i–The index at which RDE is computed, from fine to coarse.
Returns:
-
–
A tuple where first element is the RDE, and second element is the RDE-based error band on the solution for the finest grid.
Source code in src/vimseo/tools/verification/solution_verification_indicators.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | |
compute_richardson
¶
compute_richardson(h, q)
Compute Richardson extrapolation.
Parameters:
-
h–The array of element sizes.
-
q–The array of model solutions.
Returns:
-
–
The Richardson extrapolation of q at element size = 0.
Source code in src/vimseo/tools/verification/solution_verification_indicators.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |