/B-Spline-FEM-Computation

⛏️ FE code that discretizes a two-dimensional Poisson’s equation using B-Spline basis functions

Primary LanguageC++

B-Spline-FEM-Computation

FE code that discretizes a two-dimensional Poisson’s equation using B-Spline basis functions.

Setup

  1. Recursively clone this project to your machine: git clone --recursive https://github.com/huaminghuangtw/B-Spline-FEM-Computation.git
  2. Use Cmake to build/generate project files corresponding to your preferred complier/IDE, e.g., Visual Studio 2019
    (Remember to tick the PYBIND11_INSTALL box, otherwise there will be ImportError: DLL not found message)

  3. Open project solution file (in this case splinecomputation.sln)
  4. Go to Solution Explorer > Right-click on INSTALL > Select build

  5. A new folder called install will be generated under your build folder
  6. After this step you can go to the install folder and run the splinekernel testrunner or any python scripts


How to use the code?

In the install folder, you could play around with:

  • splinekernel testrunner

    • CMD

    • Git Bash

    • Visual Studio
      • Go to Solution Explorer > Right-click on splinekernel_testrunner > Select Debug > Select Start New Instance
      • Go to Solution Explorer > Right-click on splinekernel_testrunner > Select Set as StartUp Project > Click F5
  • Python scripts

    python plotBSplineBasis.py


    python plotBSplineCurve.py


    python plotBSplineBasis2D.py


    python plotBSplineSurface.py


    python laplaceProblem.py



Contact

If you have any question or suggestion, feel free to contact me at huaming.huang.tw@gmail.com. Contributions are also welcomed. Please open a pull-request or an issue in this repository.