Python tutorial for solving 1D Poisson with libCEED and SciPy CG

Open
#2,084 3 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
numpy, python

Research direction

Start by reading Tutorial 5 and the current Python interface to determine whether it supports the proposed right-hand side, boundary conditions, and SciPy CG integration. The issue does not name specific files or tests, so first locate the tutorial and relevant interface examples. Done means a documented 1D Poisson solve with analytical-solution checks and decreasing error under mesh refinement; clarify feasibility and validation expectations with the maintainers first.

Written by the indexing model from the issue text.

Description

examples Python

Hi libCEED team,

I’m Mounika, a PhD student in Computational Science. I’m exploring a contribution to the Python tutorials and would appreciate your guidance on the usefulness and feasibility of this idea.

So, Tutorial 5 demonstrates creating and applying a 1D Poisson operator. I would like to build on that with a worked example showing how to use the operator to solve a complete boundary-value problem.

The proposed tutorial would:

  1. Solve a 1D Poisson problem with a known analytical solution and homogeneous Dirichlet boundary conditions.
  2. Construct the right-hand side and explain how to impose the boundary conditions.
  3. Wrap the libCEED operator in a SciPy LinearOperator and solve using conjugate gradient.
  4. Check the numerical solution against the analytical solution and demonstrate decreasing error under mesh refinement.

Optionally i would like to explore increasing the polynomial degree.

However, before proceeding, I have a few questions about it; could you please advise on the following?

  • Does the current libCEED Python interface expose all the functionality needed to construct the right-hand side, handle the boundary conditions, and connect the operator to SciPy’s CG solver?
  • Would libCEED, NumPy, and SciPy be sufficient for the numerical implementation, or would additional packages or compiled components be required?
  • Is this a recommended approach for a standalone Python tutorial, or would you suggest a different solver integration?
  • Would this be a useful contribution, and is there any existing or ongoing work that I should build on?

If the approach is suitable, I would be happy to start with a minimal example and develop it into a documented tutorial. I would also appreciate guidance on its preferred location and validation requirements.

Thank you!
Mounika

Dominant language
C
Stars
273
Forks
84
Avg merge
1d 15h
Merged PRs (30d)
21

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CEED/libCEED

All issues in CEED/libCEED

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.