Skip to content

Conversation

@ssasmal1759
Copy link

This PR expands the Poisson tutorial with additional explanations to help beginners.
I added:

• Intro explanation of the weak form and how it connects to a(u,v) and b(v)
• Clarification on the mesh file (model.json) and boundary tags
• Explanation of test space (V0) and trial space (Ug)
• Small transition explanations between sections
• Math-to-code comments showing how the weak form maps to Gridap expressions
• Clearer visualization guidance to interpret results

Please let me know if anything should be changed, thank you.

Improved Poisson tutorial with explanations and added clarity
Expanded explanations of weak form, FE spaces, mesh tags, transitions, and math-code mapping. Also improved visualization description.
Copy link
Member

@JordiManyer JordiManyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed. I think some stuff is unnecessary, but I am happy to keep parts of it. Thank you for the contribution!


degree = 2
Ω = Triangulation(model)
# dΩ represents integration over the 3D domain Ω (a volume integral), matching the dΩ notation in the weak form.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this makes sense. What does "represents integration mean"? I think the current explanation, a.k.a it's a quadrature of order degree the cells, is more precise.

# In the strong form we have:
# -Δu = f in Ω, u = g on Γ_D, ∂u/∂n = h on Γ_N.
#
# To obtain the weak form, we multiply by a test function v (which vanishes on Γ_D) and integrate by parts, giving:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is necessary. My point of view is that this is an implementation tutorial, not a math class. In the initial header, we state both the strong and weak formulations of the problem and give a reference so that people can have a look at the derivation. If you go to the given reference, you will find an explanation on exactly this, thus making it unnecessary.

a(u,v) = ( (v)(u) )*
b(v) = ( v*f )*+ ( v*h )*
# Math ⇔ Code mapping:
# a(u,v) = ∫( ∇(v)⋅∇(u) )*dΩ ↔ ∫_Ω ∇u⋅∇v dΩ
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I do not see the point of this. The API is expressive enough that this "translation" is unnecessary, I think. If you look at both sides, the changes are minimal. I do not think people struggle with making this translation themselves.

# Summary so far:
# - V0 implements the test space V_h^0 (zero on Γ_D).
# - Ug implements the trial space U_h^g (Dirichlet value g).
# - a(u,v) and b(v) encode the variational problem.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the tutorial so long that we need a summary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants