Skip to content

Commit

Permalink
Fixed results for mixed poisson.
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-heltai committed Oct 11, 2023
1 parent fae451e commit ff59568
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions book_prms/chapter_1_example_1_4_mixed_poisson.prm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
subsection MixedPoisson
set Finite element space (u, u, p) = FESystem[FE_RaviartThomas(1)-FE_DGQ(1)]
set Finite element space (u, u, p) = FESystem[FE_RaviartThomas(0)-FE_DGQ(0)]
set evolution type = steady_state
set n_threads = 1
set verbosity = 4
Expand Down Expand Up @@ -31,7 +31,7 @@ subsection MixedPoisson
subsection Error
set Enable computation of the errors = true
set Error file name = book_output/chapter_1_example_1_4_mixed_poisson.txt
set Error precision = 3
set Error precision = 6
set Exponent for p-norms = 2
set Extra columns = cells, dofs
set List of error norms to compute = L2_norm; L2_norm
Expand All @@ -41,19 +41,19 @@ subsection MixedPoisson
subsection Functions
set Diffusion coefficient = 1
set Exact solution = 2*PI*sin(2*PI*y)*cos(2*PI*x); \
2*PI*sin(2*PI*x)*cos(2*PI*y); \
sin(2*PI*x)*sin(2*PI*y)
2*PI*sin(2*PI*x)*cos(2*PI*y); \
sin(2*PI*x)*sin(2*PI*y)
set Forcing term = 0; 0; 8*PI^2*sin(2*PI*x)*sin(2*PI*y)
set Initial value = 0;0;0
end
subsection Grid
set Arguments = 0: 1: false
set Initial grid refinement = 3
set Initial grid refinement = 5
set Input name = hyper_cube
set Output name =
set Transform to simplex grid = false
subsection Refinement
set Number of refinement cycles = 3
set Number of refinement cycles = 6
subsection Error estimator
set Component mask =
set Estimator type = kelly
Expand Down Expand Up @@ -107,7 +107,7 @@ subsection MixedPoisson
end
subsection Schur
set Absolute tolerance = 1e-12
set Maximum iterations = 10
set Maximum iterations = 5
set Consecutive iterations = 2
set Log history = false
set Log result = false
Expand All @@ -116,14 +116,14 @@ subsection MixedPoisson
set Solver name = cg
end
subsection System
set Absolute tolerance = 1e-12
set Absolute tolerance = 1e-8
set Consecutive iterations = 2
set Log history = false
set Log result = true
set Maximum iterations = 1000
set Maximum iterations = 100000
set Relative tolerance = 1e-06
set Solver control type = tolerance
set Solver name = gmres
set Solver name = cg
end
subsection System AMG preconditioner
set Aggregation threshold = 0.0001
Expand Down
4 changes: 2 additions & 2 deletions notebooks/manufactured_solution_poisson.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -37,7 +37,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 2,
"metadata": {},
"outputs": [
{
Expand Down
2 changes: 1 addition & 1 deletion source/pdes/mpi/mixed_poisson.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ namespace PDEs
const auto &div_u = fe_v[velocity].divergence(j, qi);
const auto &p = fe_v[pressure].value(j, qi);

cell_matrix(i, j) += (u * v - p * div_v - div_u * q) * //
cell_matrix(i, j) += (u * v + p * div_v + div_u * q) * //
fe_v.JxW(qi); // dx
}
const auto gq =
Expand Down

0 comments on commit ff59568

Please sign in to comment.