Here I present a very basic implementation of Finite Element methods to solve Poisson's equation in 2D.
I have separated in every module each part of the implementation that consists on
- Defining the mesh (mesh.py)
- Construct basis functions in either cartesian (base.py) or barycentric coordinates (baryo.py)
- Construct the local stiffness matrix and assembly the global one (stiffness.py)
- Assembly the loading vector (force.py)
- Apply boundary conditions in the stiffness matrix and loading vector (c_boundaries.py)
- Solve the linear system and construct a general FEMSolver(FEM.py)
- Implement convergence theory for mesh refinement(to be added)
Additionally, you can find in the jupyter notebook a short summary of the implementation with some examples and the mathematical description of the theory