Replies: 1 comment
-
According to Cellier & Ruyer-Quil (2019), Scikit-FDiff uses SymPy to allow ‘easy and automated finite difference discretization’; might be worth a look for inspiration or comparison.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While dependence on SymPy was dropped in #37 for computing basis functions, it might be useful for preprocessing certain examples. It would not then be a dependence for the scikit-fem package, just for the examples.
One is suggested by the FEniCS tutorial example ft05_nonlinear_poisson.py. The example is basically like
docs/examples/ex10.py
, except that it adds an artificial right-hand side to balance the equation for a specified solution; i.e. it uses the method of manufactured solutions. That right-hand side is computed from the stipulated exact solution using SymPy.A translation of the FEniCS example into scikit-fem is at https://github.com/gdmcbain/fenics-tuto-in-skfem/tree/master/05_poisson_nonlinear. It goes beyond the original in using:
numpy.ndarray
likeMesh.p
There are a few examples (ex12, ex13, ex14, ex16, ex17, ex18, ex19, ex20) which involve exact solutions; I wonder whether it would be worth modifying one or more of them to use SymPy to compute the exact solution to show how it's done here.
Beta Was this translation helpful? Give feedback.
All reactions