-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add function spaces check in linear solver #3214
base: master
Are you sure you want to change the base?
Changes from all commits
706690e
5f3b3be
7bef971
bea19e2
b192913
eb55dd9
8d58dda
636cd02
da883e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -382,7 +382,8 @@ We will now show how to solve the Poisson problem on a high-order mesh, of order | |||||
bc = DirichletBC(V, 0.0, [1]) | ||||||
A = assemble(a, bcs=bc) | ||||||
b = assemble(l) | ||||||
bc.apply(b) | ||||||
b_riesz = b.riesz_representation(riesz_map="l2") | ||||||
bc.apply(b_riesz) | ||||||
Comment on lines
+385
to
+386
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
solve(A, sol, b, solver_parameters={"ksp_type": "cg", "pc_type": "lu"}) | ||||||
|
||||||
VTKFile("output/Sphere.pvd").write(sol) | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -52,7 +52,8 @@ def poisson(h, degree=2): | |||||
# Assembling matrix | ||||||
A = assemble(a, bcs=bc) | ||||||
b = assemble(l) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
bc.apply(b) | ||||||
b_riesz = b.riesz_representation(riesz_map="l2") | ||||||
bc.apply(b_riesz) | ||||||
Comment on lines
+55
to
+56
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
# Solving the problem | ||||||
solve(A, u, b, solver_parameters={"ksp_type": "preonly", "pc_type": "lu"}) | ||||||
|
@@ -96,7 +97,8 @@ def poisson3D(h, degree=2): | |||||
# Assembling matrix | ||||||
A = assemble(a, bcs=bc) | ||||||
b = assemble(l) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
bc.apply(b) | ||||||
b_riesz = b.riesz_representation(riesz_map="l2") | ||||||
bc.apply(b_riesz) | ||||||
Comment on lines
+100
to
+101
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
# Solving the problem | ||||||
solve(A, u, b, solver_parameters={"ksp_type": "preonly", "pc_type": "lu"}) | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.